src/tests/gl_tests/StateChangeTest.cpp


Log

Author Commit Date CI Message
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>
Le Hoang Quyen ab42afa6 2019-11-21T10:13:44 Metal: fix vertex attribute's conversion lost after changing buffer binding. After vertex buffer's attribute is converted and stored in conversion buffer. Binding the same attribute to another buffer, then binding it back to previous buffer will result in previous conversion information lost. The conversion method would skip the conversion due to buffer's content hadn't been changed, however it didn't reuse the old conversion result. This CL also changed the way binding offset is used in Metal backend. - Previous, the offset would be assigned to the offset field of MTLVertexAttributeDescriptor, then the buffer would simply be bound to the command encoder with offset=0 i.e. setVertexBuffer(buffer, index, 0) - However this approach has several disadvantages. Since Metal doesn't allow MTLVertexAttributeDescriptor's offset to be larger than the vertex attribute's stride, the old approach would force the back-end to convert the attribute and store in conversion buffer. New approach: - MTLVertexAttributeDescriptor's offset will be zero. The offset will be used to bind the buffer itself to the render command encoder. i.e. setVertexBuffer(buffer, index, offset) This way the "offset <= stride" restriction no longer exists. The only restriction is the offset must be multiple of attribute's size. Added 3 new tests: - SimpleStateChangeTest.RebindTranslatedAttribute - VertexAttributeTest.DrawWithLargeBufferOffset - VertexAttributeTest.DrawWithLargeBufferOffsetAndLessComponents Bug: angleproject:2634 Change-Id: I6c2fa8091436e4a24405d791f86d17d97df02d64 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1940009 Commit-Queue: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Shahbaz Youssefi 87607526 2019-12-23T22:48:06 Disable flaky test on Metal Bug: chromium:1037665 Bug: angleproject:4177 Change-Id: I38f05f1567803e7ac0c631d94056f26dc122a4f2 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1980278 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Corentin Wallez 39f3ccda 2019-11-28T17:45:01 Suppress SimpleStateChange failure on Metal NVIDIA BUG=angleproject:4177 TBR=geofflang@chromium.org Change-Id: I642e4bd3650b5b6beb6d9b18106d787c5dbc14f6 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1942348 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Mohan Maiya c373dfd8 2019-11-22T08:48:22 Vulkan : Handle dirty state correctly when there are muiltiple VAOs If vertex array object binding is changed, we need to update the pipeline cache with the attribute information of the newly bound VAO. We cache the strides of attributes because emulated attributes will have strides that don't match the stride info cached in its binding struct. Also added a test case that switches between multiple VAOs. Bug: angleproject:4127 Test: angle_end2end_tests.exe --gtest_filter=SimpleStateChangeTestES31.MultipleVertexArrayObjectRendering Change-Id: I4f23aec33d5aa5988baa41f3c63db5534daf75ca Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1917453 Reviewed-by: Tobin Ehlis <tobine@google.com> Commit-Queue: Tobin Ehlis <tobine@google.com>
Le Hoang Quyen 6fcc0bb8 2019-11-21T01:19:40 Metal: Re-add end2end test configs (running test is still disabled) angle_test_instantiate.cpp & angle_test_instantiate_apple.mm: - Disabled metal platform selection on pre-10.13 mac devices for Bug: angleproject:4153 Explicitly disabled tests on metal: - DifferentStencilMasksTest.DrawWithDifferentMask - PointSpritesTest.PointSizeAboveMaxIsClamped - WebGL2ReadOutsideFramebufferTest.CopyTexSubImage3D This requires the crash fix in http://crrev.com/c/1924101 Bug: angleproject:4153 Bug: angleproject:2634 Change-Id: I95046d731a8ba7414cf1a1f4b6f2940282725872 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1926389 Commit-Queue: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Tobin Ehlis c1776c61 2019-11-13T11:36:35 Vulkan:Add Swiftshader configs Add Swiftshader configs to existing test instantiation macros for all ESX variants. This causes Swiftshader to be used to run end2end tests. Added detection code to know when tests are running on Swiftshader and skipping a number of fails initially. Note that when running ANGLE end2end tests within Chromium build on Win32 bots there were crashes with Swiftshader config for tests that should have been skipped. Due to this, just skipping Swiftshader configs on Win32 for now. Bug: angleproject:4081 Bug: angleproject:4092 Change-Id: I32527a62304c5fad90f645b372edf9411ca2b212 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1914126 Commit-Queue: Tobin Ehlis <tobine@google.com> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Courtney Goeltzenleuchter 8392b118 2019-11-20T16:57:08 Revert "Metal: Enable end2end tests." This reverts commit 0bb42e091b77f174632434a05789b2ce632bd902. Reason for revert: https://bugs.chromium.org/p/chromium/issues/detail?id=1026633 Causing failures on Mac bots. Original change's description: > Metal: Enable end2end tests. > > Explicitly disabled tests: > - DifferentStencilMasksTest.DrawWithDifferentMask > - PointSpritesTest.PointSizeAboveMaxIsClamped > - WebGL2ReadOutsideFramebufferTest.CopyTexSubImage3D > > Bug: angleproject:2634 > Change-Id: I76ab450c06d0e1be1e7469a8b9c6497684c3ca54 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1906607 > Commit-Queue: Jamie Madill <jmadill@chromium.org> > Reviewed-by: Jamie Madill <jmadill@chromium.org> > Reviewed-by: Geoff Lang <geofflang@chromium.org> TBR=geofflang@chromium.org,jonahr@google.com,jmadill@chromium.org,le.hoang.q@gmail.com Change-Id: Iaa4264834170a49c274f186d3d74f57714c84b32 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: angleproject:2634 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1926378 Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com> Commit-Queue: Courtney Goeltzenleuchter <courtneygo@google.com>
Le Hoang Quyen 0bb42e09 2019-11-19T23:04:00 Metal: Enable end2end tests. Explicitly disabled tests: - DifferentStencilMasksTest.DrawWithDifferentMask - PointSpritesTest.PointSizeAboveMaxIsClamped - WebGL2ReadOutsideFramebufferTest.CopyTexSubImage3D Bug: angleproject:2634 Change-Id: I76ab450c06d0e1be1e7469a8b9c6497684c3ca54 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1906607 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Courtney Goeltzenleuchter 377b8caf 2019-11-19T08:57:01 Add suppressions for failures on Intel/Linux The refactor to angle_end2end_tests added tests to OpenGL ES and some of these tests are failing on Intel/Linux. Skip those tests for now. Bug: angleproject:4121 Change-Id: I7a56099faac558a4e18d98eb5f0b25522d656e61 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1924061 Commit-Queue: Courtney Goeltzenleuchter <courtneygo@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tobin Ehlis <tobine@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tobin Ehlis 1a01b4b3 2019-11-11T16:41:07 Refactor end2end test macros This is a foundational CL to enabling the end2end tests on swiftshader. Refactored infrastructure with new ANGLE_INSTANTIATE_TEST_ES* macros that will run tests over all various combinations of all platforms for different ES versions. Just skipping failing tests initially to get the refactor landed. Bug: angleproject:4081 Bug: angleproject:4092 Change-Id: I017f6c3267179e49b6ae08cc7488096b423dcdb5 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1904635 Commit-Queue: Tobin Ehlis <tobine@google.com> Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
Shahbaz Youssefi b3c4dffd 2019-11-12T14:42:23 Vulkan: Fix glMemoryBarrier* implementation The indirect bit handling is no longer necessary, as setup*Indirect functions already add the barriers if necessary. The framebuffer bit is unnecessary as the image layout transition from storage image to framebuffer attachment would already add the necessary barrier. Image access bit was indeed necessary, but so is shader storage bit which is added. Bug: angleproject:3574 Bug: angleproject:3879 Bug: angleproject:3934 Change-Id: I9da722e7a34941932731335af2313783295031ba Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1913080 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com>
Shahbaz Youssefi 4f023f56 2019-11-11T15:46:02 Enable passing end2end test Bug: angleproject:3361 Change-Id: Ie488f77a7baa0ce66d192c651e826c2fee597af2 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1912139 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Jamie Madill 77fba58c 2019-10-24T19:29:24 Fix improper vertex array assignment in ANGLE test. Test: StateChangeTestES3.VertexArrayObjectAndDisabledAttributes Bug: angleproject:4049 Change-Id: Ibda86585e9117686283081a76df213b2b2db0b6e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1879582 Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Tobin Ehlis b2885bc4 2019-10-23T13:33:48 Vulkan:Enable UpdateBufferInUse test on AMD Re-tested this and it's now passing so turning it on. Bug: angleproject:3255 Change-Id: Iccf63cfaa4386dfda5628e189362631e655953f5 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1876081 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Tobin Ehlis <tobine@google.com>
Mohan Maiya 5549ef04 2019-10-02T09:38:03 Vulkan: Fix content synchronization for textures bound to images Added state tracking back for images bound with glBindImageTexture This fixes a bug where updating a texture with glTexSubImage2D would not trigger a content update when the same image was re-used in a dispatch Bug: angleproject:3887 Test: SimpleStateChangeTestES31.DispatchWithImageTextureTexSubImageThenDispatchAgain/ES3_1_Vulkan Change-Id: I030ec52f1c470f9e9ff7c14f1c24fe213000a3ad Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1835943 Commit-Queue: Mohan Maiya <m.maiya@samsung.com> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Shahbaz Youssefi 912e52d8 2019-08-23T00:25:09 Vulkan: Storage image support Image bindings are placed after atomic counters in the "resources" descriptor set. There are two issues yet to be addressed: - GL can create a 2D (array) view of a 3D image, but this is not allowed in Vulkan. If this cannot be made possible, emulation needs to be done. https://github.com/KhronosGroup/Vulkan-Docs/issues/1033 - GL can create an image view of a texture with a different format and have the data reinterpreted. This is not currently done. Bug: angleproject:3563 Change-Id: I95c4d92c50bb033212a9a67f3f2d6f97c074c7bf Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1767366 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang 2a19c59f 2019-08-23T14:10:24 GL: Check for errors around GL calls. Add a macro to check for GL errors after each GL call to catch errors as they happen even if the debug callbacks are unavailable. GL errors are only checked when asserts are enabled unless explicitly requested with the ANGLE_GL_TRY_ALWAYS_CHECK macro to verify GL calls that may allocate memory. Updated TextureGL to use the macro. BUG=angleproject:3020 Change-Id: I7678b204899e940824b010ab4be7e7f159bee6de Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1764476 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Tobin Ehlis 4c833efb 2019-07-11T11:29:35 Vulkan: Enable sampler objects This is the initial implementation to get GLES3.0 Sampler Objects working on the Vulkan backend. When samplers are dirty, a corresponding Vulkan sampler object will be created with associated state and textures are flagged as dirty anytime sampler bindings change. Then when handling textures dirty, any bound sampler objects are pulled from active texture units. When sampler objects are bound, their state is used instead of the built-in texture's sampler state. This change also adds a test that uses the same texture object with different sampler objects to test a corner case that dEQP misses. Bug: angleproject:3208 Change-Id: I643d9c9d5cb92fecc02dad815a07bcf349534c70 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1706897 Commit-Queue: Tobin Ehlis <tobine@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jiacheng Lu 7c8928d0 2019-07-24T10:39:40 Add more tests covering gl::vertexAttribPointer 1. Add tests ensuring VBO binding with format requiring conversion in vulkan backend is converted correctly after binding and offset changes. 2. Add tests ensuring VBO binding switching between CPU and GPU handles correctly in vulkan. As for vulkan, it transfers CPU side memory into tightly packed buffer and may causing a stride change. Bug: angleproject:3256 Change-Id: I5d9d78670b28bec286b96d3b6a9c6211da3f3d9b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1716614 Commit-Queue: Jiacheng Lu <lujc@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Xinghua Cao e995d7fb 2019-06-26T17:59:27 Use memoryBarrier to sync image load and store Image load and store are incoherent memory access operations, so need to use memoryBarrier to ensure the visibility of incoherent memory access operations with other operations. Bug: angleproject:3044 Change-Id: I4d474d260a3199c026911de8d20878cd327d16c6 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1677420 Commit-Queue: Xinghua Cao <xinghua.cao@intel.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Shahbaz Youssefi da904484 2019-07-02T10:49:14 Vulkan: Implement glInvalidate[Sub]Framebuffer Additionally, fixes an issue where the read framebuffer was affecting the render pass desc given to the pipeline. This fix is included with this CL as its test depends on glInvalidateFramebuffer. This issue was revealed by 071d2a44 changing the order in which read and draw framebuffers were synced. Previously, read was synced first, dirtying the pipeline and then draw was synced fixing it. With the order reversed, the read framebuffer is the last to changes the pipeline, leaving it in an invalid state. Bug: angleproject:3201 Bug: angleproject:3202 Change-Id: Ibebf732a3e3cc081e4865f79dcbaedb467fd9038 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1682468 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Courtney Goeltzenleuchter b867bc6f 2019-06-19T12:11:13 Vulkan: Fix dirty element array buffer updates. The issue occurs that binds the same buffer and calls glDrawElements with the same indices. The offset has been reset in the VertexArrayVk::syncState(), but it doesn't check the actual value in the ContextVk::setupIndexedDraw(). Also corrected case where update via BufferSubData wasn't being sent to the HW. Bug: angleproject:3362 Change-Id: I0f7d2fc162bc8f1c36cb09ba689fd27b482b9035 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1666345 Commit-Queue: Courtney Goeltzenleuchter <courtneygo@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Jamie Madill 44168468 2019-06-20T09:50:23 Vulkan: Sync image in TextureVk::syncState. We can use the DIRTY_BIT_IMPLEMENTATION internal dirty bit in the gl::Texture class to force calls to ContextVk::syncState. In syncState we can ensure we call ensureImageInitialized before we get to the ContextVk. This in turn means we can remove some of the command graph breaks from TextureVk. We need to make sure the dirty bits are propagated to EGL Image siblings with this method. This fixes a potential implementation issue with EGL images with the GL back-end. Also makes a state change test a little better by removing some of the VAO and program init calls before the draw. Improves perf on the texture change microbenchmark by 12.5%. Bug: angleproject:3539 Bug: angleproject:3117 Change-Id: I2b5481690801fa98f859a6c02e3f4b974590cd3d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1663839 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Jamie Madill 88596bea 2019-06-13T14:17:48 Vulkan: Implement a texture descriptor cache. We noticed a significant hotspot in vkAllocateDesctiptorSets. The app was repeatedly cycling through a few combinations of active textures. For each state change in ANGLE we were allocating a new desctiptor set. This in turn would trigger internal driver memory allocation and cause jank. Using a cache avoids allocations entirely since the application is rotating through a stable set of textures. The descriptor cache is stored in each program. It is indexed by a set of 32-bit serials. Each texture generates a unique serial for every combination of VkImage and VkSampler that the texture owns. The texture descriptor is refreshed every time a texture changes or is rebound. The descriptor cache is accessed via an unoredered map with the texture serial sets as the hash key. We also store the maximum active texture index in the cache key so we don't need to hash and memcmp on all 64 active textures. This will currently fail if more than MAX_UINT serials are generated. But that number is high enough that it shouldn't be possible to hit in practice in a practical amount of time. Requires shifting the texture sync to ContextVk so we can get the new serial after the textures are updated. And to make sure to update the image layouts even if the descriptors are not dirty. Improves performance of the T-Rex demo. Also improves the score of the texture state change microbenchmark by about 40%. Bug: angleproject:3117 Change-Id: Ieb9bec1e8c1a7619814afab767a1980b959a8241 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1642226 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Tim Van Patten 70642e42 2019-06-05T14:55:49 Vulkan: Implement ES 3.0 rasterizer discard Rasterizer discard is a feature that allows the graphics pipeline to skip the fragment shader stage. Implementing rasterizer discard in Vulkan is as easy as not binding a fragment shader binary. Tests for rasterizer discard live in dEQP-GLES3.functional.rasterizer_discard.*. Bug: angleproject:3214 Test: dEQP-GLES3.functional.rasterizer_discard.* Change-Id: I0815df3b70f6f9cdc6c8c87ec4813bb629d8bd5f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1646692 Commit-Queue: Tim Van Patten <timvp@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tim Van Patten 0a56f0e3 2019-05-14T17:07:27 Vulkan: Update front face mode during syncState() When handling DIRTY_BIT_DRAW_FRAMEBUFFER_BINDING in syncState(), the call to update the front face was missing, so culling could be enabled for the wrong front faces. Bug: angleproject:3237 Test: Verify 3D apps render (more) correctly Test: New SimpleStateChangeTest end2end tests Change-Id: I1d94a977bea9e48d90b5346861e5565d2371cadd Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1611753 Commit-Queue: Tim Van Patten <timvp@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 6722009e 2019-05-20T11:12:53 Vulkan: Handle dirty RTs with state messages. Prior to this CL we were handling dirty state change notifications by flushing the RT Images just prior to use or just after they were changed. This could lead to a few redundant checks in several places. It also meant we needed an owner pointer from the RT to the parent Image. This pointer would be null for Surfaces and Renderbuffers. This cleans up the image flushing logic to be handled by dirty bit notifications. When an app updates an attached Texture with TexSubImage or related calls it will send a notification to the Framebuffer. The Framebuffer then sets a dirty contents bit that is handled in the implementation. In Vulkan this means flushing the dirty bits. Requires adding a flag to the FramebufferImpl class to determine if we need to syncState before we checkStatus. Adding the option allows us to only call syncState for the GL back-end. Not calling syncState allows the robust resource init operation to happen *before* we syncState. Which in turn allows FramebuffeVk to initialize the VkImages in one go. Added new regression tests for Texture updates. This might not cover all cases. I found it was very hard to trigger some of the resource update staging in TextureVk. Bug: angleproject:3427 Change-Id: Idfa177436ba7fcb9d398f2b67922e085f778f82a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1601552 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
shrekshao 3dbe480b 2019-05-06T15:59:07 Validating draw buffers now also considers color mask settings It will always return true if all 4 channels of color mask are set to false. This should only apply to WebGL. Will fix this in a later patch. Bug: chromium:958374 Change-Id: I46befaf3ae1b63027dfbb309ac32724c616025d3 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1594629 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 5cbaa3f8 2019-05-07T15:49:22 Don't inherit ANGLETest SetUp and TearDown. Instead of inheriting from testing::Test's SetUp and TearDown we add new methods 'testSetUp' and 'testTearDown'. This helps prevent a common error of forgetting to call the base class method. Also add a check in the ANGLETest destructor that SetUp and TearDown have been called. Bug: angleproject:3393 Change-Id: Iab211305cc06ffea9ca649e864ddc9b180f2cba0 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1593960 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill ddc4d33a 2019-05-01T15:11:46 Remove several underused platform configs. * Removes D3D11 Warp and Reference configs from tests. * Removes several permutations of OpenGL back-end specific configs. * Removes FL 9_3 since it is no longer supported. * Removes present path "Copy" since it's redundant with normal D3D11. Reduces number of configs from over 60 to 25. Bug: angleproject:3393 Change-Id: Ia5a23de3c4865b17ee50673a4066757b901a4b5a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1574675 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill b8149075 2019-04-30T16:14:44 Clean up ANGLE test extension functions. None of these functions needed to be member functions. Also make the naming more consistent. Bug: angleproject:3393 Change-Id: I7aafe2269a48af703a87bd9a8cf4cfab9e177dd3 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1574673 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Yuly Novikov d18c048a 2019-04-04T19:56:43 Remove Nexus 5X Vulkan test suppressions. SimpleStateChangeTest.DrawArraysThenDrawElements TextureUploadFormatTest.All VertexAttributeTest.UnsignedByteNormalized VertexAttributeTest.ByteNormalized EXTMultisampleCompatibilityTest.DrawAlphaOneAndResolve was skipped on all Android for unspecified reason in https://chromium-review.googlesource.com/c/angle/angle/+/451877 seems to be passing now. Make some suppressions OpenGL ES specific: MultisampleCompatibilityTest.DrawCoverageAndResolve RobustResourceInitTest.TexImageThenSubImage RobustResourceInitTest.ReadingPartiallyInitializedTexture RobustResourceInitTestES3.MultisampledDepthInitializedCorrectly RobustResourceInitTest.MaskedDepthClear RobustResourceInitTestES3.MaskedDepthClearBuffer RobustResourceInitTest.MaskedStencilClear RobustResourceInitTestES3.MaskedStencilClearBuffer TransformFeedbackTest.OffsetResetOnBeginTransformFeedback Bug: angleproject:3262 Bug: angleproject:3124, angleproject:2657, angleproject:2797 Change-Id: I3ed7a3f0ebbb4598bff75e2b3bd8b3b0630779f8 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1572484 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Qin Jiajia e7da32f1 2018-12-27T15:31:47 Fix the failure in UpdateImageTextureInUse If we update the texture data between two dispatch calls, ReadPixels can't get right result after the second dispatch call. The failure reason is that after the first dispatch, ReadPixels will sync framebufer state which will update color render target. Finally, TextureD3D::ensureRenderTarget is reached. However, we are in compute pipeline. mTexStorage->isRenderTarget() will be false. That results the current texture will create a new render target storage. But the UAV is still bound with the previous texture storage. If there is no texture dirty bit between these two dispatch calls, applyTexturesForCompute won't be called. After the second dispatch, readPixels will read data from the new texture storage which is not updated. Bug: angleproject:3015 Change-Id: Ib2494ab8bf6e12faefc0a7370719d383526c36ba Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1390710 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jiajia Qin <jiajia.qin@intel.com>
Shahbaz Youssefi d3ec341d 2019-04-10T11:37:07 Fix LineLoopStateChangeTest to actually draw square and hourglass The test claimed to be drawing an hourglass followed by a square. That is: ---- \/ /\ ---- followed by: ---- | | | | ---- With the end result being: ---- |\/| |/\| ---- However, in reality it was drawing two hour glasses with the same result. That is: ---- \/ /\ ---- followed by: |\/| |/\| Bug: angleproject:3361 Change-Id: I59a2930f78e6e448b6ccb2e5f70c73ff0f15a2ea Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1561650 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>