src


Log

Author Commit Date CI Message
Lubosz Sarnecki 694c5012 2021-10-14T11:16:29 capture_gles_3_2: Skip capturing debug calls This is analogous to capture_gles_ext. Bug: angleproject:6613 Change-Id: I8917a4cfa060f71ad616ece56038d02bfa12a952 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3237002 Commit-Queue: Lubosz Sarnecki <lubosz.sarnecki@collabora.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Charlie Lao bae19e06 2021-10-26T13:35:57 Vulkan: Avoid unnecessary wait if mapBufferRange indicates read only 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>
Shahbaz Youssefi 5c914b57 2021-10-28T13:27:04 Vulkan: SPIR-V Gen: Fix float+matrix 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>
Tim Van Patten dacfa917 2021-10-28T12:49:33 Disable flaky multithreaded tests 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>
Jamie Madill 191c236a 2021-10-14T17:01:45 Vulkan: Remove "current queue serial". 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>
Brandon Schade 5da062ba 2021-10-06T11:15:00 Translator: Fixed textureGatherOffsets validation 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>
Jamie Madill 3a9f18f1 2021-10-18T10:44:38 Refactor program pipeline handling. 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>
Hans Wennborg 6ce67886 2021-10-28T13:45:18 Drop -Wweak-template-vtables Clang is dropping suport for this flag, see bug. Bug: chromium:1264351 Change-Id: I09b3d42889eecb8e786c52c205f28507fc797c5a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3250885 Reviewed-by: Nico Weber <thakis@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Tim Van Patten e514e159 2021-10-27T17:54:00 win-trace: Skip failing tests 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>
Kyle Piddington db83279a 2021-10-27T10:45:23 Metal: Use 'fast' normalize to match DEQP expectations 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>
Kyle Piddington c1b42740 2021-10-25T17:45:19 Metal: Use ES3 validation for GL_R/RG8_EXT formats 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>
Peng Huang 36eac05f 2021-10-25T15:45:36 VANGLE: change the default vulkan device choose logic 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>
Jamie Madill ca5e6f68 2021-10-27T11:28:08 Vulkan: Fix accessing stale FB cached variable. This would happen when we start a query after deleting a Framebuffer. Bug: chromium:1262091 Change-Id: I595360bf55fe1757779669f168c95be802b70da5 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3248142 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Alex Gough 1d2752d8 2021-10-26T11:41:58 disable cfguards for all deqp tests Previous attempt[0] to fix this was too precise, this now disables cfguards for angle tests at the angle_deqp (source_set, shared_library, test) level. See crbug.com/1260874 - This works around a codegen bug for Windows x86 that is blocking us landing CFG. Following now all pass: PASS: .\out\swangle\angle_deqp_gles2_tests.exe --use-angle=swiftshader --gtest_filter=dEQP.GLES2/functional_multisample_common_edge_big_quad --bot-mode PASS: .\out\swangle\angle_deqp_egl_tests.exe --use-angle=swiftshader --gtest_filter=dEQP.EGL/functional_color_clears_multi_thread_gles1_other --bot-mode PASS: .\out\swangle\angle_deqp_gles31_tests.exe --use-angle=swiftshader --gtest_filter=dEQP.GLES31/functional_state_query_texture_texture_2d_multisample_texture_swizzle_g_pure_int --bot-mode [0] https://chromium-review.googlesource.com/c/angle/angle/+/3241703 Test: CQ plus above Bug: angleproject:6617 Change-Id: I6d2647340592d3b9b5f2430d4fd077835528ef0b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3244256 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Charlie Lao 421dbf20 2021-10-26T19:06:19 Revert "Vulkan: Use different strategy for buffer memory allocation" This reverts commit 0dbe308d91a3526e28fecd9014d873c649f4ef71. Reason for revert: crbug.com/1253325 Original change's description: > Vulkan: Use different strategy for buffer memory allocation > > This CL uses different memory allocation strategy based on the requested > size. If the requested size exceeds 1M, we use dedicated memory > allocation to avoid memory waste associated with the sub-allocator. > Otherwise we uses VMA's sub-allocator pool. This CL creates two sets of > customized pool so that we uses different allocation strategy for each > set of pool: the small pool uses buddy algorithm which favors speed over > memory and large pool uses default algorithm that favors memory saving > over speed. This CL also replaces vmaFindMemoryTypeIndexForBufferInfo > with vmaFindMemoryTypeIndex to avoid create and destroy VkBuffer object > just try to find memoryTypeIndex. > > Bug: b/195588159 > Change-Id: I2bddbfffd77ba2ce6b9389d83a31051c4b748c4d > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2939490 > Commit-Queue: Charlie Lao <cclao@google.com> > Reviewed-by: Jamie Madill <jmadill@chromium.org> > Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> > Reviewed-by: Tim Van Patten <timvp@google.com> Bug: b/195588159 Change-Id: I2c8fe8cb2930d16f5212570d32be68e7c6a6e5f3 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3244258 Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Charlie Lao <cclao@google.com> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Charlie Lao 6b315a78 2021-10-26T19:04:06 Revert "Vulkan: Let BufferVk call into VMA for allocation when possible" This reverts commit 894ce75fb2f75e718ce76e466b8938524f65ac07. Reason for revert: crbug.com/1253325 Original change's description: > Vulkan: Let BufferVk call into VMA for allocation when possible > > Previously BufferVk class maintains a DynamicBuffer pool per BufferVk > object. This CL makes BufferVk skip DynamicBuffer pool in most cases and > do its own BufferHelper allocation directly. DynamicBuffer pool is only > used when desired, which is controled by a flag. With this CL, only > UBO/SSBO/AtomicBuffer will still use DynamicBuffer pool if the buffer > has to be allocated more than once. > > Bug: b/195588159 > Change-Id: I3aa08cef10ee9ee9f01f16403c6fbb99b37f4a8a > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2901241 > Commit-Queue: Charlie Lao <cclao@google.com> > Reviewed-by: Tim Van Patten <timvp@google.com> > Reviewed-by: Jamie Madill <jmadill@chromium.org> Bug: b/195588159 Change-Id: Iecda3baa6bc887fa0caa86ab076994cae7c10f93 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3244257 Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Charlie Lao <cclao@google.com> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Shahbaz Youssefi 55bd8d8f 2021-10-26T10:38:28 Translator: Fix precision bug in HLSL generation Bug: chromium:1263487 Change-Id: I60bc3dc93867e4269756b6f54eb39cf29ad77d5f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3244887 Reviewed-by: Tim Van Patten <timvp@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Tim Van Patten 9ac2409e 2021-10-26T00:55:06 Reland "Vulkan: Flush descriptor set updates during flush*Commands()" This reverts commit 420e77a64e890ad4c585d72789ca59501be3ac75. Reason for revert: The crash is in ProgramExecutableVk::getOrAllocateShaderResourcesDescriptorSet(), which is unrelated to this change. Creating a CL to reland this (the reland button is failing), to try and investigate further. Original change's description: > Revert "Vulkan: Flush descriptor set updates during flush*Commands()" > > This reverts commit 02b73c2fd738b237f1ab3ecd400feec222903a48. > > Reason for revert: Causes test to crash on Linux/Intel: anglebug.com/6591 > > Original change's description: > > Vulkan: Flush descriptor set updates during flush*Commands() > > > > The intent of this CL is to reduce the number of descriptor set updates > > by delaying the work until all of the GLES commands that could trigger a > > re-update have been performed and the command stream is being flushed. > > To achieve this, flushDescriptorSetUpdates() is being moved from > > setupDraw()/setupDispatch() to > > flushRenderPassCommands()/flushOutsideRPCommands(). > > > > This change also exposed an issue where the BufferView handles were not > > being preserved until flushDescriptorSetUpdates() was called. To resolve > > this, flushDescriptorSetUpdates() is also being called during > > BufferViewHelper::release() before the BufferView memory is released. > > > > Bug: angleproject:5706 > > Change-Id: I61e19af9c0fac891aa2115d72391459b80d22f19 > > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2939385 > > Reviewed-by: Charlie Lao <cclao@google.com> > > Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> > > Reviewed-by: Jamie Madill <jmadill@chromium.org> > > Commit-Queue: Tim Van Patten <timvp@google.com> > > Bug: angleproject:5706 > Bug: angleproject:6591 > Change-Id: I9d1ee3fcb3d1aebc86e60896e0065cab847a92b4 > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3233901 > Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> > Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Bug: angleproject:5706 Bug: angleproject:6591 Change-Id: Ibc7e934b82e6cd90e766f43135583f7c45acfe39 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3244024 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Tim Van Patten <timvp@google.com>
Charlie Lao 894ce75f 2021-05-21T10:59:14 Vulkan: Let BufferVk call into VMA for allocation when possible Previously BufferVk class maintains a DynamicBuffer pool per BufferVk object. This CL makes BufferVk skip DynamicBuffer pool in most cases and do its own BufferHelper allocation directly. DynamicBuffer pool is only used when desired, which is controled by a flag. With this CL, only UBO/SSBO/AtomicBuffer will still use DynamicBuffer pool if the buffer has to be allocated more than once. Bug: b/195588159 Change-Id: I3aa08cef10ee9ee9f01f16403c6fbb99b37f4a8a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2901241 Commit-Queue: Charlie Lao <cclao@google.com> Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Charlie Lao 0dbe308d 2021-07-16T14:26:20 Vulkan: Use different strategy for buffer memory allocation This CL uses different memory allocation strategy based on the requested size. If the requested size exceeds 1M, we use dedicated memory allocation to avoid memory waste associated with the sub-allocator. Otherwise we uses VMA's sub-allocator pool. This CL creates two sets of customized pool so that we uses different allocation strategy for each set of pool: the small pool uses buddy algorithm which favors speed over memory and large pool uses default algorithm that favors memory saving over speed. This CL also replaces vmaFindMemoryTypeIndexForBufferInfo with vmaFindMemoryTypeIndex to avoid create and destroy VkBuffer object just try to find memoryTypeIndex. Bug: b/195588159 Change-Id: I2bddbfffd77ba2ce6b9389d83a31051c4b748c4d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2939490 Commit-Queue: Charlie Lao <cclao@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com>
Alex Gough 2ca35522 2021-10-25T10:20:17 Disable cfguard for tcu/depq test files These seem to be generated with bad unwinding and cause crashes when exceptions are unwound. Specifically tcu::TestStatus RandomOrderExecutor::executeInner(TestCase *testCase, const std::string &casePath) can be built with __declspec(guard(nocf). Test: CQ .\out\swangle\angle_deqp_gles2_tests.exe --use-angle=swiftshader --gtest_filter=dEQP.GLES2/functional_multisample_common_edge_big_quad --bot-mode Bug: angleproject:6617 Change-Id: Iae75dc0f911a3430276909f4a14944d0f805fdf2 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3241703 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Kyle Piddington a02eb809 2021-10-19T20:09:43 Metal: Allow zero-sized scissors Fixes the following ES2 tests: dEQP-GLES2.functional.fragment_ops.scissor.outside_render_* A zero sized scissor is a valid scissor rectangle. Instead of ignoring this call, allow it. Bug: angleproject:6592 Change-Id: Ifc5c145b43deae4a031025b63691eb2b54c598fb Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3233935 Commit-Queue: Kyle Piddington <kpiddington@apple.com> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Gregg Tavares <gman@chromium.org>
Geoff Lang a8000240 2021-10-05T13:12:22 Don't release EGLImage refs until backends are respecified orphanImages is called before impl methods to respecify textures and renderbuffers. This can cause the backend objects to reference deleted images. TextureVk::handleImmutableSamplerTransition is one such function that is called using "previousImage". Fix this by having orphanImages return a RAII object that deletes the image when the caller chooses. In this case, after the impl methods have been called to respecify the backend data. Bug: b/194432407 Change-Id: Ifb265b4409ba43478731a1701e2409f089976b1d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3206430 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com>
Geoff Lang d2c01d2c 2021-09-17T12:57:14 GL: Allow selecting virtualization groups at context creation Rewrite EGL_ANGLE_platform_angle_context_virtualization to EGL_ANGLE_context_virtualization, changing the context virtualization parameter to an identifier for what virtualization group the frontend context should be added to. This allows ANGLE's GL backend to be used by multiple threads if the user creates contexts with different virtualization groups. Bug: angleproject:6406 Change-Id: I7414d4705ce10bdf63a9b824043d5dd040dad875 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3169193 Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Shahbaz Youssefi 48b605d8 2021-10-25T09:46:16 Vulkan: Fix UBSAN error in CommandBatch CommandBatch doesn't initialize all fields, causing UBSAN errors in the move constructor. Bug: chromium:1261861 Change-Id: I46b963a415ccc08d3d9db40de98d1968eea311e8 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3241544 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Steven Noonan b638d29d 2021-10-20T18:30:48 TransformFeedbackTest: fix buffer read overrun There were 5 floats there, but not 5 vertices (3x5 floats!). This tripped the AddressSanitizer. Bug: angleproject:6600 Change-Id: Ie3f96437b087b6ab897fdf451a90e9aac62c2403 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3235905 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Steven Noonan 584f1b78 2021-10-14T17:55:47 metal: fix crash when checking for flat attributes We can frontload the check of whether or not a shader program uses flat interpolation for its attributes. This prevents a crash where an application does: glAttachShader glLinkProgram glDetachShader glDeleteShader and the check tries to look at the shader attachments (which are no longer valid). Also add some tests to ensure that detaching shaders after program link doesn't cause crashes on indexed draws, and that the flat attribute detection works across program save/load. Bug: angleproject:6526 Signed-off-by: Steven Noonan <steven@valvesoftware.com> Change-Id: I70990808fdfd17608b4b720461cae1a0bdd064b8 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3224663 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Kyle Piddington <kpiddington@apple.com> Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com>
Steven Noonan fb82ec3c 2021-10-20T16:45:30 FramebufferTest: fix read overruns in glTexImage2D upload The dimensions specified in glTexImage2D did not match the size of the arrays of pixels. This was tripping AddressSanitizer, which noticed it was reading past the end of the arrays. Bug: angleproject:4737 Bug: angleproject:6600 Change-Id: Ie9e1705136a4b7f853b3a897e3c294c953c475f6 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3235904 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Steven Noonan 715b95f5 2021-10-20T16:44:47 DrawBuffersTest: fix use-after-free bug The objects returned by toNormalizedVector() go out of scope after the clearColor assignments are finished, so .data() pointers are invalid. This tripped AddressSanitizer. Bug: angleproject:6600 Change-Id: I1534490b38ef52202cead8c57b9462a56d09bf65 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3235903 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Steven Noonan be947198 2021-10-20T17:33:34 avoid reading past end of stack array in GetEnvironmentVar I ran into a case where GetEnvironmentVariableA returned a nonzero value, but std::string() read past the end of the oldValue array when it tried to strlen() it. It seems it tried to read an environment variable that was already huge, because MSDN says: If lpBuffer is not large enough to hold the data, the return value is the buffer size, in characters, required to hold the string and its terminating null character and the contents of lpBuffer are undefined. So if the buffer isn't large enough, it doesn't just truncate the value (like GetModuleFilenameA would). It instead returns the size we would need to allocate to store the value. It also vaguely states that the contents of the buffer are undefined in this scenario, which means that the std::array used here could still be filled with uninitialized data without a null character in there. A better solution here is to use a FastVector, so we can resize it to fit whatever variable we're reading (MSDN states the maximum environment variable size is 32,767 characters, including the null terminator -- not MAX_PATH as this code seems to have assumed). Bug: angleproject:6600 Change-Id: I1582867578c5b879e71d58ab494a5134848b180f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3235902 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Lubosz Sarnecki ee672193 2021-10-06T16:51:42 SurfaceVk: Use vkGetPhysicalDeviceSurfaceFormats2KHR. Use VK_KHR_get_surface_capabilities2 to determine if the requested color space and surface format combination is supported. Create a DoesSurfaceSupportFormatAndColorspace helper function and use vkGetPhysicalDeviceSurfaceFormatsKHR as a fallback in a new DoesSurfaceSupportFormat helper function. Treat the surface format as not supported when a non-sRGB colorspace was requested and VK_KHR_get_surface_capabilities2 is not available. Move MapEglColorSpaceToVkColorSpace to anonymous namespace. Emit angle::Result::Incomplete if a suitable surface format is not found. Bug: angleproject:2514 Bug: b/201993125 Change-Id: I28baf904cf8846ca575eaf83c93b3f593c1b63a2 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3208690 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Lubosz Sarnecki <lubosz.sarnecki@collabora.com>
Steven Noonan 9e8c929e 2021-10-20T17:19:02 FastVector: fix stack read overrun in ensure_capacity mSize should not be set until *after* calling ensure_capacity, otherwise we will read past the end of our statically allocated buffer when initializing the new array. This was caught by AddressSanitizer during one of the Vulkan BasicDraw tests, when compiling a shader to SPIR-V. Bug: angleproject:6600 Change-Id: I9ddb326d03ce5cda23973110e63d30b8829da2f6 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3235901 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi 52934a5d 2021-10-04T22:19:30 Vulkan: Use the UNDEFINED layout for ExternalPreInitialized According to the spec, the UNDEFINED layout does not invalidate the memory of external images. Bug: angleproject:6460 Change-Id: I682e8c3501cc52431268ff2c3a063467ba9d2a65 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3203796 Reviewed-by: Charlie Lao <cclao@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Steven Noonan 4c2c6bd2 2021-10-20T16:43:51 vulkan: fix read overrun in commonDebugUtilsLabel The size of the incoming string should be the 3rd argument to storePointerParameter(), not the aligned string size value. If we use the latter, we read past the end of the incoming string. This tripped the AddressSanitizer during the object label tests. Bug: angleproject:6600 Change-Id: Idd72353803661684057753f5b01bb69af1d4a141 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3235900 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Jamie Madill 7ef9ecf0 2021-10-15T14:38:03 Add GL_ANGLE_robust_fragment_shader_output. This extension codifies expected behaviour on Android, where some applications don't declare shader outputs that are active with the Framebuffer. Bug: angleproject:6566 Change-Id: I3538a0aca25b6567e4b11e40d4611f1b240579c7 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3226724 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com>
Steven Noonan 397a27bb 2021-10-20T20:33:20 VertexArray: on destroy, remove observer on element array buffer Otherwise there will be a null pointer dereference in gl::Buffer::onContentsChange(). Signed-off-by: Steven Noonan <steven@valvesoftware.com> Bug: angleproject:6599 Change-Id: I73388b6d0ccc357ca1944452a18ccf462dd8046c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3236206 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 66e8faf7 2021-10-20T14:06:08 Remove ProgramExecutable's "isCompute" property. This consolidates the lists of uniforms, ssbos, etc into one. Requires a few checks to change from graphics shader stages into all shaders. Bug: angleproject:6596 Change-Id: Ic8f6bfc4fa295c3bea9f5f1ded11e8fbca1c3164 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3233361 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Jamie Madill aac5d678 2021-10-20T11:48:57 Make "isCompute" private to ProgramExecutable. This eliminates uses of "isCompute" is the Vulkan back-end. Instead of checking the state flag, we can use the context of the current command to determine if we're running a compute or a graphics command. This will eventually lead to us being able to compile the program pipeline objects before we run a draw or dispatch command. Changes the driver uniforms descriptor desc to bind to both graphics and compute shader stages to simplify the code. This could have theoretical but low-risk performance implications. Bug: angleproject:6595 Change-Id: Ie30d419b6ece5b33f5066a034d3805fe96519b36 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3233903 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill bdc633a8 2021-10-20T12:33:42 Pass command type down to ContextImpl::syncState. This mirrors the command type passed to the object sync functions. It will be useful to determine if we're syncing for a draw or a dispatch call. Bug: angleproject:6595 Change-Id: Ia04bd14a3c2dd2eb211c47a6e55f8ddcbfedfaaa Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3233904 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Gert Wollny c621fd97 2021-10-12T20:09:49 Capture/Replay: capture some ProgramPipeline parameters Bug: angleproject:6561 Change-Id: Iff99153c0399f316d973b15fd55821a722401b07 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3220634 Commit-Queue: Gert Wollny <gert.wollny@collabora.com> Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Gert Wollny f020c713 2021-10-12T20:29:15 Capture/Replay: Allow capturing Gen/Delete with zero elements This is allowed, and hence the capture/replay should also work. Bug: angleproject:6558 Change-Id: Iae40e2870f9ff121c8396ee4c0caf0905d3fd84c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3220632 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Gert Wollny <gert.wollny@collabora.com>
Gert Wollny 8b627444 2021-10-13T10:58:40 Capture/Replay: capture program with ActiveShaderProgram too Here the program parameter is the second parameter, so UpdateCurrentProgram needs some refactoring too, to support specifying the parameter position. Bug: angleproject:6560 Change-Id: Iea08e1c0b7271bcd82aba64898cec76c09edefbb Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3220690 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Gert Wollny <gert.wollny@collabora.com>
Cody Northrop b06606b9 2021-10-20T14:45:02 Tests: Add Zillow trace Test: angle_perftests --gtest_filter="*zillow*" Bug: b/203693727 Bug: angleproject:6596 Change-Id: If1a29c452de60b124b234645953a6a8a53a35b67 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3235480 Commit-Queue: Tim Van Patten <timvp@google.com> Reviewed-by: Tim Van Patten <timvp@google.com>
Cody Northrop 5a682795 2021-10-19T18:10:43 Capture/Replay: Fix glAttachShader filtering Dota Underlords capture was filtering shaders that should be active. It is using a pattern that creates shaders in advance, then attaches them in later frames. This requires MEC to setup the shader, but not the program. We were failing to set those active because glAttachShader refers to two ShaderProgramIDs, and we've only been scanning for the first in any given API call: glAttachShader(gShaderProgramMap2[1], gShaderProgramMap2[2]); This CL fixes it by scanning for all ShaderProgramIDs in each call. Test: Dota Underlords MEC Bug: angleproject:5857 Change-Id: I1f76ad3345178cdfeb00479a84489dd363858e13 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3233875 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com> Commit-Queue: Cody Northrop <cnorthrop@google.com>
Tim Van Patten 78ae5d70 2021-10-20T12:15:33 Vulkan: Remove support for GL_RGB8 from DisplayVkAndroid The Android Vulkan loader doesn't support GL_RGB8, so remove it from DisplayVkAndroid::generateConfigs(). The list of supported swapchain formats is available at: https://cs.android.com/android/platform/superproject/+/master:frameworks/native/vulkan/libvulkan/swapchain.cpp;l=465-486?q=GetNativePixelFormat This fixes launching the Zillow app. Bug: angleproject:6277 Change-Id: I34f06e2b45a1de77864701462bf11712285b7ae2 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3235466 Commit-Queue: Tim Van Patten <timvp@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Ian Elliott <ianelliott@google.com>
Kyle Piddington 43fd49e6 2021-10-19T14:42:57 Metal: Add Shadow Sampler Grad workaround for AMD This change allows the direct translator to use emulated gradient shadow compare functions for AMD devices, and devices that don't support shadow compare sampler. Bug: angleproject:5107 Change-Id: I8cc8dcb6e6982531c2a858782869283e6dc97052 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3232818 Commit-Queue: Kyle Piddington <kpiddington@apple.com> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Kenneth Russell <kbr@chromium.org>
Jamie Madill 5ad7ae4a 2021-10-20T11:15:43 Remove Nexus 5X expectations from dEQP tests. Bug: angleproject:2322 Bug: angleproject:3308 Bug: angleproject:3309 Bug: angleproject:3434 Bug: angleproject:3715 Bug: angleproject:3716 Bug: angleproject:5169 Bug: angleproject:5184 Bug: angleproject:5665 Bug: angleproject:6527 Change-Id: If64efe229e12bb2a0bd4fe7f942899000a7aad76 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3233902 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Shahbaz Youssefi 420e77a6 2021-10-20T15:02:45 Revert "Vulkan: Flush descriptor set updates during flush*Commands()" This reverts commit 02b73c2fd738b237f1ab3ecd400feec222903a48. Reason for revert: Causes test to crash on Linux/Intel: anglebug.com/6591 Original change's description: > Vulkan: Flush descriptor set updates during flush*Commands() > > The intent of this CL is to reduce the number of descriptor set updates > by delaying the work until all of the GLES commands that could trigger a > re-update have been performed and the command stream is being flushed. > To achieve this, flushDescriptorSetUpdates() is being moved from > setupDraw()/setupDispatch() to > flushRenderPassCommands()/flushOutsideRPCommands(). > > This change also exposed an issue where the BufferView handles were not > being preserved until flushDescriptorSetUpdates() was called. To resolve > this, flushDescriptorSetUpdates() is also being called during > BufferViewHelper::release() before the BufferView memory is released. > > Bug: angleproject:5706 > Change-Id: I61e19af9c0fac891aa2115d72391459b80d22f19 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2939385 > Reviewed-by: Charlie Lao <cclao@google.com> > Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> > Reviewed-by: Jamie Madill <jmadill@chromium.org> > Commit-Queue: Tim Van Patten <timvp@google.com> Bug: angleproject:5706 Bug: angleproject:6591 Change-Id: I9d1ee3fcb3d1aebc86e60896e0065cab847a92b4 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3233901 Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Jamie Madill d8c18ac6 2021-10-08T13:00:19 Re-land: "Isolate commit_id.h from other code." Re-land limits the angle_version deps to Windows to fix an iOS visibility rule violation in GN. Instead of recompiling multiple source files, we can seal off the files that include commit_id to prevent recompilations when the commit changes and source files don't change. Bug: angleproject:2551 Change-Id: I033f00ec7afe4bfd01e29e0eea8848eea27747a0 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3233899 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Shahbaz Youssefi 4b75345a 2021-10-06T22:47:16 Vulkan: Don't create pipeline with depthWrite if !depthTest depthWrite is ineffective without depthTest. This change makes sure that depthWrite/depthTest combinations of true/false and false/false generate the same Vulkan pipeline. Bug: angleproject:6410 Change-Id: I47e1524379d40dfb956f026903e0affc7f4fc59d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3210628 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com>
Mohan Maiya 9a7b62ad 2021-10-19T15:21:31 Remove glext_angle.h, merge contents into gl2ext_angle.h Currently glext_angle.h file, which is for GLES 1.x, has enums for GL_ANGLE_yuv_internal_format which is an ES 3.0+ extension. Merge contents of glext_angle.h into gl2ext_angle.h and remove glext_angle.h Bug: angleproject:6579 Change-Id: Iec5427af131888a2d9c473f4f497afb71dcafdac Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3232822 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Shahbaz Youssefi 066fb91b 2021-10-18T15:31:27 Vulkan: SPIR-V Gen: Handle scalar(const) produced by index clamp Normally scalar(const) is folded into a constant. The index clamp transformation may produce such a code where the index looks dynamic at first (for example `false ? uniform_value : constant`), but becomes constant after folding. This change makes SPIR-V generation robust in that case. A potential future change could avoid the clamp entirely by making FoldExpressions adjust the op of the EOpIndexIndirect node whose index is being replaced with a constant with EOpIndexDirect (and apply the clamp on the argument). Bug: chromium:1260651 Change-Id: I552b7527d821d1cb52e0e53212cc481285674861 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3226311 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com>
Shahbaz Youssefi ef237faf 2021-10-18T16:22:40 Translator: Validate precision for function args In fragment shaders, float does not have a default precision. Any declaration of this type must therefore specify the precision if a default one is not provided. This was not validated for function arguments. Bug: chromium:1255089 Change-Id: I0d17e226ec88610692ec7dd18793cf4d471f12e7 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3226314 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Tim Van Patten 02b73c2f 2021-07-14T15:45:47 Vulkan: Flush descriptor set updates during flush*Commands() The intent of this CL is to reduce the number of descriptor set updates by delaying the work until all of the GLES commands that could trigger a re-update have been performed and the command stream is being flushed. To achieve this, flushDescriptorSetUpdates() is being moved from setupDraw()/setupDispatch() to flushRenderPassCommands()/flushOutsideRPCommands(). This change also exposed an issue where the BufferView handles were not being preserved until flushDescriptorSetUpdates() was called. To resolve this, flushDescriptorSetUpdates() is also being called during BufferViewHelper::release() before the BufferView memory is released. Bug: angleproject:5706 Change-Id: I61e19af9c0fac891aa2115d72391459b80d22f19 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2939385 Reviewed-by: Charlie Lao <cclao@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Tim Van Patten <timvp@google.com>
Gregg Tavares bf42f009 2021-10-19T11:25:20 Update bug number for point clipping AMD metal Bug: angleproject:6589 Change-Id: Ibc33b9870ab566c2b36caa2b6ccdeb256078d3cf Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3232286 Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Gregg Tavares 83bb2705 2021-10-19T15:20:41 Update bug numbers in dEQP test expectations Bug: angleproject:6080 Change-Id: Ic0fa2c41b9a132cdebfd81dfd6137cf6623632c0 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3232820 Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Lubosz Sarnecki d3753039 2021-10-14T17:21:47 Reland "RendererVk: Enable VK_KHR_image_format_list on SwiftShader." This is a reland of 8559d50b3b6fcc71b939be4a2c0ca3b48a797d61 Original change's description: > RendererVk: Enable VK_KHR_image_format_list on SwiftShader. > > This reverts commit 08b42714f51dc87e16d52757b4b115037218a4ba. > > Bug: angleproject:5281 > Bug: chromium:1245774 > Change-Id: I773d95225301ccf3c2807fd2269b6d7da1195a16 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3223679 > Commit-Queue: Lubosz Sarnecki <lubosz.sarnecki@collabora.com> > Commit-Queue: Jamie Madill <jmadill@chromium.org> > Reviewed-by: Jamie Madill <jmadill@chromium.org> Bug: angleproject:5281 Bug: chromium:1245774 Bug: chromium:1260941 Change-Id: Ic6992bcc4b44aa16a2931271350a6f6d2a23d9c8 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3232555 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Gert Wollny eee3936b 2021-10-12T20:08:27 libANGLE: Assert on mExecutable when syncing images In the loop in syncImagesInit mExecutable is dereferenced and mProgram is not even touched, so assert on mExecutable Bug: angleproject:6557 Change-Id: Icf482bda281c574e952113a97cbaf1e1d93fc1e3 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3220631 Commit-Queue: Gert Wollny <gert.wollny@collabora.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Shahbaz Youssefi e637e4c9 2021-10-18T13:54:00 Vulkan: Optimize updating blend state in pipeline desc Updating blend funcs and equations always updated all 8 slots. Now that's only done for the attachments that are present. Bug: angleproject:6298 Change-Id: I58fa7e4dfa27d05fef54cc9d56c7b2aa5ef43dd8 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3202550 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com>
Shahbaz Youssefi 7defdb60 2021-10-19T14:07:07 Revert "Isolate commit_id.h from other code." This reverts commit 6d7ebf656d06f1152967aa5f4457d3787a24732c. Reason for revert: Suspected reason for failing ANGLE roll into Chromium Original change's description: > Isolate commit_id.h from other code. > > Instead of recompiling multiple source files, we can seal off the > files that include commit_id to prevent recompilations when the > commit changes and source files don't change. > > Bug: angleproject:2551 > Change-Id: I98800c5a8e04ec7d4c3e57ea0eb3b636d3b224bb > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3212895 > Commit-Queue: Jamie Madill <jmadill@chromium.org> > Reviewed-by: Geoff Lang <geofflang@chromium.org> > Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Bug: angleproject:2551 Bug: angleproject:6588 Change-Id: I19f41141f57d0683efb9a4ec043e078a9f7dc925 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3226056 Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Shahbaz Youssefi 4bb0a7af 2021-10-18T12:14:04 Vulkan: Async Queue: Fix signal of external semaphores Per the Vulkan spec: > ... when a semaphore wait operation is submitted to a queue: > > - A binary semaphore must be signaled, or have an associated semaphore > signal operation that is pending execution. It is incorrect for ANGLE to defer the submission that signals an external semaphore, because then it's impossible for the application to know when it can wait on the semaphore. Bug: angleproject:6574 Bug: b/172704839 Change-Id: I5469b500b2f7d402acec31d9848585a9947843c6 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3226308 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi c9e0da8e 2021-10-18T13:54:00 Vulkan: Improve wording in DeferredClears.md Bug: angleproject:1944 Change-Id: I268e8191cfb7aeb16e33c1f9b39382461c5ac3e7 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3226310 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Mohan Maiya <m.maiya@samsung.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Gert Wollny 1d1b7573 2021-10-13T09:24:53 Capture/Replay: Skip binary formats test when none are supported During capture/replay the number of supported binary formats is set to zero, so the test can't run successfully, hence skip it. Bug: angleproject:6559 Change-Id: Iabff38669bd6bbbbec770888ae940be3961b136e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3220633 Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Gert Wollny <gert.wollny@collabora.com>
Shahbaz Youssefi 7f87a326 2021-10-18T13:06:29 Vulkan: SPIR-V Gen: Fix crash in array of struct constant Bug: chromium:1260690 Change-Id: I51fe85a2ebc23c3fcaa3c961c4ebf84688bbed31 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3226309 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com>
Shahbaz Youssefi 9a323cd0 2021-10-18T22:02:46 Vulkan: Suppress failing test on AMD/Linux EXTBlendFuncExtendedDrawTest.FragData/* has started flaking for an unknown reason. This test has multiple suppressions for the Vulkan backend on different hardware. Bug: angleproject:6585 Change-Id: I7b97c8210a0846bbc6935812fcad743291c516be Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3230522 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi bb0e0dea 2021-10-18T21:46:44 Roll vulkan-deps from 5be75e2ae595 to a9d8c46f2b61 (6 revisions) https://chromium.googlesource.com/vulkan-deps.git/+log/5be75e2ae595..a9d8c46f2b61 Changed dependencies: * spirv-tools: https://chromium.googlesource.com/external/github.com/KhronosGroup/SPIRV-Tools.git/+log/06ebc4806b..35fd0e17d0 * vulkan-loader: https://chromium.googlesource.com/external/github.com/KhronosGroup/Vulkan-Loader.git/+log/6d9e5b07d6..61688e09fe * vulkan-validation-layers: https://chromium.googlesource.com/external/github.com/KhronosGroup/Vulkan-ValidationLayers.git/+log/77cd59ba80..78b1f89454 If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/vulkan-deps-angle-autoroll Please CC syoussefi@google.com on the revert to ensure that a human is aware of the problem. To file a bug in ANGLE: https://bugs.chromium.org/p/angleproject/issues/entry To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md Bug: angleproject:6584 Change-Id: I8da9da9f82ccaf781d89a4f7975fb7520d3b6b28 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3226052 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Cody Northrop e2e77baa 2021-10-18T16:04:43 Revert "Revert "Translator: Remove the SH_VALIDATE flag"" This reverts commit 701e8892f45e6f416dcbb0d23a155d346d0280fa. Reason for revert: Chromium dependency fixed in http://crrev/c/3214440 Original change's description: > Translator: Remove the SH_VALIDATE flag > > The SH_VALIDATE flag is a noop, defined as zero (0). > > Also move option descriptions up in the file. > > Bug: angleproject:6501 > Change-Id: I898106eb68b4508d8f94534cbff66652a69f4f3e > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3207360 > Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> > Commit-Queue: Cody Northrop <cnorthrop@google.com> Bug: angleproject:6501 Change-Id: I4d1514d6ac04e5bedf3624facf8e9339828fa291 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3229955 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi 670b58d8 2021-10-18T19:50:10 Revert "RendererVk: Enable VK_KHR_image_format_list on SwiftShader." This reverts commit 8559d50b3b6fcc71b939be4a2c0ca3b48a797d61. Reason for revert: Causes MSAN failures. See crbug.com/1260941 Original change's description: > RendererVk: Enable VK_KHR_image_format_list on SwiftShader. > > This reverts commit 08b42714f51dc87e16d52757b4b115037218a4ba. > > Bug: angleproject:5281 > Bug: chromium:1245774 > Change-Id: I773d95225301ccf3c2807fd2269b6d7da1195a16 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3223679 > Commit-Queue: Lubosz Sarnecki <lubosz.sarnecki@collabora.com> > Commit-Queue: Jamie Madill <jmadill@chromium.org> > Reviewed-by: Jamie Madill <jmadill@chromium.org> Bug: angleproject:5281 Bug: chromium:1245774 Bug: chromium:1260941 Change-Id: Id6712aed68ed04d2525549ae016594aa05243a5d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3226312 Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Tim Van Patten eb1d2474 2021-10-04T20:23:26 Vulkan: Add R8G8B8_UNORM to vk_format_map.json The map of R8G8B8_UNORM -> VK_FORMAT_R8G8B8_UNORM is missing from vk_format_map.json. This leads to attempting to get format bits for angle::FormatID::NONE / VK_FORMAT_UNDEFINED. This CL adds R8G8B8_UNORM to vk_format_map.json, so devices that support it, like ARM, can use it. This allows those devices to import AHBs created with R8G8B8_UNORM. This CL also adds some additional ASSERT() and UNREACHABLE() calls to catch missing formats sooner. This allows the EGL tests to pass on ARM devices, but the tests are still skipped due to Qualcomm not having the necessary support for optimal tiling. Bug: angleproject:6277 Test: dEQP-EGL.functional.image* Change-Id: I41b7ead97a10ae80be4b6048d36d0d85ad71784f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3204152 Commit-Queue: Tim Van Patten <timvp@google.com> Reviewed-by: Charlie Lao <cclao@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi 8996b1e6 2021-10-18T12:13:09 Vulkan: Suppress failing async queue tests Bug: angleproject:6574 Change-Id: I2da6c65a43cc53bd6100c7be1a325d56766a175a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3226307 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Peter Kasting bcd3ae61 2021-10-18T09:36:49 Fix some instances of -Wshadow. Bug: chromium:794619 Change-Id: I5efe04e64800455585438467bcf6c262e91f398d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3229095 Commit-Queue: Peter Kasting <pkasting@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 6d7ebf65 2021-10-08T13:00:19 Isolate commit_id.h from other code. Instead of recompiling multiple source files, we can seal off the files that include commit_id to prevent recompilations when the commit changes and source files don't change. Bug: angleproject:2551 Change-Id: I98800c5a8e04ec7d4c3e57ea0eb3b636d3b224bb Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3212895 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Shahbaz Youssefi ddedcdaf 2021-10-14T23:35:45 Vulkan: Recycle vkAcquireNextImageKHR semaphores This change optimizes CPU performance by recycling semaphores used for ANI instead of creating and deleting them every frame. Bug: angleproject:6580 Change-Id: I151ea227870ed7b8bd123cbf629a65723c4696d2 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3225085 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Ian Elliott <ianelliott@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 87b4f0fb 2021-10-18T08:52:29 Suppress colorspace trace tests. These were recently enabled with a Vk SwiftShader CL. Bug: angleproject:6578 Change-Id: I5f6716f3c8a4c314d0679f8393532b25f9f5c032 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3226303 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Shahbaz Youssefi f3334d03 2021-09-30T23:44:54 Vulkan: Fix importing layered AHBs Bug: angleproject:6475 Change-Id: Iceb0880cadc54552d3f01593d2e12088cafa10cc Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3198733 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Ian Elliott 6c448659 2021-10-15T15:43:18 Improve EGL validation errors Improvements: - Report the numeric value of a bad attribute - Show the requested/desired/unsupported version and the max version - Correct printf attribute set and previous errors fixed Bug: b/186543601 Change-Id: I889f2384afbe134496cad9e349766b7ff756dcee Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3224566 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Gregg Tavares eb9b3f8e 2021-10-14T17:10:23 Update bug for intel metal mip test expectations Bug: angleproject:6571 Change-Id: I3a7c46ad479b4fc5d15e261269a12742c841a955 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3224101 Commit-Queue: Kenneth Russell <kbr@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Gregg Tavares 6cd1a0a5 2021-10-14T17:32:42 Metal: Update test expectations for AMD filtering issue Also adjust suppressions for incorrect lodMinClamp application on Intel GPUs. Bug: angleproject:6466 Bug: angleproject:6534 Bug: angleproject:6571 Change-Id: I574e0e92111c8d0a6021fe90f7a2076103435975 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3224662 Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Brandon Jones <bajones@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Kenneth Russell <kbr@chromium.org>
Charlie Lao 22ecd454 2021-07-19T17:28:05 Vulkan: Move BufferMemory class from vk_helpers.h to vk_utils.h In preparation for the StagingBuffer may also use BufferMemory, this CL moves the class to vk_utils.h so that it can be used by any class without create kinks on header file inclusion. Bug: b/195588159 Change-Id: I97ab136be691322fe6284fd1b4b7336fdf1f904f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3040106 Commit-Queue: Charlie Lao <cclao@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com>
Jonah Ryan-Davis 60271a71 2021-10-15T10:14:35 GL: Re-scope Intel/Mesa version for disableSyncControlSupport. This workaround's scope was widened due to issues detecting intel GPUs in systems with multiple GPUs. That was fixed, so we can re-scope the workaround. Bug: chromium:1187475 Change-Id: Iaf946369273dc5c1e2f8f91a14758b6751615c7f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3226721 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
Shahbaz Youssefi f5d65922 2021-10-14T15:58:38 Vulkan: Optimize QueryVk::getResult() This function always incurred a check for completed commands to ensure forward progress for applications (or rather, tests) that busy-wait until the query results become available. This change instead does an initial isCurrentlyInUse() check and only if that's true will it check to see if there are any finished commands. This should reduce one checkCompletedCommands() call when the application queries the status of the Query well after it's issued. Based on patch authored by Igor Nazarov <i.nazarov@samsung.com> Bug: angleproject:6573 Change-Id: Iad4ed6b7eb6ae5316707e6d916e5ca3054d6c5aa Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3225083 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Charlie Lao 8ef1b2a2 2021-07-15T15:27:15 Vulkan: Add BufferMemoryAllocator class BufferMemoryAllocator class will be responsible for memory allocation for vkBuffers. The original Allocator class remains the wrapper for vmaAllocator. Bug: b/195588159 Change-Id: I26d016e2f8d13ba459d0aa0bd4e1ebf4d0d48251 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3036256 Commit-Queue: Charlie Lao <cclao@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com>
Shahbaz Youssefi 7aba3bc5 2021-10-14T23:14:37 Vulkan: Use a CircularBuffer helper class in SurfaceVk There are two instances of circular buffer in SurfaceVk. A common helper class is introduced by this change to consolidate the implementation. This is in preparation for a follow up change that introduces yet another circular buffer in this class. Bug: angleproject:6401 Change-Id: Id01b585567310a2528888114239a5c80ff93f1ee Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3225084 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Ian Elliott <ianelliott@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Shahbaz Youssefi 57b73c07 2021-10-14T15:51:18 Vulkan: SPIR-V Gen: TODO clean up This change removes a number of stale TODOs. Bug: angleproject:4889 Change-Id: If21d55717e61383ffdd58a7f88da5961988e035f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3223643 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com>
Jamie Madill 123ba58d 2021-10-14T11:56:35 Vulkan: Remove "last submitted serial". This fixes race conditions with the async command processor. Instead of querying specific serial numbers, we ask the command queue to either wait for idle, or return the answer to "are you busy" directly. Bug: b/172704839 Change-Id: I06a8268d9b58d8c33b783af00ca74979ee158316 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3223641 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi b3d77208 2021-10-14T15:38:51 Vulkan: SPIR-V Gen: Make unfolded constants SPIR-V constants If a constant is not folded by the translator, for example because it's an array, this change makes sure that it becomes a constant in SPIR-V anyway. This is particularly important to support cases where a constant is required, for example as argument to textureGatherOffsets(). Bug: angleproject:4889 Bug: angleproject:5362 Change-Id: Ic43e4be13a8917bb100ea64902ba90048cfbb9ee Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3223642 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
YuxinHu 2aa5286d 2021-10-12T17:05:48 Add Entry Point name to validation errors Add gl/gles entry point names to validation error messages some special cases: 1. Debug::insertPerfWarning() is invoked from multiple places, such as TextureVK, ContextVK, adding an extra entryPoint function parameter in these files will need extra investigations. I am passing the entryPoint name GLInvalid as a temp workaround. 2.ErrorSet::hangleError() is invoked from multiple Context*.cpp files, adding an extra entryPoint function parameter in these files will need extra investigations. I am passing the entryPoint name GLInvalid as a temp workaround. 3. Debug::insertMessage(), Debug::popGroup(), Debug::pushGroup() can be invoked from more than one GL entry points, e.g. Debug::pushGroup() can be invoked from either GL_APIENTRY GL_PushDebugGroup() or GL_APIENTRY GL_PushDebugGroupKHR() through context->pushDebugGroup() call. Right now the same entry point name glPushDebugGroup will be printed out in the error message for both cases. However, we should be able to tell the actual entry point by checking which version: KHR version or core version the application uses, and this helps avoid the confusion. For now we will let the same entry point name getting printed for both cases. Bug: angleproject:6523 Change-Id: I64a5463d9168d8444d376d1f428c3b3d894f2ea9 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3215063 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Yuxin Hu <yuxinhu@google.com>
Kenneth Russell 9d3ec7d7 2021-10-14T13:50:59 Mac: suppress frequent test flakes on OpenGL backend. Mac/NVIDIA: ClearTest.ChangeFramebufferAttachmentFromRGBAtoRGB This test is crashing very frequently for an as-yet-unknown reason. The NVIDIA MacBook Pros are not a critical testing configuration, so skip this test for the time being to stabilize the CQ. Mac/Intel: WebGLCompatibilityTest.L32FTextures WebGLCompatibilityTest.R32FTextures WebGLCompatibilityTest.RGB32FTextures These tests are occasionally failing with incorrect rendered pixel values again for unknown reasons. Mark these as failing on this configuration for the moment. Bug: angleproject:6570 Change-Id: Ic9e3c5f8d06a1555a4b1dfed2d9495e98c32abf1 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3224361 Commit-Queue: Yuly Novikov <ynovikov@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 1dc2b702 2021-10-13T16:02:37 Vulkan: Pass shader module map to init pipelines. Instead of pulling out the shader modules from the shader map when we start the call chain, pull them out right in the init call. This saves a bunch of boilerplate code. Refactoring change only. Bug: angleproject:6566 Change-Id: Ib8d79bd7284d7ddb83522270f3d4df9086ab7300 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3221134 Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Lingfeng Yang 2615e6b2 2021-10-07T07:07:46 Remove the syncFramebufferBindingsOnTexImage workaround It's unused Bug: angleproject:6503 Change-Id: Ia9039432006ec6988e93db08b9a572c7a7f837ed Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3212428 Commit-Queue: Lingfeng Yang <lfy@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Lubosz Sarnecki 8559d50b 2021-10-14T17:21:47 RendererVk: Enable VK_KHR_image_format_list on SwiftShader. This reverts commit 08b42714f51dc87e16d52757b4b115037218a4ba. Bug: angleproject:5281 Bug: chromium:1245774 Change-Id: I773d95225301ccf3c2807fd2269b6d7da1195a16 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3223679 Commit-Queue: Lubosz Sarnecki <lubosz.sarnecki@collabora.com> Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Cheryl Wei b95cdec3 2021-10-12T11:26:15 Vulkan: Switch to `std::unordered_map` to cache renderpass ANGLE use `flat_hash_map` by default,while it will not retain pointer stability which causes random null pointer issue when running MH31 with asynccommandqueue.This change switch to using `std::unordered_map` to cache renderpass. Bug: angleproject:6436 Bug: angleproject:6569 Change-Id: Ia2829a41251eea39ce2a79a9a42b6fe9dff6b120 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3219010 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi f3d5dac3 2021-08-23T17:25:15 Vulkan: SPIR-V Gen: Drop dependency to glslang The SPIR-V gen path is now made default. Compilation through glslang is still supported for debugging, and is enabled on the GLSL* end2end tests for smoke testing. On release builds, glslang is not supported. To test with glslang, add the following gn arg (only necessary if dcheck is disabled): angle_enable_spirv_gen_through_glslang = true Then enable the generateSPIRVThroughGlslang feature. This can be done by setting an environment variable: ANGLE_FEATURE_OVERRIDES_ENABLED=generateSPIRVThroughGlslang ./angle_deqp_gles2_tests Binary size saving: - 1.3MB on Linux (SPIR-V gen itself: 240KB) - 730KB on Android (SPIR-V gen itself: 140KB) Perf tests: - LinkProgramBenchmark.Run/vulkan_compile_single_thread * Through glslang: truncated mean: 1287033.36 * Direct SPIR-V Gen: truncated mean: 244495.91 (~80% reduction) - LinkProgramBenchmark.Run/vulkan_compile_multi_thread * Through glslang: truncated mean: 4565894.83 * Direct SPIR-V Gen: truncated mean: 1158164.10 (~75% reduction) Bug: angleproject:4889 Bug: angleproject:6210 Change-Id: I486342702977c8114e90073b97183aba115a8b2d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3115140 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com>
Aditya Kushwah d8471b29 2021-10-02T10:36:33 Fix ASAN bug caused by passing empty label string. This CL will fix the ASAN bug that was caused by passing empty label string to getMultisampledRenderTarget, function of TextureStorage11. Instead, pass mTextureLabel so we can get WebGL labels now. Also to avoid this in future, convert ref mTextureLabel to now store copy. The change in the test reflects the steps to first set the label string and later the label being used to initialize mTextureLabel via texture storage creation. Bug: chromium:1254746 Change-Id: I007bdf1c7a421a2b4b9288aa71fa4368c14cf333 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3201030 Reviewed-by: Rafael Cintron <rafael.cintron@microsoft.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Rafael Cintron <rafael.cintron@microsoft.com>
Charlie Lao ea580484 2021-10-05T13:40:01 Vulkan: Add feature flag to prefer CPU copy instead of staged update For ARM GPU, use GPU to do buffer to buffer copy has performance penalty due to potential bubble in the vertex pipeline. This CL adds a feature flag preferCPUForBufferDataSubData so that we can enable this behavior for ARM GPUs. This CL also tracks if GPU has referenced this BufferVk's storage since it got new storage. Due to sub-allocation, we may get a new sub-range of the same BufferHelper object when allocating new storage. But we currently do not have a way to track GPU progress of the sub-range of a buffer. So we will end up using BufferHelper's queueSerial to decide if it is still GPU busy or not. This CL adds mHasBeenReferencedByGPU boolean variable that will set to false when we got a new allocation and set to true as soon as buffer is been referenced by any GPU command. We use this to avoid checking queueSerial if it never been referenced by GPU. This is a temporary workaround for the bug, the full fix is tracked by https://issuetracker.google.com/201826021 Bug: b/200067929 Change-Id: I231fb0a678b0165a2ce1775d0aa4dbe7512fb4a8 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3183398 Commit-Queue: Charlie Lao <cclao@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com>
Charlie Lao 9a48ad4e 2021-10-05T17:45:48 Vulkan: Add test for acquireAndUpdate Add two new tests to IndexBufferOffsetTestES3 tests that will call bufferSubData with more than 1/2 buffer size, which will force vulkan backend go into a different code path. Bug: b/200067929 Change-Id: Id831982bbb044a529e9711be62d82f3e8c05e1a7 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3213415 Commit-Queue: Charlie Lao <cclao@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com>
Jamie Madill 100ebfd7 2021-10-13T12:07:21 Revert "Re-enable PoolAllocatorAlignmentTest.Alignment" This reverts commit 7eada73ac4964df5ffd539efb7a0569a97e4fd3d. Reason for revert: Breaking Lollipop tester likely b/c of 32-bit issues. Bug: chromium:1259544 Original change's description: > Re-enable PoolAllocatorAlignmentTest.Alignment > > The PoolAllocatorAlignmentTest.Alignment/64 variant of the test fails on > windows/debug, so this change re-enables this test everywhere except for > that variant (and speculatively /128) on windows. > > Bug: angleproject:6536 > Change-Id: Ibc4fcbe04e7579f3ad7eb68f4f460078ee27ac88 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3212329 > Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> > Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Bug: angleproject:6536 Change-Id: I74ebf1c78c8b15c14c9d1496948adafd13e0d2ba No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3220971 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Shahbaz Youssefi 558eda6e 2021-10-12T15:34:45 Vulkan: Remove provoking-vertex structs from "custom" list This extension has been released. Bug: angleproject:4063 Change-Id: I007c20a895819aa11382837a3ad654839e127365 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3217938 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Gert Wollny bb5dbd49 2021-10-05T11:57:44 Capture/Replay: Handle TvoidPointer in specialization Bug: angleproject:6521 Change-Id: I863ad5307498e6394f5fbe3e650ce29c821083b1 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3204960 Commit-Queue: Gert Wollny <gert.wollny@collabora.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Charlie Lao 43be4d9c 2021-10-11T13:50:28 Vulkan: Fix unnecessary performance warnings for two tests Fix two existing tests so that it wont generate performance warnings that is not related to the test and not intended anyway. Bug: b/200067929 Change-Id: I64a9272be077c536627644ae44104d98cecee7cd Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3218270 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Charlie Lao <cclao@google.com>