src/tests/gl_tests


Log

Author Commit Date CI Message
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>
Tim Van Patten e8789a53 2020-07-29T12:01:49 Vulkan: Don't always end the render pass when updating the scissor We don't always need to end the render pass when updating the scissor, since it will be ended later when necessary. This change is in preparation for optimizing resolving multisample images with glBlit, since the render pass needs to be updated before it's ended. Bug: angleproject:4753 Test: CQ Change-Id: Ie657587ca9f4461dcc03f0f9c251ac2c17398f5b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2327334 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com> Reviewed-by: Tim Van Patten <timvp@google.com> Commit-Queue: Tim Van Patten <timvp@google.com>
Shahbaz Youssefi fc4bd898 2020-08-03T16:29:06 Vulkan: Support ANGLE_external_objects_flags With this extension, it is possible to import Vulkan images into ANGLE (similar to EXT_external_objects) while specifying the Vulkan create and usage flags used to create that image. This can be used by the application to drop usage flags it does not need to improve performance, or add create flags as it requires. Bug: angleproject:4912 Bug: fuchsia:52759 Change-Id: Ia568973b19670999dd0e69f6ac5548e8ef0c3eec Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2335020 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Michael Spang <spang@chromium.org>
Jamie Madill 25b0de6b 2020-08-01T13:45:11 Vulkan: Squash Texture+ImageView Serial and improve caching. Previously we regenerated TextureSerial on Texture state changes such as base/max level changes. This caused ANGLE to update descriptor sets even though it was using the same image view handles. This change instead uses an ImageViewSubresourceSerial which includes both a serial for the ImageView and a 32-bit packed subresource range. The CL speeds up NBA2k because ANGLE no longer writes new descriptors for Texture max level changes. Local testing showed up to a 40% speedup. Also adds a regression test with a counter for the number of descriptor set writes in a frame. This change will also be useful in upcoming changes that track Image serials in the RenderPass. Bug: angleproject:4911 Change-Id: I66249634aa56288079acf2c0eb8aa3391103533c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2333396 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Tim Van Patten <timvp@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>
Shahbaz Youssefi f776eb9c 2020-08-01T23:45:24 Vulkan: EXT_multisampled_render_to_texture2 support The previous change that implemented EXT_multisampled_render_to_texture already provisioned this extension in the Vulkan backend. This change implements the front-end for this extension and enables it in the Vulkan backend. Bug: angleproject:4836 Change-Id: I7080260972e61727c5716051c236f635668cb67b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2330510 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Shahbaz Youssefi 47207e42 2020-08-01T23:43:43 Vulkan: Fix blit/resolve of mixed-samples framebuffers A framebuffer could contain a mixture of multisampled and multisampled-render-to-texture attachments. When used as the source of a glBlitFramebuffer operation, the former requires a resolve while the latter is a blit. This change fixes this use-case. Bug: angleproject:4836 Change-Id: I1d39bf25f54df9f8b68304058596a2d1c975f9ba Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2333987 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Le Hoang Quyen a5a08b5e 2020-07-31T01:57:33 Metal: Enable end2end tests on Intel. Bug: angleproject:4133 Bug: angleproject:2634 Change-Id: I3eff5ff81e908eec2990eb036728aa9878c8f802 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2329090 Commit-Queue: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Charlie Lao 4e1abc75 2020-07-24T10:38:40 Vulkan: Set depthStencil loadOp to DontCare when not used and stored If depth stencil buffer is disabled during entire renderpass, and at the end of renderpass we are not storing the data back to memory, then force the loadOP to DontCare to avoid unnecessary depth stencil load or clear. Bug: b/162080462 Change-Id: I30905a6d45bec038de68e7f363ec699eb2be09ab Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2317726 Commit-Queue: Charlie Lao <cclao@google.com> Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com> Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 322cc825 2020-08-02T17:27:23 Rename RenderPass test to performance counter test. This is a better naming for new tests that will check other counters such as the number of command buffers, barriers, and descriptor set writes. Bug: angleproject:4911 Change-Id: I8b2c12f6e043c2833e64fa9627f781e61f8f0f3d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2334089 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill d04a5593 2020-07-31T10:55:38 Vulkan: Add RenderPass count test. Bug: angleproject:4911 Change-Id: I4c4e187b6b048118ce1231ae8924340ad382c43f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2331741 Reviewed-by: Charlie Lao <cclao@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Shahbaz Youssefi 9b1cab0d 2020-07-31T11:40:05 Fix validation of glFramebufferTexture2DMultisampleEXT In preparation for GL_EXT_multisampled_render_to_texture2. This makes the validation reuse what's there for glFramebufferTexture2D in addition to what GL_EXT_multisampled_render_to_texture requires. Additionally, it uses packed enums for texture target and id. Bug: angleproject:4836 Change-Id: Ie778c84e1ff5a0cb6615257f2aff9e04395dd5aa Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2332956 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi dcc56215 2020-07-19T01:12:09 Vulkan: Implement GL_EXT_multisampled_render_to_texture This change allows the use of resolve attachments in the Vulkan backend. GL_EXT_multisampled_render_to_texture is implemented using this feature. The infrastructure for specifying resolve attachments is designed with eventual support for GL_EXT_multisampled_render_to_texture2 in mind as well as optimizations to glBlitFramebuffer() and multisampled backbuffers. Proper support for glRenderbufferStorageMultisampledEXT is still missing from this change. All tests use this for the depth/stencil attachment and don't read back the data. Currently, the depth/stencil attachment is created as a normal multisampled image. Bug: angleproject:4836 Change-Id: I110a7f63312ae61a657b6094adf7d97c92bd5843 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2304170 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com>
Cody Northrop cc846039 2020-07-27T21:05:11 Capture/Replay: Fix GetTexImage on Luminance GetTexImageANGLE and GetRenderbufferImageANGLE use ReadPixels to pull texture data. Luminance is not a renderable format, so it is not supported by ReadPixels. To support this, override Luminance formats to their underlying internal format. Test: angle_end2end_test --gtest_filter="*GetTexImage*" Bug: b/160014453 Bug: angleproject:4058 Change-Id: Id19344c2e2c06386a871338833e35b7747cb966b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2321740 Reviewed-by: Manh Nguyen <nguyenmh@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Cody Northrop <cnorthrop@google.com>
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>
Charlie Lao 8765b46a 2020-07-15T17:10:35 Vulkan: Make mDefaultUniformStorage per ContextVk Right now the dynamic buffer for default uniform is per program. Most of time the buffer is unused. That is a huge waste of memory (and these memory are wired memory). This CL moves the mDefaultUniformStorage from per ProgramVk to ContextVk so that we all share with each other. Bug: b/161391337 Change-Id: I1fe8523b2b2dbc39bec3509a3432e38e34bd5713 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2274870 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com> Commit-Queue: Charlie Lao <cclao@google.com>
Shahbaz Youssefi 8adc5469 2020-07-02T10:15:17 Vulkan: Generate mipmap in compute An initial implementation based on AMD's FFX SPD (Single Pass Downsampler). Apart from requiring STORAGE_IMAGE support for the image format, the following limitations are in place due to FFX SPD: - Image must be 2D or 2D array (including cube maps) - Image must be single-sampled The following _can_ be supported, but not yet implemented: - sRGB formats - Integer formats - depth/stencil formats Bug: angleproject:4551 Change-Id: Ibc4d5cea701cca31e55e3d651540872bbd3b473f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2278713 Reviewed-by: Mohan Maiya <m.maiya@samsung.com> Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
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>
Courtney Goeltzenleuchter 93eb633c 2020-07-07T15:41:38 Inline depth/stencil clear if in middle of renderpass Some apps have a pattern where they clear the depth & stencil buffers in the middle of the frame which causes the Vulkan backend to stop the existing render pass and start a new one. This causes more loads & stores of buffer contents than if we inline that clear with a draw. Bug: b/159808300 Bug: angleproject:4695 Change-Id: I7a15af22f47a81051fa33fa19eaa123d8b66597c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2289945 Commit-Queue: Courtney Goeltzenleuchter <courtneygo@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com>
Shahbaz Youssefi 1cfc6f0a 2020-07-20T16:03:38 Add test for deferred clear + attachment gaps This test makes sure the list of clear values given to the render pass (for deferred clears) are correctly passed. Bug: angleproject:4862 Change-Id: I4830a72a6f2b01570f6d4427ffb025429b5aa03c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2309109 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Courtney Goeltzenleuchter 9a9ef0ae 2020-07-15T16:50:32 Vulkan: Fix RTs attached to textures with non-0 mip Cleared confusion between GL level indices and VK level indices by adding the corresponding suffix to variables and function arguments. A handful of places that sent one index and expected the other are fixed. A couple more places needed this adjustment that were missed in the first CL. Also included a test to provoke those situations. The conversion between the two is given by: levelIndexGL = levelIndexVk + baseLevel; Bug: angleproject:4695 Change-Id: I3b8e5699abee1b011e52b666e6e245f44cb8ad6f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2302549 Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Courtney Goeltzenleuchter <courtneygo@google.com>
Xinyi He 9b9472c3 2020-07-17T10:21:11 Fix ContextLostTest if robustness ext is disabled Reset notification behavior is defined in the GL_EXT_robustness extension, and the resulting context must support the extension and the specified reset strategy. So if the ext is not supported, it should disable delivery of reset notifications. Bug: angleproject:4823 Change-Id: I49b9364a83eab9ebc0fdca3b1dc075c1a43070cf Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2302874 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Shahbaz Youssefi 94303d17 2020-07-17T10:20:57 Enable fixed swiftshader tests Bug: b/159712754 Change-Id: I5dc26726072ddadc3104561606cd425755679a83 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2304173 Reviewed-by: Nicolas Capens <nicolascapens@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Charlie Lao 22e1f3e2 2020-06-26T14:26:50 Vulkan: Let all shader stages share one buffer for default uniform Right now each shader stage has its own vk::DynamicBuffer for default uniform storage. This is less efficient than just share one buffer. This CL moves the storage from per shader stage into its ProgramVk object. Bug: b/159457348 Change-Id: If47248ea23c4e48407d3b211583ae2b048d4d10f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2265281 Commit-Queue: Charlie Lao <cclao@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com>
Xinyi He 45f54928 2020-06-17T16:25:35 Vulkan: Fix capturing arrays using VK_EXT_transform_feedback Vulkan is able to capture the whole array when using transform feedback extension. Add a new end2end test for it. Due to the outdated nv bots, khr_gles31 tests are faild. Add these suppressions in the khr_gles31 expectations file in order to unblock the commit. Bug: angleproject:4723 Change-Id: I929f99544a01cf5fc781dc31c2c041c851976676 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2247952 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Le Hoang Quyen 349b661d 2020-07-08T12:50:00 Metal: fix max point size and RGB565 renderbuffer bug. - Max point size is set to 64, since this is the max size observed. It is not 511 as https://developer.apple.com/metal/Metal-Feature-Set-Tables.pdf claims. - RGB565 is emulated on macOS by RGBA, needs to disable alpha write for this format. This was already done for TextureMtl, but wasn't for RenderBufferMtl. - Also enable true non-power-of-two textures support (OES_texture_npot). This was technically already supported, just that the extension wasn't advertised yet. - New Test: FramebufferFormatsTest.RGB565Renderbuffer Bug: angleproject:4816 Bug: angleproject:2634 Change-Id: Ie7e3efb4cb29bb9a3fd706c26e2b50b42ff3f6be Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2281797 Commit-Queue: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Le Hoang Quyen 08b9ad57 2020-07-08T12:50:00 Metal: Prevent vertex shader's inactive varying from being removed If vertex shader declares a varying but doesn't use it, and this varying is being used in fragment shader, linking will fail because the varying would be removed by spirv-cross. Fix: initilize the unused varying with zero(s). New test: GLSLTest.InactiveVaryingInVertexActiveInFragment. Bug: angleproject:2634 Change-Id: Ia37acd8eea85d5da4ddbca6457d6cddb1b41662c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2281796 Commit-Queue: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Le Hoang Quyen 9277ee74 2020-07-06T12:40:58 Metal: Implement MSAA default framebuffer. GL_SAMPLE_COVERAGE_VALUE is implemented by inserting gl_SampleMask writing logic to fragment shader. New test added: MultisampleTest.ContentPresevedAfterInterruption. - Skip on D3D11 (Bug: angleproject:4609) Bug: angleproject:2634 Change-Id: Ib44daf0baccc36ea320596d81713156047da059c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2281783 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Jamie Madill <jmadill@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>
Shahbaz Youssefi 95bfb3e5 2020-07-08T23:07:48 Vulkan: Fix resolve draw path If the draw path is taken for resolve, the internal shader previously calculated (1+sum(sample.a))/sampleCount instead of sum(sample.a)/sampleCount. Additionally, due to a typo, the result was rounded. This change also fixes a number of off-by-one errors when calculating src/dst offsets in blit/resolve path. Tests are added to resolve from default to FBO and vice versa to exercise the draw path which was otherwise never invoked for color buffers. Bug: angleproject:4746 BUg: angleproject:4092 Change-Id: I4b9c181339b89af44b27d61d27a6b3d88cde2eea Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2288224 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Ian Elliott <ianelliott@google.com>
Mohan Maiya 2a2b4b13 2020-07-09T13:15:13 Vulkan: Force flush staged updates for external textures For textures that are backed by external memory, immediately flush sub image updates instead of staging them. Bug: angleproject:4828 Tests: angle_end2end_tests --gtest_filter=ImageTest.UpdatedExternalTexture* Change-Id: I51e5bd0cb5df7df3af21f0cdb3007eebc1be29cd Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2290490 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
Jonah Ryan-Davis 514c8f64 2020-07-08T13:48:54 Skip MultithreadingTest.MultiCreateContext on Ozone This tests crashes on Ozone, skip for now. Bug: chromium:1103009 Change-Id: Ie686e69d937710b43b615372251801e83b7bde20 TBR=geofflang@chromium.org Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2288334 Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
shrekshao 9349e262 2020-06-25T14:28:17 Fix multiDraw* with DYNAMIC_DRAW buffer usage Specialized Context11 impl to prevent promote Dynamic during MultiDraw. Add different buffer usage to MultiDraw and BaseVertexBaseInstance tests. Bug: angleproject:3402, angleproject:4754 Change-Id: I50e1a6fd6c8b6fd48f130c43545b895335d2e55b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2268581 Commit-Queue: Shrek Shao <shrekshao@google.com> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Mohan Maiya 69fa4d23 2020-06-30T09:06:33 Vulkan: Query aspect flag from the image When transferring images across queues we need to query the aspect of the image instead of hardcoding it to VK_IMAGE_ASPECT_COLOR_BIT Bug: angleproject:4791 Bug: angleproject:4818 Tests: angle_end2end_tests --gtest_filter=ImageTest.SourceAHBTarget2DDepth* Change-Id: Ia43a00262085dab492935c0c299635f3af468b50 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2274868 Commit-Queue: Mohan Maiya <m.maiya@samsung.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Jonah Ryan-Davis 3c8f6094 2020-06-26T12:42:37 EGL: Add basic multithreading support Adds first step to allowing multithreaded contexts: letting multiple threads use ANGLE as long as only one thread has a current context at a time. Bug: angleproject:4724 Bug: angleproject:4725 Change-Id: I4f606bdb15386cff9e3cb84d4120781e24e15fe4 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2269864 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
Mohan Maiya dd2316df 2020-07-02T14:20:05 EGL: Add image test for AHB based EGLImages Add new end2end test where the source for EGL images is an Android Hardware Buffer Bug: angleproject:4810 Tests: angle_end2end_tests --gtest_filter=ImageTest.SourceAHBTarget* Change-Id: I20f303c6ad839ac2e65d407cfe3813a8be4c1cfa Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2231884 Commit-Queue: Mohan Maiya <m.maiya@samsung.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill ad782a84 2020-07-02T16:21:59 Tests: Use "__" to delineate test config names. This will allow the ANGLE test runner to identify test configs for tests that use parameterization to break up different test permutations with the same config. Note that GoogleTest doesn't allow for anything other than alphanumeric characters or "_" in test names. Bug: angleproject:3162 Change-Id: Iee215fbd8c397eef04dce0269da9b58ec568fce7 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2280402 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Shahbaz Youssefi 0757a61a 2020-07-03T10:03:08 Remove suppression of passing test Bug: angleproject:4698 Change-Id: I1c97f27534f25e1b63b1e07a82ffade353f805d2 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2280983 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Mohan Maiya 89c88559 2020-06-20T11:13:57 Add end2end test for readonly feedbackloop Bug: angleproject:4778 Test: ./angle_end2end_tests --gtest_filter=ReadOnlyFeedbackLoopTest* Change-Id: I1c2500395d261c1686e5d325aad173462311c8c3 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2252543 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
Shahbaz Youssefi 5fec8ecf 2020-07-02T11:14:30 Fix CopyTexture3D test to remove Nvidia workaround Bug: angleproject:4748 Change-Id: I8e66fda3c9fd234451ad765c8777cd75b4fc44fc Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2279136 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Ian Elliott 28300e6f 2020-06-30T10:41:27 Vulkan: Fix off-by-1 180/270-rotated CopyTexImage The rotation calculations are a little different for this code (that uses a special shader) than for other pre-rotation cases. I also modified the CopyTexImageTestES3.2DArraySubImage test to make future bugs a little easier to diagnose. Test: Test: angle_end2end_tests --gtest_filter=*CopyTexImageTestES3.2DArraySubImage*Vulkan* Test: Test: angle_end2end_tests --gtest_filter=*WebGLReadOutsideFramebufferTest.CopyTexSubImage2D*Vulkan* Bug: b/158245571 Change-Id: I497ec541cae5cd4085c3e9d596ee20943f5510f9 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2275733 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Ian Elliott <ianelliott@google.com>
Xinghua Cao d1bf23d7 2020-06-23T16:57:05 Restrict member types for StructuredBuffer Std140 storage layout has some rules for uniform block, must pad StructuredBuffer element type explicitly to match std140 layout rules when translating std140 uniform block to StructuredBuffer. In this CL, restrict member types which are not needed to add paddings according std140 layout rules. Bug: angleproject:4783 Change-Id: I50130da64ad6865083849bf55b76525f3d2835a8 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2259226 Commit-Queue: Xinghua Cao <xinghua.cao@intel.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jiajia Qin <jiajia.qin@intel.com>
Shahbaz Youssefi 8ea72e86 2020-06-29T23:42:42 Skip failing test on NVIDIA Shield Bug: chromium:1100613 Change-Id: I1e05b2b7829ee790f878bf99976310c8a697faa2 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2274520 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi 06462add 2020-06-04T16:14:18 Add a test for copying from one mip to another Bug: angleproject:2914 Change-Id: Ib39f8599a613cbb85688c230cf8a72e23d8e1c1c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2231618 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Kenneth Russell <kbr@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>
Shahbaz Youssefi 6b49449d 2020-06-25T12:25:33 Vulkan: Fix mipmap generation and level redefinition When generating mipmaps, the non-base levels are redefined to be compatible. mRedefinedLevels was not updated to take this into account, resulting in invalid copies to the image. Additionally, noted a few spots where ImageDesc is used to respecify the image, but those are not up-to-date when the backend functions are called. Changed those to directly get the necessary information from the allocated image. Bug: chromium:1094644 Bug: chromium:1094599 Change-Id: I2afc9e5a53f24ef56836c5d7eec2e3e11df0ef61 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2267423 Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Corentin Wallez 5046324e 2020-06-26T14:16:56 Skip MultithreadingTest.MultiCreateContext on Ozone On Linux this test is supported with GLX but not EGL, so Ozone (which uses EGL) fails. Update the test suppression to avoid Linux Ozone. TBR=geofflang@chromium.org Bug: angleproject:4725 Change-Id: I9e85b51a01ab5b25c6cbbdbcdbbfb4b21b7a6152 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2270021 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Shahbaz Youssefi c81da1c8 2020-06-19T22:05:38 Vulkan: Avoid double-copy when generating mipmap If the image needs to be redefined with mips, level 0 was copied to a buffer which was then copied to the new image. This change instead stages the old image directly for copy to the new image. Bug: angleproject:4551 Change-Id: I7625f140ddadde0a2b439c5e91c519ad49ae2fd7 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2257264 Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Jonah Ryan-Davis 69a78e6d 2020-06-22T13:52:54 CGL: Add basic multithreading support Adds first step to allowing multithreaded contexts: letting multiple threads use ANGLE as long as only one thread has a current context at a time. Bug: angleproject:4724 Bug: angleproject:4725 Bug: chromium:1087084 Change-Id: Ia6ca48c5fa838b93e49fc9ea259d626029439ca3 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2257273 Commit-Queue: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jonah Ryan-Davis 4eb2f6dc 2020-06-11T11:30:14 Add basic multithreading support to GLX The first step for true multithreading support is allowing multiple threads to use ANGLE as long as only one thread has a current context at a time. Added a test to MultithreadingTests to reproduce this behavior and implemented it in GLX. Bug: angleproject:4724 Bug: angleproject:4725 Bug: chromium:1087084 Change-Id: I908d3f02f34a681f1c9d0919dd17aee1a489173c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2241616 Commit-Queue: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Corentin Wallez d6293293 2020-06-25T10:54:16 Suppress MipmapTest failure on NVIDIA Shield. MipmapTestES3.GenerateMipmapPreservesOutOfRangeMips/ES3_OpenGLES started failing on NVIDIA Shield right after it was introduced. TBR=syoussefi@chromium.org Bug: angleproject:4551 Bug: angleproject:4786 Change-Id: Id6b258a09d33783faf34f867523da31995cee4e7 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2264102 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Shahbaz Youssefi 86ae16b6 2020-06-23T01:03:00 Vulkan: Fix CPU path copy of 2D array textures Bug: angleproject:4744 Change-Id: I88d997c39a7d5f8fa9609c43c2cd192b237611e7 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2259202 Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi 6ef0387d 2020-06-16T23:32:47 Vulkan: Fix mipmap generation discarding levels above max Bug: angleproject:4551 Change-Id: I1f65e41049b8cc8065ff988bb708cb44acfdb98b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2257263 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Corentin Wallez 89001914 2020-06-24T14:56:15 Suppress TextureTest failure on NVIDIA Shield. Texture2DTestES3.IncompatibleMipsButNoMipmapFiltering/ES3_OpenGL started failing on NVIDIA Shield right after it was introduced. TBR=syoussefi@chromium.org Bug: angleproject:4786 Change-Id: I9805e4d22a01395a8b0eb47243b07fbf2abd6f4a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2264092 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Shahbaz Youssefi cf11beed 2020-06-22T15:51:51 Add mip-related corner-case tests Bug: angleproject:4780 Bug: angleproject:4781 Change-Id: Iaf8e1df576c3676249751413a646244da41a0eaf Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2258476 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Xiaoxuan Liu a7587fcf 2020-06-22T14:59:30 Vulkan: Skip Texture2DArrayCopy.SnormFormats on Mali GPU. Bug: angleproject:4744 Change-Id: I911b184daffde616d874af8cd698f1f796a9cfcc Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2257120 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Corentin Wallez 47ad6801 2020-06-22T14:27:28 Suppress TransformFeedbackTest failure on Mac AMD. TBR=jmadill@chromium.org Bug: angleproject:4775 Change-Id: I22e8c0c42e48c4c2d0527b39ec740497083656c2 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2256208 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Shahbaz Youssefi b772a955 2020-06-16T23:32:47 Vulkan: Make texture syncState aware of upcoming generateMipmap By letting TextureVk::syncState know it's being called for generateMipmap, it can make a better decision to initialize the image: - Staged updates to mips that are going to be overwritten are dropped - The image is created with full mipchain to avoid a redefine in the following generateMipmap() call. Bug: angleproject:4551 Change-Id: Ic70ee6c0a0b29c7bd62beaff612b2f2d5276defb Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2249340 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tim Van Patten <timvp@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>
Jamie Madill b11af52f 2020-06-19T14:39:29 Suppress failing XFB tests on Intel/Win/Vulkan. Bug: angleproject:4533 Bug: angleproject:4767 Change-Id: I34973d4160df993f2b1ed4d97d5d9f3871ecb9f3 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2254090 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Brian Sheedy <bsheedy@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Shahbaz Youssefi 3589d9a0 2020-06-16T15:32:18 Add a test for generateMipmap after modify To make sure TextureVk::syncState is called before generateMipmap. Bug: angleproject:4551 Change-Id: Ibce0738b72fc81270e07617f04ffee57f1c8ed20 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2248209 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com>
Shahbaz Youssefi 6cb8345f 2020-06-17T23:22:57 Vulkan: Non-zero memory initialization for all images This was only implemented for single-level, single-layer, single-sample color images. This change implements clear for all images. Additionally, the move to VMA broke the initialization of the staging buffer, so even for the supported case, the image was being initialized with uninitialized data. Bug: angleproject:4092 Bug: angleproject:4551 Change-Id: Ic2eee3f8454a93f1bcf3ca725afabcdc693047e1 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2249376 Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi e7ae237e 2020-06-12T23:52:09 Vulkan: ANGLE_copy_texture_3d support Bug: angleproject:4748 Test: CopyTexImage*Vulkan:Texture3DCopy*Vulkan:Texture2DArrayCopy*Vulkan Test: dEQP.KHR_GLES3/copy_tex_image_conversions_required_cubemap*cubemap* Change-Id: Ifdc3d455ca8c9e732d0adf4afa9e2809d780ae18 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2246320 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Shahbaz Youssefi 340da145 2020-06-16T10:58:47 Vulkan: Disable 1xMSAA on integer formats too This was pending swiftshader support for 4xMSAA support for integer formats, which is long done. Bug: angleproject:4197 Change-Id: I843a9674e20a48b5387bd67b8c0efc8617841382 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2248198 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Ian Elliott <ianelliott@google.com>
Jamie Madill 959037e0 2020-05-25T15:40:38 Vulkan: Preserve RPs on XFB changes when possible. Instead of unconditonally ending the RenderPass we keep a set of active XFB buffers in the ContextVk. This lets us re-use RPs when we don't write to the same buffer repeatedly. Reduces the RenderPass count in our Manhattan capture from 29->23. Bug: angleproject:4622 Change-Id: I28c2d4d3db1490e5d07be3c48d21fd2cc6ff85d6 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2196957 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Shahbaz Youssefi d2d8282a 2020-06-14T04:50:22 Refactor 3D/2DArray copy texture tests The test methods were duplicated between 3d and 2d array tests. This change creates common methods that can be called by the two test sets. Additionally: - Input colors are symbolized as they are repeated multiple times. - The color used for unmultiply-alpha test is slightly tweaked to avoid generating exactly x.5 values with undefined rounding. Bug: None Change-Id: If0cf694017724a72976d3d5cb0f54f8c49a0502a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2246319 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Shahbaz Youssefi 7005248b 2020-06-11T16:00:23 Vulkan: Fix glCopyTextureCHROMIUM if source is swizzled A no-swizzle view is added for this use-case. Bug: angleproject:4004 Change-Id: Id654af9a4f520357c91bf2b06501c9e1ea169f11 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2241623 Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
shrekshao e6124500 2020-06-02T12:02:55 Fix baseVertex and baseInstance with streaming attributes baseInstance: Fixed by adding the intial offset to each copy for streaming attributes baseVertex: make sure mShaderConstants.onFirstVertexChange takes in correct firstVertex value for dynamic attribs (where firstVertex passed to StateManager11::updateState already include baseVertex) Bug: chromium:1078330, angleproject:3402 Change-Id: I289c4e3733fdf6f78af8c3adee84112c05a5abce Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2227022 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Shrek Shao <shrekshao@google.com>
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>
Kenneth Russell 0bd0a913 2020-06-12T15:24:55 Skip FramebufferTest_ES3. TextureAttachmentMipLevelsReadBack on Mac ASAN. Reporting out-of-range accesses in the OpenGL driver. Bug: angleproject:4737 Tbr: syoussefi@chromium.org Change-Id: Ib2598ba569c395ec39687fd1395149be5110f37f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2243757 Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Kenneth Russell <kbr@chromium.org>
Geoff Lang 4e6f6545 2020-04-16T16:31:24 GLX: Support X11 pixmaps Add support for creating EGL pixmaps from X11 pixmaps using GLX. Pixmaps are needed for various external APIs such as VAAPI. Add support for EGL_NOK_texture_from_pixmap to allow binding pixmaps to textures. BUG=angleproject:4560 Change-Id: I4a6d3ad7e87151ff5317bbdaaf093ac1b46daf5f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2153805 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi ff2ebce4 2020-06-10T22:46:17 Vulkan: allow texture copies from one mip to another As a first implementation, this makes the copy go through the staging buffer. Once anglebug.com/4719 is implemented, this can be optimized to perform the copy directly. Bug: angleproject:2914 Bug: angleproject:4274 Change-Id: I2c9863381f54c3467ca939d049336960c21f60b0 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2240671 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Shahbaz Youssefi ac44f8c5 2020-06-05T23:30:53 Vulkan: Apply SPIR-V optimization to internal shaders Shaves about 40KB from binary size. Bug: angleproject:2022 Bug: angleproject:3432 Change-Id: I008c18e0040b1bafe022087113681e2ace6eb7b8 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1616963 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Shahbaz Youssefi 15cff312 2020-06-10T22:44:22 Move lod-sampling shaders to shader utils Will be reused in a test in a following change. Bug: angleproject:2914 Change-Id: I4e255d5c762f2a6c064b06c558519d82ec6ead5f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2239085 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com>
Shahbaz Youssefi 000a79f1 2020-06-04T23:06:58 Vulkan: Better handling of texture level redefinition If a texture level is being redefined, there are two scenarios to consider: 1. The level is outside the base/max level, for which the image was allocated. 2. The level is within the base/max level, but it's being redefined to a different size or format. In the former case, we simply don't need to release the image. The latter case itself has two possibilities: 2.1. There is only one level in the image. 2.2. There are multiple levels in the image. In case 2.1, the whole image is being redefined (as it has only a single level), so the image can (and should) be released. Prior to this change, this behavior was adopted for all cases. This change retains this behavior for this case only. In case 2.2, the texture is becoming incomplete. However, the image shouldn't yet be released because another one of its mips may be bound to a framebuffer. In such cases as glCopyTexImage2D(), that framebuffer may in fact be the source of the copy operation (which would be destroyed if the image is released). If the base/max level of the texture doesn't change, redefining the level and making the texture incomplete doesn't make the framebuffer incomplete; this is achieved at the same time by not releasing the image. This change ensures that updates to the redefined level are staged in cases 1 and 2.2. Bug: angleproject:4274 Change-Id: I3fac3203c2fbbc16e8e4a35b1334b767120b2dcf Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2230853 Commit-Queue: Shahbaz Youssefi <syoussefi@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>
Shahbaz Youssefi 3d2de99e 2020-06-09T01:14:42 Vulkan: Fix RTs attached to textures with non-0 mip Cleared confusion between GL level indices and VK level indices by adding the corresponding suffix to variables and function arguments. A handful of places that sent one index and expected the other are fixed. The conversion between the two is given by: levelIndexGL = levelIndexVk + baseLevel; Bug: angleproject:4695 Change-Id: I84ecbaf867d00a40fb39b6db7ad79658016f4d9a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2235362 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Qin Jiajia 5abc0c56 2020-06-09T14:32:28 Fix failures that alpha channel is not correct Previously, the alpha channel was not set which resulted the intended swapchain buffer format is B8G8R8X8_UNORM. It means that the format supports 8 bits for each color channel and 8 bits unused. However, in our test case, we expect to compare the alpha channel. So we should set alpha channel explicitly. Bug: angleproject:4575 Bug: angleproject:4576 Change-Id: Ic26ee81a6a34dc44d0ae32e3dc463e9afa16e05c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2237189 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Shahbaz Youssefi dbb18b53 2020-06-05T15:23:17 Add texture base-level related tests Bug: angleproject:4695 Bug: angleproject:4696 Bug: angleproject:4698 Bug: angleproject:4699 Bug: angleproject:4701 Change-Id: Ia49e2100851c029b1ae05bc1398528170d71c3cb Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2233402 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Cody Northrop 5d7014e4 2020-06-05T15:38:47 Unmap buffers targeted by glBufferData When glBufferData is called on a mapped buffer, per the OpenGL ES 3.0 spec it is implicitly unmapped. Later calls to glMapBufferRange should not throw an error. This CL unmaps the buffer in BufferData if it is already mapped. Also adds a new test that verfies the behavior. Test: angle_end2end_tests --gtest_filter=BufferDataTestES3.BufferDataUnmap/* Test: Angry Birds 2 MEC Bug: angleproject:4599 Bug: b/157672184 Change-Id: I1a1e458aa5f50da4dfde9f6847f71cd5b6f6c08a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2233365 Commit-Queue: Cody Northrop <cnorthrop@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Manh Nguyen <nguyenmh@google.com>
Antonio Maiorano 111a4d97 2020-06-05T16:56:45 Fix copy texture to sRGB in ANGLE/VK Like the GL backend, use the CPU copy path rather than the draw path when the target is sRGB. Fixes the following WebGL tests: conformance2/textures/canvas/tex-2d-srgb8_alpha8-rgba-unsigned_byte.html conformance2/textures/canvas/tex-2d-srgb8-rgb-unsigned_byte.html conformance2/textures/image_bitmap_from_canvas/tex-2d-srgb8_alpha8-rgba-unsigned_byte.html conformance2/textures/image_bitmap_from_canvas/tex-2d-srgb8-rgb-unsigned_byte.html Re-enable CopyTextureTestES3.ES3UnormFormats for Vulkan as they now pass with this change. Bug: b/157934810 Bug: angleproject:4092 Change-Id: I6b76e5f4345d204a084f5483e206c5bb4ff2f139 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2233405 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Antonio Maiorano <amaiorano@google.com>
James Darpinian 336e8915 2020-05-29T16:09:47 Workaround broken copyTexImage2D on iOS Use BlitGL to reimplement copyTex[Sub]Image2D on iOS. Bug: angleproject:4674 Change-Id: Ie3018d6d33da57797162922410f76557124df4b6 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2222718 Commit-Queue: James Darpinian <jdarpinian@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Shahbaz Youssefi 6fad384b 2020-06-04T15:36:17 Vulkan: Add test for RT created from mip-incomplete texture The Vulkan backend creates an image with 3 mips, while it should only create one with a single mip. Bug: angleproject:4686 Change-Id: Ide7f9612c9440bfb9d9650637f6a1ad42be61208 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2230797 Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Yuly Novikov 925d1e7b 2020-06-05T14:37:03 Skip MultisampledBGRAToRGBA, MultisampledRGBAToBGRA tests on Vulkan VVL report VUID-vkCmdResolveImage-srcImage-01386 in these two. Bug: angleproject:4694 Change-Id: I4a4af598cfa77af18ccf6e322cde92749cb9ad70 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2233401 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Shahbaz Youssefi 57f7b690 2020-06-05T00:45:01 Vulkan: Enable passing tests Bug: angleproject:3950 Change-Id: I091d99951772479ef2fbdb2ac51e5bf52a263da7 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2231983 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi da958a59 2020-06-04T13:56:47 Vulkan: Fix clear of non-zero-base-level images The staged resource updates adjusted their level to take base level into account, but clear updates used a cached unadjusted value. Bug: angleproject:3148 Change-Id: I9a49d5341083b2f870baa1ee6053e54baef35086 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2230786 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Michael Spang 0117ba26 2020-06-03T17:44:39 Re-enable ShouldClearOpaqueFdRGBA8 on Pixel2 Vulkan Bug: angleproject:4630 Change-Id: Ib1e7ecd9bedf6841489f7fb5bba9cae8881aa33e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2229067 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 98865915 2020-06-02T14:56:24 No-op incomplete framebuffer invalidation. It's always legal in GL to no-op framebuffer invalidation. When the FBO is incomplete we can't pull RTs safely so no-oping incomplete invalidate calls saves us from fuzzer bugs and crashes. Bug: angleproject:3971 Change-Id: Ide550a22e6c17a28e5042165831dd684567d81fe Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2227038 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Geoff Lang f2d4abb2 2020-05-25T16:10:07 Vulkan: Correct the viewport before intersecting it with the scissor. Eliminate the potential for integer overflow when clippling a large viewport rectangle by first limiting it to the Vulkan viewport size limits. BUG=chromium:1078378 Change-Id: I2648c6136d2d27d67a3fc5dae2de821279d70d81 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2215308 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Jamie Madill 6c158164 2020-05-28T15:19:51 Vulkan: Fix XFB invalid accesses in buffer OOM. This uses the "null" buffer in the Renderer to bind an empty buffer handle so ANGLE can maintain a consistent state. Bug: chromium:1086532 Change-Id: I1912a1d1cb64433a285fcfced80a675619690a0b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2219140 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
Antonio Maiorano 3c4d7ab0 2020-06-01T17:14:28 Fix copy subtexture to GL_RGB9_E5 in ANGLE/VK When copying via glTexSubImage2D to a non-renderable format, GL_RGB9_E5, ANGLE's TextureVk::copySubTextureImpl will use the read-back and copy method. This path was ignoring the source offset in the source area computation. Fixes the following WebGL tests: conformance2/textures/canvas_sub_rectangle/tex-2d-rgb9_e5-rgb-float.html conformance2/textures/canvas_sub_rectangle/tex-2d-rgb9_e5-rgb-half_float.html Bug: b/157744725 Change-Id: I714f8d3b8f1490edab5e7578445e9623215ce229 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2225611 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Antonio Maiorano <amaiorano@google.com>
Antonio Maiorano 1e9097f5 2020-05-29T11:58:10 Enable CopyTextureVariationsTest.CopyTexture on VK These do not fail on SwiftShaderVK. Root problem was fixed at some point so we can re-enable these. Bug: angleproject:4092 Change-Id: I8a0e03eaf438b61d31a2c6461e581445d0378645 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2221424 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Le Hoang Quyen 5e13757b 2020-05-11T00:50:00 Metal: Fix array of structs containing array of samplers bug. Previously ProgramMtl could try to bind fixed slots to samplers based on layout (set=..., binding=...). However, GLSL layout model is different from Metal slots assignment. For example, The following is valid layout in GLSL: - array samplers A[2] is bound to index 0. - array samplers B[2] is bound to index 1. It is invalid to do so in Metal, since A occupies 2 slots, thus samplers B[2] must be bound to slots starting from 2. New binding method: let spirv-cross auto assigns the texture slots and retrieve them after compilation. Incomplete textures moved to ContextMtl using IncompleteTextureSet. New test added: GLSLTest.ArrayOfStructContainingArrayOfSamplers. Bug: angleproject:2634 Change-Id: Ib0edaaf8b20512e1272c37c1d4b16a88a5b35e75 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2193193 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Le Hoang Quyen 3e1e1087 2020-05-11T00:50:00 Metal: Use 2d array for caching index conversion's pipeline state. For index conversion utils, use 2d array for caching compute pipeline state based on DrawElementsType & source offset is aligned or not, instead of using std::map as previously. Also moved default shader's initialization to DisplayMtl. New test added: IndexBufferOffsetTest.DrawAtDifferentOffsetAlignments Bug: angleproject:2634 Change-Id: I1bd77aca88e03229ef8053e32add66733e33b06e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2192569 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Antonio Maiorano 9905f7f5 2020-05-29T11:25:33 Fix CopyTextureTestES3.ES3FloatFormats for VK When enabled, this would crash in debug because mFormat would be nullptr on the target VkTexture, and the ASSERT would access mFormat via getAspectFlags(). Fixed this by only calling getAspectFlags() if mFormat is valid. I'm not sure this was the original reason this test was disabled, but they pass now on SwiftShader. Bug: angleproject:4092 Change-Id: I9b04bbc61dde14f722d3a510f3d38776f4f6c7ac Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2221420 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Antonio Maiorano <amaiorano@google.com>
Antonio Maiorano 98496cab 2020-05-28T15:02:43 Fix float to int copy in VK backend This fixes WebGL tests on Vulkan (e.g. SwiftShaderVK) that copy from the canvas (GL_RGBA8) to an integer format target texture, such as: conformance2/textures/canvas_sub_rectangle/tex-2d-rg8ui-rg_integer-unsigned_byte.html The sampled normalized value needs to be scaled up by 255. Also fixes angle_end2end test CopyTextureTestES3.ES3UintFormats on Vulkan. Bug: b/156399229 Bug: angleproject:4092 Change-Id: I18d46bc4453fdc500caca96ca3a12fe93290b10c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2219142 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Antonio Maiorano <amaiorano@google.com>
Anders Leino 6820f77a 2020-05-22T17:50:03 Fix issue where last 8 bits of D24X8 influence depth calculation. Bug: angleproject:4573 Change-Id: If33737cf6ae660b8df58c06a08df32dade472540 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2211768 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Xinyi He 585e3555 2020-05-14T10:49:48 Vulkan: Remove GL_BGRX8_ANGLEX from configurations It doesn't need to expose an emulated RGB format any longer. Skip ClearTestRGB.DefaultFramebufferRGB test if GPUs don't support RGB format back buffer. Bug: angleproject:4631 Change-Id: Ifa2d2ed6f863dcb698f7eea3e752a8cd5d5e0ced Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2198888 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>