Makes some VkFlags into VkAccessFlags to aid with code search. Also
corrects a few typos.
Bug: angleproject:6566
Change-Id: Ia4d14d38bb6d4e8c4c71fed6038c12edae112be9
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3264224
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
This missing reset was causing incorrect state validation to
persist in a few instances.
Bug: chromium:1266437
Change-Id: I7ab47c81bf9f855e3ad75048f9d1aaefbc2291df
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3262477
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Chromium //build will soon remove the `use_xcode_clang` variable.
Remove it from Angle to avoid breakage when the variable is gone.
Bug: chromium:1266466
Change-Id: I3f95ffe611cc38c9de76e9744186efff3332d539
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3259713
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
If an app destroys a context, but keeps it current on a thread, ANGLE
will reset the context, but can't delete it. This can lead to a segfault
if ANGLE attempts to call Context::finish() on a destroyed context.
To solve this, check if the context has been destroyed in
ShareGroup::finishAllContexts().
Bug: angleproject:6653
Change-Id: Ib30e352ad6395e01f8fab0095cd6231dfb10d8ae
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3260726
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Tim Van Patten <timvp@google.com>
In the process of dropping ANGLE_multiview in favor of OVR_multiview,
the framebuffer completeness checks have become stale. In particular:
- There is no requirement that the base layer of the attachments match
- There _is_ a requirement that base+count layers are within the texture
boundaries.
Bug: chromium:1264988
Change-Id: I86837b587ad5befaa6a545c5a24507e8dff0b568
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3259272
Reviewed-by: Alexis Hetu <sugoi@google.com>
Reviewed-by: Alexis Hétu <sugoi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
This CL introduces the concept of having optimized shaders for given
state combinations. In this first pass, all uniform bools have been
moved to hard coded values in the GLES1 ubershader.
Frame times on Android ARM with locked GPU clocks:
Trace Before After
dr_driving: 27.8145 -> 4.2986
sonic_the_hedgehog: 17.9779 -> 2.8223
summoners_war: 93.2040 -> 15.9810
wordscapes: 53.9227 -> 7.6167
zillow: 15.0323 -> 2.9368
Bug: angleproject:6644
Bug: angleproject:6652
Change-Id: I548bc5c6aa24bad5fbd740b9552c4a703ae41354
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3251688
Reviewed-by: Lingfeng Yang <lfy@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Cody Northrop <cnorthrop@google.com>
Rework vertex buffer caching to allow us to reuse parts
of converted buffers.
Reusing conversions dramatically drops the memory usage
when drawing index ranges by offset with
unaligned attributes.
Bug: angleproject:6638
Change-Id: I79797da202629b1632e1397ce1227ee3d7a1c9d7
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3251467
Commit-Queue: Kyle Piddington <kpiddington@apple.com>
Reviewed-by: Le Hoang Quyen <le.hoang.q@gmail.com>
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Consider the following GL commands:
glBeginQuery(GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN)
glBeginTransformFeedback()
glDrawArrays()
glPauseTransformFeedback()
glDrawArrays()
glResumeTransformFeedback()
glDrawArrays()
glEndTransformFeedback()
glEndQuery(GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN)
The renderpass is broken for each of the draw calls, leading to
pauseRenderPassQueriesIfActive() and resumeRenderPassQueriesIfActive()
being called when the RP is stopped/started. This leads ANGLE to
generate 3 TransformFeedbackPrimitivesWritten queries when looping
through the "active" queries, since no consideration is made for XFB
actually being active/unpaused.
ARM doesn't support the TransformFeedbackPrimitivesWritten query when
XFB is disabled. Instead, the query is never completed and the results
are never available. It could probably be argued that this is an ARM
bug, and they should just output '0' if XFB isn't active during the
query.
Regardless, ANGLE shouldn't be issuing the queries when XFB is no
active, since it's wasteful.
Bug: angleproject:6622
Test: dEQP.GLES3/functional_transform_feedback*
Test: TransformFeedbackTest.TransformFeedbackQueryPausedDrawThenResume
Change-Id: I380fb60405d7f538b802bb0df72bf609f0bc58e9
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3246532
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Tim Van Patten <timvp@google.com>
Due to some upstream changes, unused uniform structs are not being
given a name. These structs cause compilation failures, which has
completely caused shadertoy.com to fail to render.
Skip the check when naming embedded structs to allow uniform struct
types to still be named, even when no uniform exists.
Unskip targeted tests on the Metal backend which were added previously
in Issue 6641. These still need to be fixed more generically for the
Vulkan backend.
Also suppress flaky WebGLCompatibilityTest.RG32FTextures test on Mac
Intel OpenGL, which affected this CL.
Bug: angleproject:6642
Bug: angleproject:6641
Bug: angleproject:6570
Change-Id: I598fc212f4db3d3b7c5617bd8a87f8b7db60706c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3258341
Commit-Queue: Kenneth Russell <kbr@chromium.org>
Reviewed-by: Gregg Tavares <gman@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
depth16unorm is broken on Metal. This is a workaround.
Bug: angleproject:6597
Change-Id: I1748f9fab587b22980d13e8a141fa880eb6f9db0
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3255666
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Gregg Tavares <gman@chromium.org>
Struct samplers assert in the Vulkan and Metal backends during
rewriting. Add a test - skipped for now on these backends - to
highlight this issue.
Bug: angleproject:6641
Change-Id: I95cbc9e5f4122f1ac7db926ac44c4cccc1b6f87a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3256235
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Kenneth Russell <kbr@chromium.org>
Cuttlefish recently hit a clang compiler issue related to -Oz:
b/200617543
This is fixed by either disabling optimizations for ScopedExit or using
-Os.
This CL will switch ANGLE to using -Os.
When building CF in AOSP, the binary size is reduced with -Os vs -Oz:
-Oz: 16,383,489 bytes
-Os: 16,152,509 bytes
Bug: b/200617543
Change-Id: Ic920b0e0e4a61453d9657101a4560f74d90d5744
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3253128
Reviewed-by: Jason Macnak <natsu@google.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Tim Van Patten <timvp@google.com>
Use it instead of ABSL_FALLTHROUGH_INTENDED.
(ANGLE shouldn't use absl unless angle_enable_absl is true.
This is breaking the roll of ANGLE into Dawn.)
Bug: angleproject:6647
Change-Id: I47f9a00841c4605fca52b17eeb68c0b1da5004c0
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3258008
Commit-Queue: Stephen White <senorblanco@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
This will allow us to manually add ASAN tryjobs to test before
landing.
Bug: angleproject:5795
Change-Id: I1085b64f2dcf09e20f470aded0d57befbe4fb084
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3257025
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
The test is passing quite often, but not always.
Bug: angleproject:6180
Change-Id: I4bed6cd2907da61023ca91b20e20d8b0722302b7
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3257321
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
-Added more checks to glGetAttribLocation() similar to
glBindAttribLocation().
-Added the corresponding unit tests. Using a reserved
prefix in glGetAttribLocation() should return -1.
Bug: angleproject:2419
Change-Id: I3f691f344c7003f855e53d35cd5f9578069acdae
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3252643
Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
This change adds a capture call to detach shader
object before deleting the shader object in function
GenerateLinkedProgram(), if that is also what the app does.
GenerateLinkedProgram() is part of the Mid Execution Capture
(MEC), and the purpose of the MEC is to setup a program that
more closely mirrors the original app.
The game World Cricket Championship2 detaches the shader object
before deleting the shader object. With this change, we can follow
the same behavior in GenerateLinkedProgram(). This ensures that
the Shader Object refcount is decremented to 0 before the
CaptureDeleteShader call is applied, and the ShaderProgramID
handle assigned to the Shader Object will be released and
can be reused for subsequent glCreateShader calls. The total number
of ShaderProgramID we need will be consistent between
SetupReplayContextShared() and the game uses.
We are allocating memory slots for gUniformLocations2 array
based on the total number of ShaderProgramID the game uses.
Keeping the ShaderProgramID counts the same between
trace replay and the game ensures we allocate the right amount
of memory for the trace replay.
Bug: angleproject:6621
Bug: b/194508692
Change-Id: Ib2810b486a6e9108db2a32f084d650a25f14bebd
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3246533
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Commit-Queue: Yuxin Hu <yuxinhu@google.com>
These two shaders used "TEXCORD0" instead of "TEXCOORD0" which made the
Direct3D debug layers unhappy:
D3D11 ERROR: ID3D11DeviceContext::Draw: Vertex Shader - Pixel Shader
linkage error: Signatures between stages are incompatible. The input
stage requires Semantic/Index (TEXCORD,0) as input, but it is not
provided by the output stage. [ EXECUTION ERROR #342:
DEVICE_SHADER_LINKAGE_SEMANTICNAME_NOT_FOUND]
Fixing the typo makes that error go away.
Bug: angleproject:6614
Change-Id: Ifa1c8c01fb4502398b3b4e13a411ef50bc3db483
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3239013
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
The ASAN builders will start by running compile-only and only in CI.
A follow-up change will enable sharded tests and CQ jobs.
Bug: angleproject:5795
Change-Id: I2e761b7bdd2d7215db2210c4538b6cafc4d9069a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3254430
Reviewed-by: Jamie Madill <jmadill@chromium.org>
ProgramBinaryES3Test.SaveAndLoadDetachedShaders depends on
VK_EXT_provoking_vertex, which is not supported on many of our bots.
Bug: angleproject:6526
Bug: chromium:1264995
Change-Id: I9ea26c1a113068381b18a65c4b79448cf642d476
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3251224
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
This reverts commit fb77afd3c7.
Reason for revert: Breaks ANGLE roll into Chromium:
https://chromium-review.googlesource.com/c/chromium/src/+/3253966/
Please follow the directions here to update the reference images:
https://chromium.googlesource.com/chromium/src/+/HEAD/docs/testing/web_test_expectations.md
Original change's description:
> Vulkan: Don't expose MSRTT on SwiftShader
>
> Emulating this extension on SwiftShader is neither useful nor efficient
> (on the contrary, it hurts performance (which is true for all non-tiling
> architectures)). This extension was exposed purely to increase testing
> coverage, but is being disabled now as OOMs resulting from allocating
> the implict multisampled image is confusing Chrome. Note that
> SwiftShader exposes only a limited amount of memory.
>
> Bug: chromium:1263046
> Change-Id: Ia69b7fc63804169431885352a8f637a95ab08bd0
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3251581
> Reviewed-by: Geoff Lang <geofflang@chromium.org>
> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Bug: chromium:1263046
Change-Id: I554df85109282db840ed6d2dbf0b153da5a7a98f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3254007
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: Tim Van Patten <timvp@google.com>
The ANGLE autoroller into AOSP is currently stuck due to a merge
conflict in third_party/glmark2. Specifically, this directory was
deleted in AOSP, but modified in upstream ANGLE.
The solution is to add back the third_party/ directories into AOSP, and
the ANGLE-owned files. The full contents will not be added back if
they are a git submodule.
Some third_party/ directories will continue to be deleted due to how
large they are:
third_party/jdk
third_party/llvm-build
third_party/android_build_tools
third_party/android_sdk
We can look into adding these back in the future if it becomes
necessary.
Additionally, the license information in the Android.bp is being updated
to reflect the newly added files.
Bug: angleproject:6635
Change-Id: I793e5b0797218963a4d06a0399b3be80edd43b37
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3251685
Commit-Queue: Tim Van Patten <timvp@google.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>