src/tests/gl_tests/StateChangeTest.cpp


Log

Author Commit Date CI Message
Jamie Madill 4ebdac79 2022-08-29T16:25:46 Vulkan: Ensure we sync the draw FB before beingQuery. Bug: chromium:1354271 Change-Id: I5fe3649d9d39de37d0a59c80a4f31a17d1a72838 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3863145 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Shahbaz Youssefi ba3b4515 2022-09-15T01:06:51 Vulkan: Implement GL_ANGLE_logic_op Enabled if the logicOp device feature is available. According to gpuinfo, it's pretty much universal except for ARM. Bug: angleproject:7654 Change-Id: I4808b519fdd6273b2f8c1bb17f59517eb65bfe8d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3898317 Reviewed-by: Yuxin Hu <yuxinhu@google.com> Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi 97926f80 2022-09-15T00:10:49 GL: Implement GL_ANGLE_logic_op Enabled only on Desktop GL where logic op is available. Bug: angleproject:7654 Change-Id: I3c17ffb5b21abf31aec247319a625526f1bec37d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3898316 Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Shahbaz Youssefi 952d6e8f 2022-08-21T21:51:03 Vulkan: Workaround ARM driver bug with dynamic vertex strides According to ARM, vkCmdBindVertexBuffers2EXT is broken when more than one attribute binding is involved. In this change, the vertex strides dynamic state is avoided altogether on ARM. Bug: fuchsia:107106 Change-Id: Ie41fc07037083214d2dc99e4ed062485384911c5 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3844640 Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Yuxin Hu <yuxinhu@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi d5308602 2022-08-05T15:46:29 Test for ARM bug with dynamic stencil write mask Bug: b/240755039 Change-Id: If7025f3b2450735a099da3cc11524f778f2ac654 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3812559 Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Eddie Hatfield 89e38b57 2022-06-22T15:04:08 Refactor to use ANGLETest vs ANGLETestWithParam Bug: angleproject:6747 Change-Id: I72ad52d0268eae0e1a401f12f3e94cc5efa402f2 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3719002 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Shahbaz Youssefi ae3de1a8 2022-05-25T23:35:38 Add test for primitive state change Bug: angleproject:5906 Change-Id: Iacae148dbf8d2be08f352d5ccc4a727e6c5247e8 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3668831 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Shahbaz Youssefi 688553c0 2022-05-16T23:27:29 Vulkan: Dynamic state for primitive restart enable Bug: angleproject:5906 Change-Id: Ida2cbe904604c638fd3a8ab498d49584dfd9c860 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3651593 Reviewed-by: Yuxin Hu <yuxinhu@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi 3b78e0d5 2022-05-16T23:13:57 Vulkan: Dynamic state for depth bias enable Bug: angleproject:5906 Change-Id: I679a764e0a9ef74cc8a58f9061b42c0aaef56df2 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3651592 Reviewed-by: Yuxin Hu <yuxinhu@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi 7c83a363 2022-05-16T22:22:44 Vulkan: Dynamic state for rasterizer discard enable Interaction with primitives generated query are tested by those tests added in https://chromium-review.googlesource.com/c/angle/angle/+/2976181 Bug: angleproject:5906 Change-Id: I0ab9f54995504be770a93bf13337a5ffe20bf7eb Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3651582 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuxin Hu <yuxinhu@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi 58fd3157 2022-05-12T00:01:19 Vulkan: Dynamic state for vertex stride Bug: angleproject:5906 Change-Id: I73b7e004fc25bf3777982736412adc1ca57504b9 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3644856 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Steven Noonan 6ae0c321 2022-05-15T18:18:47 Vulkan: clamp dynamic line width to supported values On my Apple M1, MoltenVK reports wide lines are not supported. Trying to use vkCmdSetLineWidth with any value other than 1.0f will cause MoltenVK to throw an exception and stop accepting render commands. I originally tried making this a change in the frontend Context class, by clamping the value to the supported line width range. But that approach failed the WebGL conformance tests, because queries of of GL_LINE_WIDTH must match the value specified by glLineWidth. OpenGL ES docs state: The line width specified by glLineWidth is always returned when GL_LINE_WIDTH is queried. Clamping and rounding have no effect on the specified value. Bug: angleproject:7317 Change-Id: I7a3c3454e1483f9124fd70b7e9f2138bd717e1de Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3654264 Auto-Submit: Steven Noonan <steven@valvesoftware.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi 891a4682 2022-05-12T22:32:07 Vulkan: Dynamic state for stencil test/op Bug: angleproject:5906 Change-Id: I436c6c238a15e54919a74d2a697d1f114bb3eaf9 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3647207 Reviewed-by: Yuxin Hu <yuxinhu@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Shahbaz Youssefi 66dcca5e 2022-05-12T11:14:27 Vulkan: Dynamic state for depth test/write/op Bug: angleproject:5906 Change-Id: Ie48a0780406c6dbbdd47639f2e185dc854879140 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3646429 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Yuxin Hu <yuxinhu@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Shahbaz Youssefi 48b1f07b 2022-05-11T15:20:24 Vulkan: Dynamic state for front face Bug: angleproject:5906 Change-Id: I649b9d2ab10daac6831f0ecb23f8211d3963c8c1 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3643098 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Shahbaz Youssefi 4e5da2d2 2022-05-11T13:58:07 Vulkan: Dynamic state for cull mode Bug: angleproject:5906 Change-Id: I3d7b888e7999d4892ff71d636ea16a2edcf7a27f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3642800 Reviewed-by: Yuxin Hu <yuxinhu@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi 4ffab3bf 2022-05-10T16:17:54 Vulkan: Dynamic state for stencil reference Bug: angleproject:5906 Change-Id: I1aaf54208b173ca58ff1afd2900eca7ee78726cf Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3638990 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuxin Hu <yuxinhu@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi 1d8227da 2022-05-10T16:00:39 Vulkan: Dynamic state for stencil write mask Bug: angleproject:5906 Change-Id: I74adf56ec0b7b251ab3c5204b68b062d5fbc91eb Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3638989 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuxin Hu <yuxinhu@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi c3def6fa 2022-05-10T14:28:04 Vulkan: Dynamic state for stencil compare mask Bug: angleproject:5906 Change-Id: Ie581c6e9fe15c90c7a6d0c7c246dd5b1b30b6507 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3638988 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Shahbaz Youssefi dcaa18b9 2022-05-10T12:27:15 Vulkan: Dynamic state for blend color Bug: angleproject:5906 Change-Id: If450e0d84410069126027142414586181fd5f0de Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3638986 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuxin Hu <yuxinhu@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi 536d6f57 2022-05-10T11:44:58 Vulkan: Dynamic state for depth bias Bug: angleproject:5906 Change-Id: I8fd7e3262fddf3aec855afdd3e4c1b9801040da1 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3638983 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuxin Hu <yuxinhu@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi 780f1a41 2022-05-10T00:30:35 Vulkan: Dynamic state for line width Bug: angleproject:5906 Change-Id: Iacf9c14d9d255c8048c71c725173e4764bcfe166 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3634733 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Yuxin Hu <yuxinhu@google.com>
SeongHwan Park a8cac005 2022-04-25T16:27:33 Remove observer when element array buffer is detached Fix an issue where the observer is not removed when the element array buffer is detached from the vertex array. This fixes use-after-free vulnerability. Bug: angleproject:7237 Change-Id: I7cf30322740edffccdba89d40c0d02cd351dad78 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3603007 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Stephen White 6e130d2b 2022-04-19T11:35:46 D3D: fix SSBOs used in vertex shaders. Use the total number of pixel shader outputs as the base UAV register for vertex and pixel shaders. This is less fragile than making the vertex shader depend on the number of draw-time pixel shader outputs. Add a test that exercises SSBOs in vertex shaders, varying the number of draw-time pixel shader outputs (which should have no effect on register assignment). Bug: angleproject:7156 Change-Id: I5801d59299275ea6d2569456d53c230e7e8ee5a9 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3579501 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Stephen White <senorblanco@chromium.org>
Shahbaz Youssefi 797e627e 2022-04-08T22:49:51 Autogenerate list of features as enum The WithX() and WithNoX() helpers are removed and replaced with enable() and disable() member functions that take the name of the feature (as a Feature::X enum constant). This has two benefits: - Adding tests that override a feature no longer requires additional helper functions to be written. - There's no mistaking the feature name. This change doesn't yet fix the main issue in anglebug.com/6435, but does fix the following helpers using an old feature name (so they were ineffective): - WithMetalForcedBufferGPUStorage - WithNoVulkanViewportFlip A follow up would remove the old way of overriding features in tests and replaces them with the new way. Bug: angleproject:6435 Change-Id: Ida02b26ec72bc40d7a8938c76a93815bb903ca05 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3580982 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Stephen White 6803a2d0 2022-04-01T16:52:49 D3D11: implement SSBOs in pixel and vertex shaders. Since the 'u' register space for UAVs in pixel shaders is shared with render targets, and the number of render targets may vary depending on GL state, this required deferring register allocation until draw-time output in DynamicHLSL. Since non-compute shaders aren't able to immediately output the SSBO declaration, initial register allocation was broken out from ResourcesHLSL::shaderStorageBlocksHeader() into ResourcesHLSL::allocateShaderStorageBlockRegisters() with the former only called for compute shaders. These initial allocations are offset by the number of RTs at draw time. Since Raw UAVs may now be created at draw time for non-compute shaders, call markRawBufferUsage() from the Renderer11::draw*() entry points as it is from dispatchCompute*(). Bug: angleproject:7156 Change-Id: I6ab65af1ff36df0313e3c1f8f79661b1547ab9a2 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3565562 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Stephen White <senorblanco@chromium.org>
Jamie Madill 6b94a71c 2022-04-01T10:12:07 Vulkan: Lift SwS suppressions. Bug: angleproject:4092 Change-Id: I0e72b95ba5ba2b60420d5b685349c405864c2e6e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3563513 Auto-Submit: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@google.com>
Shahbaz Youssefi 20e7bbb7 2022-03-18T17:03:18 Vulkan: Fix invalidate of attachments with emulated format Some image formats may be emulated such that the emulated format has more channels than the original. ANGLE clears the image once so that these extra channels contain valid values, and carefully ensures they are never modified. For swapchain images with such formats, as they are automatically invalidated at the end of the frame, a workaroud was added to make sure they are re-cleared in the beginning of the next frame. This however doesn't fix the issue of glInvalidateFramebuffer resulting in the contents of attachments with such formats to be discarded (even if the following render pass clears it, the contents are invalid in between). This change instead makes sure invalidate of images with emulated formats that have extra channels are handled appropriately: - On IMR hardware, the invalidate is dropped altogether as it provides little to no benefit. - On TBR hardware, a clear is automatically staged on the invalidated image. The latter replaces the workaround that was added to make the following render pass use loadOp=CLEAR, by adding a clear that's respected regardless of what the future usage is. This change also paves the way for a future change where the invalidate of color attachments is tracked in render passes similarly to how depth/stencil currently is. With this change, the image is no longer in an inconsistent state where its contents are considered invalid, even though some channels are meant to remain valid. Bug: angleproject:6860 Change-Id: Iec5b4854dfbe3a0bf93cd5aa82c19fe116065744 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3536389 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Mohan Maiya 4cca6b3e 2022-03-08T14:54:02 Early return when rebinding the same buffer, sampler or texture Bug: angleproject:6955 Test: SimpleStateChangeTestES3.BindingSame* Change-Id: If946a7cf534809d21e49138d9f34dcee61a73627 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3029049 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Roman Lavrov 722ac971 2022-03-02T19:24:26 Fix glClearColor calls to use GLColor32F constants. Bug: angleproject:5025 Change-Id: I8d8bc8ff0b93951e19697d57c07368e1196498ae Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3499564 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Charlie Lao 82352237 2022-02-08T12:01:38 Vulkan: Fix incorrect DescriptorSet's bufferInfo in XFB emulation path The mAlignmentOffsets are pre-calculated at TransformFeedbackVK::begin() time but never gets updated when buffer changes after XFB begin call, which causes us sending down incorrect bufferInfo to the descriptor set. This CL removes mAlignmentOffsets and always calculate the aligned offset when mBufferOffsets is needed. This CL also modify the existing test to demonstrate the bug. Test: SimpleStateChangeTestES3.RespecifyBufferAfterBeginTransformFeedbackInDeletedPaddingBuffer Bug: angleproject:6998 Change-Id: I11a9f114385d2e49ba9bdc2d820727c85c8244dd Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3448682 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Charlie Lao <cclao@google.com>
Kenneth Russell 812d5fff 2022-01-31T17:32:47 Metal: End the current render pass at glInvalidateFramebuffer. Prior to this, glInvalidateFramebuffer calls were discarding the effects of draw calls made afterward, in the same render pass. Add StateChangeTestWebGL2.InvalidateThenDrawFBO reproducing the basic problem reported, and document the variations attempted. Minimal code was changed to fix this issue because other changes hypothesized as necessary weren't testable. Drive-by cleanup of FragDepthTest, after which StateChangeTestWebGL2 was patterned. Bug: angleproject:6923 Change-Id: If79805dbf62fae76b7b9147940b5d9d301142baa Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3426828 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Gregg Tavares <gman@chromium.org> Commit-Queue: Kenneth Russell <kbr@chromium.org>
Brandon Schade 38fada35 2022-01-27T18:16:18 Vulkan: Add support for OES_primitive_bounding_box Add OES version of the primitive bound box extension Bug: angleproject:3576 Test: dEQP-GLES31.functional.primitive_bounding_box.* Change-Id: Ie44d952992a68dfffd5c124dda8dd11069f0c1e1 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3425086 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Brandon Schade <b.schade@samsung.com>
Jamie Madill 868c0739 2022-01-29T13:59:30 Vulkan: Fix image base/max level respecification case. Bug: angleproject:6776 Change-Id: I3e7774c20bae6d7ad7b1775d46797104e2429b81 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3426208 Reviewed-by: Charlie Lao <cclao@google.com> Reviewed-by: Yuxin Hu <yuxinhu@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Lingfeng Yang 6f1c39b5 2021-12-16T16:10:49 Vulkan: Restore color attachment mask-related blend states When we end up resetting blend state such as when changing to a depth-only FBO and back, we can end up adding attachment states. They need to be updated with the current GL blend state. Bug: b/210543392 Bug: angleproject:6828 Change-Id: I3419acb8081eb7d662576a75382bb8684cc0d29f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3346320 Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Lingfeng Yang <lfy@google.com>
Lingfeng Yang 83679716 2021-12-14T19:02:48 Vulkan: Dirty vertex buffers if default attrib values changed In the call_break_offline trace, attribute index 4 is disabled then enabled before a draw. This redundant operation is currently not blocked and makes it to the Vulkan backend, resulting in handleDirtyGraphicsVertexBuffers. However, at the same time, we change the default attrib value for index 3. Which makes handleDirtyGraphicsVertexBuffers not redundant. We'll need to take into account cases when other attribute indices are not dirty and yet the default attrib value changes. Bug: angleproject:6802 Change-Id: I4a3ec411aa42f73a209fd0f06976d7ef2d21e027 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3331412 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Lingfeng Yang <lfy@google.com>
Shahbaz Youssefi 55840e90 2021-12-03T15:24:00 Vulkan: Fix deferred flush vs UtilsVk Take the following scenario: 1. Draw 2. Flush (this is deferred) 3. Get image view (this is retain()ed) 4. Pass view to a draw-based UtilsVk function 5. Flush 6. Delete image view At step 4, UtilsVk may start a new render pass and use the image view from step 3. Since the flush at step 2 is deferred, it will be performed at this step, and so the serial of the image view is set to the previous submission. When step 4 uses this view, it doesn't retain it. Step 5 submits the new command buffer using this image view. At step 6, if the previous submission has finished, it will destroy the view immediately even though it's in use by the new submission. One solution could have been to make sure render pass closure originating from UtilsVk doesn't incur a flush. However, due to the current design where the render pass is immediately recorded in RendererVk's primary command buffer, it's possible that an unrelated context would perform the flush anyway. This change makes sure instead that the render pass is closed before any views are allocated/retained to be used by UtilsVk. Bug: chromium:1272266 Change-Id: I5bdefb34e03c368511c4c174cf7965fda158d2b8 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3315976 Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Jamie Madill f84dc44f 2021-11-30T12:22:21 Add a test for changing an XFB buffer after Begin. Bug: chromium:1274316 Change-Id: I4ba240ff4cc383b157a64a0c92e8ce8ab2d8061e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3309101 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Jamie Madill 45028d29 2021-11-30T10:37:06 D3D11: Fix OOB access in vertex conversion code. This could happen when using certain combinations of stride and offset. Fix the issue by using checked math. Bug: chromium:1274499 Change-Id: Idba3beedad10b0c0cac2dcbecba8e420c5baa6da Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3309035 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Shahbaz Youssefi 558981c1 2021-11-10T23:13:03 Vulkan: Make write-after-invalidate checks more precise Previously, the size of the command buffer was used as indication for whether the render pass attachments might have been modified after glInvalidateFramebuffer. In that case, the invalidate was undone. This is made more precise by making sure only vkCmdClearAttachments and vkCmdDraw* calls are counted for this purpose. For example, inserting event markers after glInvalidateFramebuffer now retains the invalidation. Note that this can be even further optimized by tracking real writes to attachments. For example, currently a draw call with depth test disabled still undoes the invalidation of the depth buffer, but it shouldn't. Bug: angleproject:5079 Change-Id: I6257b4116a73213884b919bc7f3c86ff39b6aeed Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3274176 Reviewed-by: Ian Elliott <ianelliott@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi 91d36473 2021-11-08T16:27:20 Fix invalidation of GL_FRAMEBUFFER invalidating READ FBO Per spec, GL_FRAMEBUFFER means GL_DRAW_FRAMEBUFFER for glInvalidateFramebuffer. Bug: chromium:1267424 Change-Id: I8c9ab61ecdbd4ccee4262dc8559b2feb02b4837c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3266176 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi 517ff220 2021-11-08T23:57:16 Add test for texture state change bug Bug: chromium:1267624 Change-Id: I270e54921d40a2d139afdc78c90ab05164cbfabf Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3268492 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi ef93b32c 2021-11-09T00:26:13 Vulkan: Fix deferred clears vs invalidate In this scenario: - Clear color - Invalidate depth - Clear color The invalidate step flushed the deferred color clear, but the following clear did not expect an open render pass without any draw calls in it. This change fixes this issue, while simultaneously optimizing invalidate by making sure the clears accumulated during syncState() are redeferred instead of flushed. This issue was discovered in https://chromium-review.googlesource.com/c/angle/angle/+/3266176 where, as part of an unrelated fix, an accidental render pass closure is removed. Bug: chromium:1267424 Change-Id: Icfc0a53dbf84e6339ee23960ed847444830054e6 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3266178 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi 0e20c680 2021-11-08T15:24:09 Sync framebuffer bindings in glInvalidateFramebuffer If a framebuffer binding change is followed by glInvalidateFramebuffer, ANGLE was not syncing the framebuffer binding. - This means that invalidation was being done on the previous framebuffer. - Paired with deferred clears, this was causing ContextVk to start a render pass on the previous, potentially deleted, framebuffer. Bug: chromium:1267027 Change-Id: I092a0c8dd764db9e49258b694c970babb19cf24b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3266175 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 019ddad5 2021-11-04T13:22:47 Reset cache in ProgramExecutable::updateActiveSamplers. This missing reset was causing incorrect state validation to persist in a few instances. Bug: chromium:1266437 Change-Id: I7ab47c81bf9f855e3ad75048f9d1aaefbc2291df Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3262477 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
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>
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>
Jamie Madill 44bef8ae 2021-10-08T15:01:37 Remove traces of Feature Level 9_3 support from tests. Bug: angleproject:1284 Bug: angleproject:3042 Change-Id: Ic2f77d315e98c3b15c5fc8b0359168bce00867d4 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3213294 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Yuly Novikov a364ea59 2021-10-09T01:52:23 Revert "Update old NVIDIA bug suppression." This reverts commit 0b779ac42a53e4656af3bd87fb74af88fb8a58a8. Reason for revert: fails on Win7 NVIDIA http://ci.chromium.org/ui/p/chromium/builders/ci/Win7%20FYI%20x64%20Release%20(NVIDIA)/13643 Original change's description: > Update old NVIDIA bug suppression. > > Only fails now on Linux. Move to expectations file. > > Bug: angleproject:2755 > Change-Id: I28acc569764d94f1095c8eb96e15a1eb19e4695a > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3212571 > Reviewed-by: Jamie Madill <jmadill@chromium.org> > Commit-Queue: Jamie Madill <jmadill@chromium.org> Bug: angleproject:2755 Change-Id: If6d03c4ee840126cf1347feffdd672999d9bedf8 No-Tree-Checks: true No-Try: true Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3213752 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@chromium.org> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Jamie Madill 0b779ac4 2021-10-07T14:08:10 Update old NVIDIA bug suppression. Only fails now on Linux. Move to expectations file. Bug: angleproject:2755 Change-Id: I28acc569764d94f1095c8eb96e15a1eb19e4695a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3212571 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jonah Ryan-Davis 212f4592 2021-09-22T12:02:47 Enable direct-to-metal backend by default We are switching over to Apple's direct-to-metal backend instead of generating SPIRV in the metal backend. This CL enables the direct-to-metal generation by default, but the SPIRV backend is still accessible by overriding the feature directMetalGeneration. This CL comes with a change in test expectations to catch new failures and clean up newly passing tests. Bug: angleproject:6080 Change-Id: I4b10ad93c641b88857079a08fb45d3dc575d71f1 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3175664 Reviewed-by: Gregg Tavares <gman@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
angle-autoroll 66c89b0f 2021-10-06T16:28:42 Fix and disable MSVC warnings Needed because some warnings are no longer disabled after http://crrev.com/c/3189512. Also includes https://github.com/KhronosGroup/OpenCL-Headers/pull/179, needed after clang upgrade to llvmorg-14-init-5410-gd0473681 Bug: chromium:1257173 Change-Id: I4f844aa972362c488cb6d37244439e2126f2c1c3 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3210629 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Jamie Madill 30878d2a 2021-09-24T09:23:56 Buffer: Notify contents changed in a separate observer list. Buffer contents changed will only notify VertexArray. Also this list is separated from the other observers because in the future most of the time we won't need to notify the VertexArrays when buffer contents changed, to avoid iterating over a large list of VertexArray observers on simple SubData calls. Bug: angleproject:6371 Change-Id: I6142a5757868caf33dc6594a1975f817f80553e8 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3182701 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com>
Brandon Schade 217acac2 2021-07-21T12:42:56 Vulkan: Add support for EXT_primitive_bounding_box 1. Added support for EXT_primitive_bounding_box extension 2. Renamed shader variable gl_BoundingBoxEXT[] to ANGLEBoundingBox[] Bug: angleproject:3576 Test: dEQP-GLES31.functional.primitive_bounding_box.* Change-Id: I15fa9af50c6fd8e86d225670ddd8eb39f6e65d35 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3053618 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Yuly Novikov 992a2f70 2021-07-15T14:32:11 Skip DrawRepeatUnalignedVboChange on Mac ARM Metal SimpleStateChangeTest.DrawRepeatUnalignedVboChange/ES2_Metal flaky on Mac FYI arm64 Release (Apple DTK) Bug: angleproject:6171 Change-Id: I9fa8b39e172c6422d9430ab3a0aa8ce9e7558b9f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3032024 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Trevor David Black 5d314b59 2021-06-01T03:03:22 Fix undefined behavior associated with Runescape Mobile Bug: b/184287970 Change-Id: I5d3baf5e7a8a20c30e1b787b69597110226521d8 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2929352 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Gert Wollny 13ac4dfb 2021-06-23T12:19:40 gl_tests:DrawArraysThenDrawElements: glFinish instead of swap Later in the test we read from the backbuffer to confirm that the triangles were drawn correctly, but without EGL_BUFFER_PRESERVED the content of the backbuffer is undefined. Since glReadBuffer is not supported in GLES2 don't swap, instead to a glFinish to force the drawing in each iteration. Bug: angleproject:6088 Change-Id: Iac485cc6ec92626a74a4428bcdb32cc535a2691f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2982112 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Gert Wollny <gert.wollny@collabora.com>
Shahbaz Youssefi c51c59c7 2021-06-15T13:43:50 Test for missing index dirty bit bug Bug fixed in https://chromium-review.googlesource.com/c/angle/angle/+/2961690 triggers only in the following situation: - Context 1: draw indexed -> clears index dirty bit - Context 1: change state in such a way that closing the render pass is deferred to dirty bit handling (for example, change FBO) - Context 1: issue a non-indexed draw call. This closes the render pass and starts a new one -> bug was that the index dirty bit was not set - Context 2: flush the command buffer, which submits the previous render pass of context 1 (which contained vkCmdBindIndexBuffer). The primary command buffer is now reset. - Context 1: issue an indexed draw call. Since the index dirty bit was not set, this was missing the vkCmdBindIndexBuffer call. This change implements a regression test based on the above scenario. Bug: chromium:1183068 Bug: chromium:1190493 Change-Id: I729bd48cd6df2621ca763f6231023a52ac08b0fb Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2963836 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Gert Wollny 422ec18a 2021-04-26T10:40:04 tests: Move DrawAfterFlushWithNoStateChange to ES3 The test uses Vertex Array Objects, and these are only supported from GLES 3.0 on, or by using the extension OES_vertex_array_object, so make it part of the StateChangeTestES3 set. With that we also enable the test. Bug: angleproject:5855 Change-Id: I0cfb5d23d19e3db8eefffd9d52b744d068666606 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2850642 Commit-Queue: Gert Wollny <gert.wollny@collabora.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Shahbaz Youssefi e8b18e79 2021-04-16T11:57:53 Skip failing test on AMD/Linux This test was suppressed on AMD/Windows already. Bug: angleproject:5687 Bug: angleproject:5874 Change-Id: I9b6bac81adc017f80634271063d53f3d4eebba0b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2831993 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Yuly Novikov a6b16d29 2021-03-02T19:04:57 Suppress UNINSTANTIATED_PARAMETERIZED_TEST failures on Ozone We only support ES2 on Ozone, so tests that depend on ES3 or ES31 support are not instantiated there. Bug: chromium:1183147 Change-Id: Id58bcd9b44a5b9a70b5ae8115e27c44f5dc81226 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2726550 Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Yuly Novikov f9c595b4 2021-02-26T11:53:30 Skip 3 SimpleStateChangeTestES31 DrawWithTextureThenDrawWithImage on Win Intel GL ClearThenSampleWithCompute on Linux AMD GL TransformFeedbackThenReadWithCompute on Win AMD Vulkan Bug: angleproject:5686, angleproject:5687, angleproject:5688 Change-Id: If380074389382bc7e9a8b8668c83fb9c8ef2084d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2723291 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Shahbaz Youssefi 999da35e 2021-02-18T17:29:20 Vulkan: Optimize glMemoryBarrier more The implementation assumed that the X_BARRIER_BIT bits implied two barriers; write->X and X->write. However, they only imply write->X, with the exception of SHADER_IMAGE_ACCESS_BARRIER_BIT and SHADER_STORAGE_BARRIER_BIT which handle X->write for images and buffers respectively. As a result, the other bits no longer set the MEMORY_BARRIER dirty bit as they don't guard against X->write usage. Bug: angleproject:5070 Change-Id: Id23904c455a5f56dc45fc6832a74fdfbba6a4827 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2705702 Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi d81e5d17 2021-02-18T16:02:35 Add a test for sample after deferred clear To ensure that deferred clears are flushed before sampling. Bug: angleproject:5070 Change-Id: I72bfef752074eb1e722c669edaa2d0b5ddfd20b8 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2705027 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com>
Shahbaz Youssefi 39d7fc18 2021-02-17T00:18:41 Vulkan: Don't break the render pass on dispatch calls The only reason a dispatch call may need to break the render pass implicitly is for read-after-writes where the write originates from the render pass but is not through a storage buffer/image. There are only two such scenrios possible: - Framebuffer attachment write -> texture sample - Transform feedback write -> ubo read All other uses of the buffers and textures that require breaking the render pass are handled by `glMemoryBarrier`. Bug: angleproject:5070 Change-Id: I92b50d69d8782097ee8ff477ac57da6209c326a1 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2698998 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com>
Shahbaz Youssefi 7ae8531b 2021-02-17T15:20:07 Vulkan: Fix crash with 0-sized element buffer VertexArray::syncState syncs all dirty bits, including DIRTY_BIT_ELEMENT_ARRAY_BUFFER even for draw calls that don't use this buffer, such as glDrawArrays. If the element buffer is given 0 size, this caused a crash in the Vulkan backend. Bug: chromium:1172577 Change-Id: I02d78c9660c07b896f7403867b648901478251fe Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2701831 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Tim Van Patten 64b5b3d3 2021-02-12T17:31:58 Vulkan: Further restrict enabling LINE_RASTERIZATION_MODE_BRESENHAM The app "Car Parking Multiplayer" enables GL_SAMPLE_ALPHA_TO_COVERAGE, which leads to a VVL error when LINE_RASTERIZATION_MODE_BRESENHAM is also enabled: VUID-VkGraphicsPipelineCreateInfo-lineRasterizationMode-02766: The Vulkan spec states: If the lineRasterizationMode member of a VkPipelineRasterizationLineStateCreateInfoEXT structure included in the pNext chain of pRasterizationState is VK_LINE_RASTERIZATION_MODE_BRESENHAM_EXT or VK_LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH_EXT and if rasterization is enabled, then the alphaToCoverageEnable, alphaToOneEnable, and sampleShadingEnable members of pMultisampleState must all be VK_FALSE. This CL adds the additional checking to GraphicsPipelineDesc::initializePipeline() to ensure those conditions are met before setting lineRasterizationMode to VK_LINE_RASTERIZATION_MODE_BRESENHAM_EXT. Bug: angleproject:5613 Test: StateChangeTest.AlphaToCoverageEnable Change-Id: Ie2286078f6916c01a19ae6f932321a86619bd4e1 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2694094 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Tim Van Patten <timvp@google.com>
Corentin Wallez 21cced7f 2021-02-16T12:20:34 Fix suppression for a SimpleStateChangeTestES31 on Linux AMD It should be suppressed on Desktop GL and not GLES TBR=syoussefi@chromium.org Bug: angleproject:5649 Change-Id: I9752e0219e39cc9a8f3c1b90e15525d7e0384a91 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2697068 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Corentin Wallez 14ec0d2c 2021-02-15T17:14:08 Suppress a SimpleStateChangeTestES31 on Linux AMD GLES SimpleStateChangeTestES31.DrawThenSampleWithCompute was failing since it was introduced. TBR=syoussefi@chromium.org Bug: angleproject:5649 Change-Id: I46f531724bd4f12c760675de5038f2345eb21aac Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2692816 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Shahbaz Youssefi 545d0051 2021-02-11T13:59:08 Add a number of glMemoryBarrier tests Bug: angleproject:5070 Change-Id: I835a4e936cb50d3f4b1187bebbe1d1adc49d0b52 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2689366 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com>
Shahbaz Youssefi 45a493ea 2021-02-05T13:48:48 Vulkan: Use a dirty bit to start the render pass Some dirty bits need to run before the render pass starts. An upcoming change for example needs to break the render pass when the program pipeline is changed while transform feedback is active. Another upcoming change may need to do the same based on a preceding glMemoryBarrier. This change adds a new dirty bit to start the render pass after some dirty bits have already been processed. Bug: angleproject:5528 Change-Id: I993c9efefed4c8fee268b218a8dd66a582d4e7cd Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2678863 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com>
Shahbaz Youssefi bb062070 2021-02-09T15:30:04 Vulkan: Fix updates to element buffer If glBufferSubData results in a new vk::BufferHelper allocation, VertexArrayVk::mCurrentElementArrayBuffer needs to be updated. VertexArrayVk::syncState was working under the assumption that DIRTY_BIT_ELEMENT_ARRAY_BUFFER_DATA cannot result in a vk::BufferHelper pointer change. This assumption was broken in https://chromium-review.googlesource.com/c/angle/angle/+/2204655. Bug: b/178231226 Change-Id: I969549c5ffec3456bdc08ac3e03a0fa0e7b4593f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2685439 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
James Darpinian ebf00703 2020-12-29T16:25:54 angle_end2end_tests passes on iOS! Miscellaneous test skips and fixes for iOS. Bug: angleproject:5417 Bug: angleproject:5491 Change-Id: Id0785e6243949fc756e4d7923dbbe77a411052f3 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2606656 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: James Darpinian <jdarpinian@chromium.org>
Tim Van Patten 220642a9 2020-12-16T21:10:37 Allow Drawing with Immutable Persistent Mapped Buffers From the EXT_buffer_storage overview: The GL_EXT_texture_storage extension added immutable storage for texture objects (and was subsequently incorporated into OpenGL ES 3.0). This extension further applies the concept of immutable storage to buffer objects. [T]his extension introduces the concept of persistent client mappings of buffer objects, which allow clients to retain pointers to a buffer's data store returned as the result of a mapping, and to issue drawing commands while those mappings are in place. The initial implementation of EXT_buffer_storage didn't enable this portion of the extension, so ANGLE is generating errors while attempting to draw with an immutable buffer mapped with the GL_MAP_PERSISTENT_BIT flag. This CL enables that functionality, since apps (e.g., FIFA Soccer) rely on it. Bug: angleproject:5473 Change-Id: Icf1c0597156044a342aac5e4d2abbc29b34f46b2 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2596957 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Tim Van Patten <timvp@google.com>
jchen10 3a8be140 2018-08-08T15:44:09 Enable some tests on Intel Windows Vulkan The tests IndexBufferOffsetTest.UInt16Index and StateChangeTest. VertexBufferUpdatedAfterDraw can pass 26.20.100.8141 now. Bug: angleproject:2663 Bug: angleproject:2664 Change-Id: I0324767f5c538879d865cf12304da4625d49bd81 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1166598 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
jchen10 a10d694e 2020-03-10T15:12:42 Remove StateChangeRenderTest suppression The failed DepthRangeUpdates case can pass on 26.20.100.8141 now. Bug: angleproject:2844 Change-Id: I1398ab6c4676c1a6bc8f9514b1559ac1e37ed086 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2096337 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Yuly Novikov a304f111 2020-11-22T18:47:39 Skip tests failing on Linux AMD RX 5500 XT Crashes: OpenGL: MemoryObjectTest.MemoryObjectQueries MemoryObjectTest.MemoryObjectShouldBeMemoryObject MemoryObjectTest.ShouldFailValidationOnImportFdUnsupportedHandleType UniformBufferTest.SizeOverMaxBlockSize VulkanExternalImageTest.ShouldClearOpaqueFdWithSemaphores VulkanExternalImageTest.ShouldDrawOpaqueFdWithSemaphores VulkanExternalImageTest.WaitSemaphoresRetainsContentOpaqueFd Vulkan: MultisampledRenderToTextureTest.2DColorDepthMultisampleDrawTest MultisampledRenderToTextureTest.DepthReadWriteToggleWithStartedRenderPass MultisampledRenderToTextureES3Test.RenderbufferClearDrawCopyThenBlendWithDepthStencilSameProgram MultisampledRenderToTextureES3Test.RenderbufferDepthStencilClearDrawCopyThenBlend MultisampledRenderToTextureES3Test.RenderbufferDepthStencilDrawCopyClearThenBlend MultisampledRenderToTextureES3Test.RenderbufferUnresolveColorAndDepthStencilThenTwoColors MultisampledRenderToTextureES3Test.RenderbufferUnresolveColorAndDepthThenTwoColors MultisampledRenderToTextureES3Test.RenderbufferUnresolveColorAndStencilThenTwoColors SimpleStateChangeTest.RebindTranslatedAttribute Failures: OpenGL: GLSLTest_ES31.MixedRowAndColumnMajorMatrices_WriteArrayOfArray GLSLTest_ES31.MixedRowAndColumnMajorMatrices_WriteSideEffect PixmapTest.BindTexImage ReadPixelsPBONVTest.Basic SimpleStateChangeTestES31.InvalidateThenStorageWriteThenBlend StateChangeTestES3.DrawPausedXfbThenNonXfbLines Bug: angleproject:5379, angleproject:5380, angleproject:5381 Bug: angleproject:5382, angleproject:5383, angleproject:5384 Bug: angleproject:5385, angleproject:5386, angleproject:5387 Bug: angleproject:5388, chromium:1004356 Change-Id: I73c6ba193ef230f576c804e8880f326ac5eabe0d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2552940 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Le Hoang Quyen 8a275449 2020-10-25T03:22:10 Metal: Add ES3_METAL to ANGLE_ALL_TEST_PLATFORMS_ES3 Bug: angleproject:2634 Change-Id: Iacc3aaf17565c7b16879897db4b9dac16826d829 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2494526 Commit-Queue: Le Hoang Quyen <le.hoang.q@gmail.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Le Hoang Quyen 9ff58e26 2020-09-27T15:27:12 Metal: Implement sampler object & shadow compare mode Note: GL_TEXTURE_COMPARE_MODE=GL_NONE is not supported on shadow sampler for now. Bug: angleproject:2634 Change-Id: I470bad6322e78ef1408e4334e1e778821df7cbf1 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2433332 Commit-Queue: Le Hoang Quyen <le.hoang.q@gmail.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Jamie Madill 2882e1af 2020-10-20T09:45:23 Fix missing validation cache update on VAO binding. Bug: chromium:1139398 Change-Id: I85a0d7a72bc2c97b07ebc5f86effd8e36aefd544 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2485581 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Shahbaz Youssefi 1a87f1f0 2020-10-06T17:15:34 Add a test for deferred clears and 0-sized scissor clears The Vulkan backend no-ops such clears before flushing deferred clears. Deferred clears are actually not gathered when doing a scissored clear, so this is not an issue. An ASSERT is added along with a regression test. Bug: angleproject:4836 Change-Id: I5ea5bab499ced41e13023ffb6b821e3caefb9ab2 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2453466 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com>
Trevor David Black e815afbf 2020-09-07T22:09:22 First pass at increasing inclusivity Link to the inclusivity rules https://source.android.com/setup/contribute/respectful-code Bug: b/162834212 Bug: chromium:1097198 Change-Id: Ied5a9e3879d72bff3f77ea6fcda9b82f30c32c2f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2396737 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Trevor Black <vantablack@google.com>
Tim Van Patten b3545b42 2020-07-29T16:50:53 Get storage buffers/images from ProgramExecutable Update StateCache::updateActiveShaderStorageBufferIndices() and StateCache::updateActiveImageUnitIndices to get the storage buffers and image bindings from the ProgramExecutable, respectively. This requires updating the ProgramPipeline's ProgramExecutable to build up its vector of buffers/images from each Program's ProgramExecutable. Bug: angleproject:4869 Test: VertexAttributeTestES31.UsePpoComputeShaderToUpdateVertexBuffer Test: SimpleStateChangeTestES31.InvalidateThenStorageWriteThenBlendPpo Change-Id: I68b7d23eedda910c3dcbf5f9c50b74b5e80134d8 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2327701 Commit-Queue: Tim Van Patten <timvp@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com>
Xinyi He 6c873cfd 2020-07-31T10:08:26 Disable RobustBufferAccessWebGL2ValidationStateChangeTest on Mali Mali does not support the robustness on Vulkan, so skip this test. Bug: angleproject:4823 Change-Id: Id4d29fe27f10ec87d901f92ba097db9207809d42 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2331311 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 44bb4d7a 2020-07-22T13:58:50 D3D11: Fix bug with static vertex attributes. In some specific cases after binding a zero size buffer we could end up trying to use a buffer storage that was no longer valid. Fix this by ensuring we don't flush dirty bits when we have an early exit due to a zero size buffer. Also adds a regression test. Bug: chromium:1107433 Change-Id: I9db560e8dd3699abed2bb7fe6d91060148ba1817 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2314216 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Shahbaz Youssefi 68791f89 2020-07-20T17:42:23 Vulkan: Fix sub invalidate marking render targets undefined When glInvalidateSubFramebuffer is called, the framebuffer is only partially invalidated. FramebufferVk::invalidateImpl was nevertheless marking the render targets as undefined, which would lead the subsequent render pass have loadOp=DONT_CARE. This is not correct, as the rest of the framebuffer is expected to still be valid. Bug: angleproject:4859 Change-Id: I2e64baa32b1fc84beb8008411b564cd7619af962 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2309111 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com>
Shahbaz Youssefi 248119b3 2020-07-20T16:05:45 Vulkan: Fix render target's tracking of content defined Imagine the following scenario: 1. Clear draw framebuffer 2. Invalidate draw framebuffer 3. Update texture attached to draw framebuffer 4. Draw again into draw framebuffer Step 3 could be a number of things, such as glCopyTex[Sub]Image, glBlitFramebuffer, glTex[Sub]Image2D, glGenerateMipmap etc. In the above scenario, at step 2, the framebuffer's render target remembers it being invalidated (mContentDefined = false). This is used to set the loadOp of the next render pass to DONT_CARE. However, mContentDefined was implemented for a very specific optimization regarding the swapchain's depth buffer. The reuse of this variable for glInvalidateFramebuffer was erroneous as this variable didn't track whether the contents are defined for the general case. With this change, mContentDefined is set to true during FramebufferVk::syncState for each render target whose contents are marked dirty. This change additionally makes glBlitFramebuffer signal the contents of the blit targets as dirty, as well as textures that are used as storage images. Bug: angleproject:4859 Change-Id: I68c829f75ff4a3d03bb293ec72c609384983026d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2309110 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com>
Shahbaz Youssefi c757e607 2020-07-21T10:18:41 Vulkan: Fix deferred clears and noop clear and blit Imagine the following situation: 1. Clear draw framebuffer 2. Noop operation on the framebuffer (Clear, ClearBuffer, BlitFramebuffer with flags specifying non-existing attachments) 3. Change framebuffer's attachment 4. Draw into framebuffer At step 2, FramebufferVk::syncState was called before noop-ing the operation. During syncState, deferred clears were stored in the framebuffer and weren't flushed because the actual operation was not performed. At step 4, the deferred clear meant for the prior attachment gets applied to the new attachment. Bug: angleproject:4865 Change-Id: I5b096bacf00356b4dccd4cbc9561b87b1bb557d8 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2309224 Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Jamie Madill f9e01f12 2020-07-14T17:20:18 Fix stale validation cache on buffer deletion. When we would delete the currently bound element array buffer we would neglect to invalidate a specific validation cache variable. This incorrectly would let us skip buffer size validation and lead to internal invalid memory accesses. Bug: chromium:1105202 Change-Id: I23ab28ccd3ac6b5d461cb8745b930f4d42d53b35 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2298145 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Courtney Goeltzenleuchter b31a1939 2020-06-25T08:13:20 Vulkan: Implement invalidate for color buffers This will set the color buffer load_op to DONT_CARE if the application has invalidated the color buffers prior to drawing. Will also set load_op to DONT_CARE for depth & stencil, though this isn't likely a common use case. Tests: angle_deqp_gles3_tests --gtest_filter=dEQP.GLES3/functional_fbo_invalidate_* --use-angle=vulkan angle_end2end_tests --use-angle=vulkan --gtest_filter=StateChangeRenderTestES3.InvalidateNonCurrentFramebuffer/ES3_Vulkan Bug: b/150458520 Bug: angleproject:4444 Change-Id: I6ce3d20fc1e9f4ab7ba3af9755c5ddc544f58ddd Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2267057 Commit-Queue: Courtney Goeltzenleuchter <courtneygo@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com>
Tobin Ehlis 34ca1ac7 2020-06-16T12:05:12 Vulkan: Fix FramebufferVk cache Migrate Serial from Image to ImageView. Imageviews are what are utimately used in FramebufferVk, so move the Serials into the ImageViewHelper class. Since that class also knows the level/layer of the imageView, we can revert to using a single Serial per ImageView instead of the AttachmentSerial that included the layer and level. ImageViewHelper caches Serials per layer/level combo. Bug: angleproject:4651 Change-Id: I3741d7d03523eada84295cb712c1cc1e6e3c3867 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2248203 Commit-Queue: Tobin Ehlis <tobine@google.com> Reviewed-by: Mohan Maiya <m.maiya@samsung.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Mohan Maiya 20dbfdd9 2020-06-15T11:29:05 Vulkan: Addition of ImageRespecificationTest There is a bug in the way the Vulkan backend handles image respecification. Add 2 tests that expose this bug - 1. When texture format is swizzled it needs to destroy only the read image views 2. When texture is respecified using external images the FramebufferVk cache has a bug where it doesn't invalidate the object with the orphaned attachment Bug: angleproject:4651 Test: angle_end2end_tests.exe --gtest_filter=ImageRespecificationTest* Change-Id: Id564a700ea44eb4f804694613f597320ea811c07 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2246532 Commit-Queue: Mohan Maiya <m.maiya@samsung.com> Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tim Van Patten c39d25ae 2020-06-01T12:42:33 Update State to check mExecutable A user may be using Program Pipelines, rather than monolithic Programs, so State should check if mExecutable is valid, rather than mProgram, since that indicates the presence of either a PPO or a Program. Exercising these paths requires additional tests: SimpleStateChangeTestComputeES31PPO::DeleteImageTextureInUse() Texture2DTestES31PPO::TexStorage() Texture2DTestES31PPO::SingleTextureMultipleSamplers() These new tests exposed bugs in the PPO implementation where updates to the active Program's ProgramExecutable were not being propagated to the Executables of the PPO's containing that Program. In these particular cases, updates to the active samplers/images/textures were not being copied to the PPO's Executable. Bug: angleproject:3570 Test: end2end tests listed above Change-Id: I297cac2d0367f180dd7fa01a1ee7ba53996867c4 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2225417 Commit-Queue: Tim Van Patten <timvp@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Jamie Madill 2d5da029 2020-04-15T17:15:37 Minor angle_end2end_tests cleanups. Minor refactoring and call consolidation. Was done while working on deferring clears in the Vulkan back-end. Bug: angleproject:4517 Change-Id: I60d80d4f9646c990c4cb8bbc349fc0051389bf02 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2151171 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Corentin Wallez 1e81dd4a 2020-04-01T17:46:58 Suppress failures after Win Intel driver upgrade. Bug: angleproject:4533 Change-Id: I482c4caa79fb5fdc9cd4a068f7e7e05890121fa2 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2130227 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Yuly Novikov 2e5bd9b1 2020-03-11T17:46:06 Update SimpleStateChangeTest.DrawRepeatUnalignedVboChange suppression Also flaky on Linux (already suppressed on Windows). Bug: angleproject:4470 Change-Id: I032241a4201dc7883d6107c643cf88c92fb01ba3 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2099402 Commit-Queue: Yuly Novikov <ynovikov@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Brandon Schade 0c9b6abd 2020-02-06T08:53:16 Skip invalid end2end test for ES2 Previously, the incomplete framebuffer depth stencil attachment test would run on ES2 if GL_OES_packed_depth_stencil were present. This is insufficient since it uses the GL_DEPTH_STENCIL_ATTACHMENT enum, which is not introduced in any extension prior to ES3. The test has been disabled on ES2, regardless of extensions. Bug: angleproject:4454 Test: angle_end2end_tests --gtest_filter=StateChangeTest.FramebufferIncompleteDepthStencilAttachment/* Change-Id: Ic5a6a521e35b49c5d723b33f588fa608264d6390 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2090783 Commit-Queue: Mohan Maiya <m.maiya@samsung.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 8257ac30 2020-02-07T14:17:08 Vulkan: Defer RenderPass image barriers. We accumulate image barriers in two places: * for GL sampler textures * for GL framebuffer attachments (Render Targets) Then we issue the barriers together in a single call before the RP. This fixes a bug where we were missing a layout transition in some cases when transitioning between a sampler and a render target. It should also be faster to issue a single barrier before a RP than issue several smaller barriers. Bug: angleproject:3539 Bug: angleproject:4029 Change-Id: I180b770f0df6b44d209e5c618ba36bcc1c6372e4 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2044236 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Shahbaz Youssefi 8fde1151 2020-01-09T14:22:35 Vulkan: fix default uniform descriptor rebind on program change When the program binding changes, we set the descriptor sets binding dirty bit if the program had any textures, UBOs, SSBOs, images or atomic counters. The check for default uniforms was missing. So if the two programs had no resources and were only using default uniforms, then drawing with one after the other didn't update the descriptor set binding of the default uniforms for the second draw. Bug: angleproject:4277 Change-Id: I631a1619658ee713484cfaee99fe1e39987e16e7 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1993408 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Shahbaz Youssefi 806d812e 2020-01-03T13:48:30 Vulkan: Reorder descriptor sets This change moves driver uniforms to a set with a lower id than the one that includes (emulation) transform feedback buffers. Imagine the following: - Program 1 with xfb: UniformsSet: 1 VS uniforms buffer, 1 FS uniforms buffer, 1 xfb buffer - Program 2 without xfb: UniformsSet: 1 VS uniforms bufer, 1 FS uniforms buffer. Previously, UniformsSet was index 0, and DriverUniformsSet was index 3. When switching from Program 1 to Program 2, the layout of UniformsSet changes, which means every subsequent set needs to be rebound. This is a Vulkan pipeline layout compatibility rule. This is done with invalidateCurrentTextures() and invalidateCurrentShaderResources() already when handling gl::State::DIRTY_BIT_PROGRAM_EXECUTABLE. The bug is that the driver uniforms are not invalidated. This is normally not an issue, because usually when switching from Program 1 to Program 2, transform feedback is paused, and this state change does invalidate driver uniforms. However, the following scenario doesn't do this: - Begin Xfb - Pause Xfb - Use Program 1 - Draw - Use Program 2 - Draw - End Xfb There is no driver state change between the two draw calls, which means the second draw will attempt to draw using the driver uniforms bound for the first draw call. There is a Vulkan validation error here due to the above pipeline layout validation rule. The issue manifests itself only when the second draw call actually uses driver uniforms, as otherwise that set is inactive and not validated; i.e. when line raster emulation is used. In summary, the validation error manifests itself when: - Transform feedback and line raster both use emulation - Transform feedback is paused - A draw with an xfb program is followed by a non-xfb program - The second draw is a line draw A test is added for this. The solution is to reorder the sets so that DriverUniformsSet is placed before UniformsSet. This way, changes to the layout of UniformsSet don't invalidate DriverUniformsSet. In fact, based on the above, any change in the layout of the program should have required an invalidation of the driver uniforms. This bug is probably masked by the fact that ContextVk::handleDirtyDescriptorSetsImpl() always rebinds the graphics driver every time any descriptor set needs rebinding. That should be removed in a follow up change. Bug: angleproject:4261 Change-Id: I21ad4152b454a1fe70554be02e18a9c94fb3e7a8 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1986927 Reviewed-by: Tobin Ehlis <tobine@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>