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>
In this CL we change ANGLE to pass the mask of missing shader
outputs down to pipeline creation. We then use the color mask
bits to block SwiftShader writing to unused outputs.
This fixes the undefined behaviour present in Genshin Impact.
Note that the other GLES implementations we tested don't seem
to modify outputs even if they're unused.
It was easier to mask out the color attachments in initialize
rather than set up the pipeline desc to mask out the attachments.
This was because we manipulate the color mask in a fairly complex
way before we initialize the pipeline desc.
Bug: angleproject:6566
Change-Id: Ie659fcd511cd286fa573fd25e3e6a0b9e123ebd6
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3232435
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Only samplable texture formats should be added to
outCompressedTextureFormats in FormatTable::initialize(), so move that
to after the check of mActualSampleOnlyImageFormatID.
Bug: angleproject:6277
Change-Id: Id91908a04d7e94f2d6dd1f0fa499ebea6a1f107e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3243068
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Tim Van Patten <timvp@google.com>
The Metal backend was clipping in integer space.
If the src and dst are not the same size,
say src is 3 wide and dst is 4 wide, and src
starts at -1, then src will be clipped by one
making the src 2 wide. It got 1/3 smaller so the
dst get 1/3 smaller making it 2.666 pixels wide.
The dst then needs to be expanded to pixels so 3 wide.
But, that means the src also needs to be expanded
0.3333 * 3(originalSrcWidth) / 4(originalDstWidth)
so its new left edge is -0.245 which is not an integer.
Bug: angleproject:6598
Change-Id: I2faa966b18b457f474a3e7f6844ef64bfa66dbe8
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3251683
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Kyle Piddington <kpiddington@apple.com>
Commit-Queue: Gregg Tavares <gman@chromium.org>
Previously we would report it as size 1 always if the extension
was missing. This was breaking a dEQP. The test may have a bug, but
we need to work around the issue until the upstream test is fixed.
See https://gitlab.khronos.org/Tracker/vk-gl-cts/-/issues/3259
Bug: angleproject:6566
Change-Id: I5ac654f472f0e227d63804896ecc388081bec5e8
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3251586
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Expose EGL_RECORDABLE_ANDROID in the config for all Vulkan drivers
on Android to provide app compatiblity with "My Talking Tom 2" and
"My Talking Tom Friends".
Don't require config to be unavailable in EGLRecordableTest and request
a config with EGL_RECORDABLE_ANDROID enabled, but do not check for
results.
Bug: angleproject:6612
Change-Id: I25113b7c7f9a4a3b13dc625f01d96ba91cb3c6d7
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3237001
Commit-Queue: Lubosz Sarnecki <lubosz.sarnecki@collabora.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
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>
It allows ANGLE clients to get and use VkDevice and VkQueue
used by vulkan backend.
Bug: chromium:1264439
Change-Id: I338ac08152cfec50bb34c5025730e5e6368efba9
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3250964
Reviewed-by: Peng Huang <penghuang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Peng Huang <penghuang@chromium.org>
When the MSRTT transient multisampled image is created, the emulated
clear staged update is removed (as it's also staged for the single
sampled image). This was done after allocating memory for the image,
which can fail, leaving the update staged and leading to an ASSERT
failure when the texture is used.
Technically, the texture should not be used, and that's a Chrome bug
where the OOM result from ANGLE is being ignored. This change makes
sure the staged update is removed before allocating memory so the
multisampled image is in a more consistent state.
Bug: chromium:1263046
Change-Id: Ida8923ccbc517f740d76b4c2880086a039fa8a1f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3251580
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
When we call BufferVk::mapRangeImpl(), both from internal code paths for
data reads or due to glMapBufferRange call, we are not passing the
access bit to the call. This CL passes the proper access bits to the
call and only wait for GPU writes to finish if access is for read only.
This CL also adds access bitfield to the BufferVk::mapImpl() API and
have various callers pass in the proper access bits as well.
Bug: b/203582620
Change-Id: Ica8493c902dbd7b15996266c81ce0fd4dbfc2520
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3245487
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: Charlie Lao <cclao@google.com>
Found by a fuzzer, float+matrix was not handled correctly by the SPIR-V
output.
Bug: chromium:1264212
Change-Id: I09b13c3e48374621228f5fab4de68c33973ddfd4
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3251585
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
The following multithreaded tests are flaky in CQ and are being
suppressed:
VulkanMultithreadingTest.MultiContextDrawSmallDescriptorPools/ES3_Vulkan
MultithreadingTestES3.MultithreadFenceDraw/ES3_Vulkan_SwiftShader
Bug: angleproject:5418
Bug: angleproject:6633
Change-Id: I170085064597165972b7206d98130917bb46fcaf
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3251684
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Tim Van Patten <timvp@google.com>
Queries, semaphores, and pipelines instead use the normal
vk::Resource design to track their lifetimes. Removes the current
serial APIs from all classes. Current serials are still tracked
internally in the command queue classes.
Bug: b/169788986
Change-Id: Idcd2c2a93bc8225c6f3f7c247eb8fcfb76be1030
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3223644
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
The parser only considered the case where the input to the
textureGatherOffsets() function is an aggregate constructor
node, but not if it is a pre-initialized constant variable.
Added code to handle the constant variable case.
Tests:KHR-GLES32.core.gpu_shader5.texture_gather_offsets_color
KHR-GLES32.core.gpu_shader5.texture_gather_offsets_depth
Bug: angleproject:5362
Change-Id: Ib1dd3450071341082ea6f0f2a243c3bb3ef6b95a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3217852
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Brandon Schade <b.schade@samsung.com>
In preparation for moving more code from gl::Program to
gl::ProgramExecutable so it can be shared with ProgramPipeline.
Bug: angleproject:6566
Change-Id: Icb7ecccb37ae8e0d7d5fef8968f0dd7ef6fe6150
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3226305
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
These Chrome targets are now migrated to use the encapsulated API.
Bug: angleproject:2551
Change-Id: I6970f7ad85af089fd41c79476a2bdd4e605949c3
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3248143
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
The following test is failing on win-trace:
ProgramBinaryES3Test.SaveAndLoadDetachedShaders/ES3_Vulkan_SwiftShader
MultithreadingTest.MultiContextCreateAndDeleteResources/ES3_Vulkan_SwiftShader
MultithreadingTestES3.MultithreadFenceDraw/ES3_Vulkan_SwiftShader
MultithreadingTestES3.MultithreadFenceTexImage/ES3_Vulkan_SwiftShader
MultithreadingTest.MultiContextDrawWithSwapBuffers/ES3_Vulkan_SwiftShader
This CL adds them to capture_replay_expectations.txt.
Bug: angleproject:6631
Change-Id: Ibb74afc6ff4b799e15bb8ead4d7fae0ce81620bb
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3248572
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: Tim Van Patten <timvp@google.com>
Normalize' has a fast math option that more conformantly
deals with INF in normalize functions.
Use metal::fast::normalize instead of metal::normalize
This also matches SPIRV-Cross behavior for normalization
Bug: angleproject:6629
Change-Id: I61392ecd6f61b612d21f2832e07a135e26b53ad6
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3248145
Commit-Queue: Kyle Piddington <kpiddington@apple.com>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Gregg Tavares <gman@chromium.org>
Fix 6 fboCompleteness tests by setting the Metal conformance version
to ES3, rather than ES2. This causes ANGLE to select the backwards
compatible ES3 validation rather than the ES2 validation.
The FBO completeness test may have a bug related to extensions
in it, as limiting the Vulkan backend to ES2 conformance
causes it to fail in the same manner of Metal.
Bug: angleproject:6618
Change-Id: I64d87ea7b9e1957baab05b6380fe09e8271393a9
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3244023
Commit-Queue: Kyle Piddington <kpiddington@apple.com>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
To match the vulkan device choose logic in chrome, ANGLE will choose
the default device based on the order of (discret GPU > integrated GPU
> other GPU)
TODO: for long term, ANGLE should provide a way to let chrome specify
the physical device.
Bug: chromium:1260869
Change-Id: Id023138485eb65fcc1d2758103d59a4e6cb2a51d
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3242963
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Peng Huang <penghuang@chromium.org>