src


Log

Author Commit Date CI Message
Ian Vollick 9199e77d 2023-03-30T17:25:33 [ios] simulator fixes for angle_unittests Disables some tests that do not currently work in the iOS simulator. Bug: angleproject:8116 Change-Id: I66bb9a6e2a5d10a567824e9fac163e7fd6b6a474 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4393495 Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Kenneth Russell <kbr@chromium.org>
Shahbaz Youssefi 8b79410b 2023-04-02T22:25:12 Vulkan: Treat readonly SSBOs as readonly! Instead of assuming SSBOs are always written to, this change adds plumbing for the backend to know when an SSBO is declared readonly and marks the buffer readonly accordingly. With this change, BufferVk can optimize uploads and copies to and from the buffer with the knowledge that it can be safely mapped on the CPU for read while it's being used by the GPU. Bug: b/276002151 Change-Id: I75342148c07949a83436054a738395bbd88caec5 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4392720 Reviewed-by: Charlie Lao <cclao@google.com> Reviewed-by: Yuxin Hu <yuxinhu@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi 25e60197 2023-03-31T14:17:26 Vulkan: Unify buffer alloc strategy for uploads and GPU copies With this change, glCopyBufferSubData uses the same buffer allocation strategy as glBufferSubData. Only exception is with buffer self-copies which never allocate a new buffer for simplicity. Additionally, this change allows glCopyBufferSubData to be done on the CPU if possible, i.e. if the source buffer is not being written to by the GPU and whenever the equivalent glBufferSubData would have used a CPU upload. Bug: b/276002151 Change-Id: Ice8df5891c5516b148245d5d6fa9b19b787df4ce Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4390023 Reviewed-by: Charlie Lao <cclao@google.com> Reviewed-by: Yuxin Hu <yuxinhu@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Roman Lavrov b49f9520 2023-04-03T18:11:04 Trace Interpreter: Improve ReadFileToString performance. Shaves off ~1s (~15%) from ~7.5s parse time on Panther for minecraft_bedrock trace. Switches the stream to std::ios::binary so on Windows the caller will need to handle \r\n Bug: b/276742336 Change-Id: I0c14e76168763875da60a0fdefb879859b0b3d0c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4392894 Commit-Queue: Roman Lavrov <romanl@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Roman Lavrov b30c05de 2023-04-04T09:36:28 Trace Interpreter: Add #include <algorithm> ANGLE-Dawn roll failed with: error: no member named 'lower_bound' in namespace 'std' Bug: b/276742336 Change-Id: Ife3d83aaa2b9f29f3750e880a12dfccf3f8fe915 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4391765 Auto-Submit: Roman Lavrov <romanl@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Charlie Lao 41f0a321 2023-04-03T21:58:43 Revert "Vulkan: Reactivate already started render pass when possible" This reverts commit ad9537af7f2bb5e22bc73f4e833fd3789adaa217. Reason for revert: Suspected cause for flakiness. anglebug.com/8118 Original change's description: > Vulkan: Reactivate already started render pass when possible > > In some usage case (such as lineage_mobile), we are seeing in the middle > of render pass, app switch to another fbo just to issue a glClear() > call, which the clear call itself gets deferred. Application then switch > back to the original frame buffer. Before this CL, the render pass gets > recreated due to frame buffer binding change, even though the clear gets > deferred and new render pass and the previous render pass are > essentially the same. This CL detects this situation and reactivate the > current render pass instead of creating a new one. With this CL, > lineage_m app trace reduces frame time from 3.86ms to 3.7ms, and only > one render pass is used instead of two. > > This CL also allows the render pass started by BlitFramebuffer reused by > subsequent draw calls. Asphalt_9 is hitting this use pattern and this CL > reduces frame time by 0.1245 ms (from 5.6203 ms to 5.4958 on pixel 7 > pro) > > Bug: b/273808966 > Change-Id: I48c2671cbef3ff9d6cf59caae88c37c77828ee07 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4348713 > Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com> > Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> > Commit-Queue: Charlie Lao <cclao@google.com> Bug: b/273808966 Change-Id: I81cc2dcacb52466808b2ccf5819feda466c39fc5 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4396502 Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Auto-Submit: Charlie Lao <cclao@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi 3aea3cfd 2023-04-03T16:38:29 Vulkan: Workaround depth bias constant factor on ANV Bug: b/249380591 Change-Id: Iaeda7faf5eb40e0e2086674d3e63bf5bc9911ab4 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4392893 Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com> Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org> Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Roman Lavrov c723d71f 2023-04-03T16:17:01 Trace Interpreter: Improve StringToGLenum performance. Binary search instead of linear. This gets called a lot when parsing traces to be run by the trace interpreter. I saw ~37 seconds parse time on Panther for minecraft_bedrock trace, this CL makes that ~5 times faster. Bug: b/276742336 Change-Id: Ide32c247b327f36c00f26951a90e4412d71db2b6 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4392892 Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Roman Lavrov <romanl@google.com>
Charlie Lao 96cda1ac 2023-03-31T15:08:11 Vulkan: Switch to modified framebuffer should trigger submit The feature flag preferSubmitAtFBOBoundary intended to trigger submitCommands call when FBO is switched. Right now there is a bug that when FBO is switched, submitCommands did not get called even if feature is enabled. The reason is that when framebuffer changed, we first get FramebufferVk::syncState call, and if the FBO that we switched to is drity, we will end up calling ContextVk::flushCommandsAndEndRenderPass to immediate end the render pass. The problem with that is that later on when we get to ContextVk::syncState and saw DIRTY_BIT_DRAW_FRAMEBUFFER_BINDING dirty bit and try to issue a submit, we notice render pass already ended, so mHasDeferredFlush never gets set, which means we never call submitCommands. All apps render to system framebuffer in the last render pass, and system framebuffer is always dirty due to swap chain image rotation, we hit this almost with every app. This CL avoid flushCommandsAndEndRenderPass() call from FramebufferVk::syncState. We now relies on ContextVk::onFramebufferChanged (which calls onRenderPassFinished() which will set DIRTY_RENDER_PASS bit to trigger deferred endRenderPass) to end the current render pass. This CL also add a regression test to ensure the submit indeed occur. Bug: b/275624771 Change-Id: I92b95a7a6c435f242d6684cb7852172cf41896c3 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4390642 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Charlie Lao <cclao@google.com> Reviewed-by: Roman Lavrov <romanl@google.com>
Shahbaz Youssefi c5e9de23 2023-04-03T15:14:03 Revert "Vulkan: Use midRenderPass clear if RP has started but inactive" This reverts commit 98151770adfd990c533991da27615b4879494307. Reason for revert: Suspected cause for flakiness. anglebug.com/8118 Original change's description: > Vulkan: Use midRenderPass clear if RP has started but inactive > > This CL extends prior CL's optimization so that if clear is issued right > after blitFramebuffer call (this could make sense if blit and clear are > on different buffer), we can keep the started render pass and do the > midRenderPass clear instead of endRenderPass and start another > renderPass. > > Bug: b/273808966 > Change-Id: Ia2504e8e260867a6f797d42cd4c8a72f187280ef > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4374145 > Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Bug: b/273808966 Change-Id: I7a11635a6eceafb6f4fb3a0d95f6627ee98321c0 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4393497 Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Geoff Lang f1f80e1e 2023-03-22T12:54:08 Metal: Always prefer staged GPU uploads for textures. Uploading Metal texture data via MTLTexture::replaceRegion is a source of lots of CPU hangs and jank. There may be better heuristics to determine if we should do a CPU vs GPU upload but for now preferring GPU uploads has better overall performance. This also improves the MotionMark images test: - 40 -> 100 when using Metal. - 217 -> 235 when using Metal + https://chromium-review.googlesource.com/c/chromium/src/+/4091749 Bug: angleproject:8024, angleproject:8092, angleproject:8109 Change-Id: I36b5f585884391b4cc416365ae65f8542745beee Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4264963 Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Igor Nazarov ec307af4 2023-03-30T14:17:52 Fix bug in DeallocateGlobalMutex(). Bug: angleproject:6851 Change-Id: Ie5dd32220a38a9b7a9a18ff830a4ee7b7c02b9c3 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4381863 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Igor Nazarov <i.nazarov@samsung.com> Reviewed-by: Charlie Lao <cclao@google.com>
Igor Nazarov a1319e7f 2023-03-29T20:09:48 Tests: Fix EGLContextSharingTestNoFixture.SwapBuffersShared. Sometimes `swapThread` may finish until `renderThread` wait for `Step::TextureInitialized` step. In this situation `swapThread` will change `currentStep` to `Abort` in the `ThreadSynchronization<>` destructor, causing wait for `Step::TextureInitialized` to fail. Bug: angleproject:6851 Change-Id: Ib08b6de11873e9959eaa810bcf8cb404c95c80d4 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4381626 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Igor Nazarov <i.nazarov@samsung.com>
Alexey Knyazev b24b5568 2023-03-27T00:00:00 Vulkan: Skip sample coverage for single sample rendering A new test sets sample coverage to zero and checks that it is applied only to multisampled rendering. Bug: angleproject:8102 Change-Id: I1a5649869e9b7ecf0543108fb99095bfaf6fd858 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4379839 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
Cody Northrop 55fbc2c5 2023-03-31T13:15:19 Revert "Tests: Add Gacha Life trace" This reverts commit 98deaef0ebf2709f45e75e5571bb52aa4c8d6246. Reason for revert: angle_trace_test_apk is too large to sign Before this trace, if you compiled the APK with all traces enabled, we were right on the edge of MAX_INT (2147483647). ApkSigner doesn't support 64-bit offsets. Original change's description: > Tests: Add Gacha Life trace > > Test: angle_trace_tests --gtest_filter="*gacha_life*" > Bug: b/267382443 > Change-Id: I6bbfb28015bf0317ccdba699e08ce6bce51b4ce3 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4211589 > Reviewed-by: Roman Lavrov <romanl@google.com> Test: autoninja -C out/AndroidPerformance angle_trace_tests Bug: b/276474703 Change-Id: I1a3fd6386f20dc498e4f8c8b147d4431277ecc50 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4387371 Commit-Queue: Cody Northrop <cnorthrop@google.com> Reviewed-by: Roman Lavrov <romanl@google.com>
Maksim Sisov 61cd24d4 2023-03-31T14:54:17 MTLPixelFormatRGB9E5Float is not renderable on simulator. See https://developer.apple.com/documentation/metal/ developing_metal_apps_that_run_in_simulator?language=objc Bug: angleproject:7994 Change-Id: I07e50c19aaf6d033c7c25d0dbd4b21a8c255c1d9 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4386403 Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Kenneth Russell <kbr@chromium.org>
Kimmo Kinnunen f176027f 2023-03-31T13:37:03 CGL: implement EGL_ANGLE_wait_until_work_scheduled It is as important to wait until scheduled in CGL, as it is in Metal. CGL waits until scheduled when glFlush() is called. Fixed: angleproject:8112 Change-Id: Id4a9e87804c6df1828b35cfd30c8427314820e52 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4386400 Commit-Queue: Kenneth Russell <kbr@chromium.org> Auto-Submit: Kimmo Kinnunen <kkinnunen@apple.com> Reviewed-by: Kenneth Russell <kbr@chromium.org>
Shahbaz Youssefi 552d4271 2023-03-31T10:59:30 Vulkan: Refactor buffer init logic Bug: b/276002151 Change-Id: I28d3fa34ab11340cc8b38743e87664a514870068 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4388547 Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Cody Northrop 98deaef0 2023-03-30T19:15:24 Tests: Add Gacha Life trace Test: angle_trace_tests --gtest_filter="*gacha_life*" Bug: b/267382443 Change-Id: I6bbfb28015bf0317ccdba699e08ce6bce51b4ce3 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4211589 Reviewed-by: Roman Lavrov <romanl@google.com>
Constantine Shablya e975f9dc 2022-11-09T06:44:06 Capture/Replay: handle paletted textures Add a method for recompressing paletted textures on capture. Bug: angleproject:7710 Change-Id: I11af0c1cd7c3b63850c5daf96eafcd3efce65f16 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4178311 Commit-Queue: Cody Northrop <cnorthrop@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Shahbaz Youssefi 336bfd60 2023-03-30T00:16:40 GL: Fix the RewriteRepeatedAssignToSwizzled workaround This transformation splits chained assignments where the LHS is assigning to a swizzle. However, instead of retaining the assignment operator (like *=, += etc), it was accidentally unconditionally using `=`. Bug: chromium:1394345 Change-Id: Icaef159e1fb57e720e08d4b4f6603f08d9cd2bfe Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4381648 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Cody Northrop f066ae7d 2023-03-30T19:01:17 Tests: Add Teslagrad trace Test: angle_trace_tests --gtest_filter="*teslagrad*" Bug: b/276316424 Change-Id: If4056451ba3b948ade8466f93560694f76ab53c5 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4385779 Reviewed-by: Roman Lavrov <romanl@google.com>
Colin Blundell 6458cd95 2023-03-30T14:27:07 [GL backend] Remove over-zealous ASSERT in StateManagerGL.cpp StateManagerGL::bindVertexArray asserts that the passed-in |vaoState| pointer is non-null; however, we actually pass in null directly in [1]. This assert goes off when running a WebView test with ANGLE. [1] https://source.chromium.org/chromium/chromium/src/+/main:third_party/angle/src/libANGLE/renderer/gl/StateManagerGL.cpp;l=3385;drc=48340c1e35efad5fb0253025dcc36b3a9573e258;bpv=1;bpt=1 Bug: chromium:1168587 Change-Id: I14d5f9f317f3cbe2a828ab7637edc5f1911bf81c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4381861 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Yuly Novikov a3a649b0 2023-03-31T09:16:48 Skip BlitFramebufferTest.scissorDrawBlitAndDrawAgain on Mac AMD GL Fails since added in https://ci.chromium.org/ui/p/angle/builders/ci/mac-exp-test/258/overview Bug: b/273808966 Change-Id: I62f8876e4d177983082b3e21e50803c9c7fab0d4 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4386397 Auto-Submit: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Dean Jackson 5fcd027e 2023-03-29T08:54:34 Fix the watchOS build for the mirror clamp to edge extension The mirror clamp to edge extension relies on MTLSamplerAddressModeMirrorClampToEdge, which is not available on watchOS. Disable the extension there for the moment. Bug: angleproject:8103 Change-Id: I52b9d5217b39080cde6663e0d0fa839e53dacecf Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4379037 Reviewed-by: Kenneth Russell <kbr@chromium.org>
Charlie Lao 20f3df07 2023-03-30T11:36:29 Vulkan: ImageHelper::initExternal missing some variable init When ImageHelper::releaseImage is called and then re-initialized (due to mipmap change or usage change etc), right now we have a bug that mCurrentShaderReadStageMask and mLastNonShaderReadOnlyLayout are still left as is. And they do not get reset when image is initialized. This means if the image was reinitialized again, it may end up think the new image was previously used by fragment shader and insert an unnecessary barrier when new VkImage is used. This was discovered when I do the experimental work try to ghost VkImage for glTexSubImage call and realized that new VkImage was having a strong fragment->vertex dependency which it should not (since this is a new VkImage). This CL initialize mCurrentShaderReadStageMask and mLastNonShaderReadOnlyLayout and mCurrentQueueFamilyIndex from initExternal call since it is a new vkImage. Bug: b/273808966 Change-Id: I5bbeae5f1012f10c24620cfae8fa20365a7b5ab7 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4386136 Reviewed-by: Yuxin Hu <yuxinhu@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Charlie Lao 98151770 2023-03-27T09:49:33 Vulkan: Use midRenderPass clear if RP has started but inactive This CL extends prior CL's optimization so that if clear is issued right after blitFramebuffer call (this could make sense if blit and clear are on different buffer), we can keep the started render pass and do the midRenderPass clear instead of endRenderPass and start another renderPass. Bug: b/273808966 Change-Id: Ia2504e8e260867a6f797d42cd4c8a72f187280ef Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4374145 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Charlie Lao ad9537af 2023-03-16T16:03:29 Vulkan: Reactivate already started render pass when possible In some usage case (such as lineage_mobile), we are seeing in the middle of render pass, app switch to another fbo just to issue a glClear() call, which the clear call itself gets deferred. Application then switch back to the original frame buffer. Before this CL, the render pass gets recreated due to frame buffer binding change, even though the clear gets deferred and new render pass and the previous render pass are essentially the same. This CL detects this situation and reactivate the current render pass instead of creating a new one. With this CL, lineage_m app trace reduces frame time from 3.86ms to 3.7ms, and only one render pass is used instead of two. This CL also allows the render pass started by BlitFramebuffer reused by subsequent draw calls. Asphalt_9 is hitting this use pattern and this CL reduces frame time by 0.1245 ms (from 5.6203 ms to 5.4958 on pixel 7 pro) Bug: b/273808966 Change-Id: I48c2671cbef3ff9d6cf59caae88c37c77828ee07 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4348713 Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Charlie Lao <cclao@google.com>
Geoff Lang 3c8aee63 2023-03-27T13:24:47 D3D11: Fix streamed instanced attribute size calculation. D3D11 passes around a 0 instance count to signify "not an instanced draw call". This had an incorrect interaction with ComputeVertexBindingElementCount which checks for an instance count of 0 and skips instancing calculations. Force instance count to be at least 1 when computing buffer size needed. Bug: chromium:1425606 Change-Id: Ia10fa1c11abebce28c57ce4527e2b748e51516ce Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4375138 Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Shahbaz Youssefi 48b431ca 2023-03-21T16:39:33 Vulkan: Fix stage component reservations w.r.t xfb Input components limit don't need to reserve any components. This change also fixes a bug where the tessellation evaluation output components didn't reserve a slot for gl_Position. Additionally, the input component count of stages are clamped by the output component count of the previous stages. Bug: b/274289482 Change-Id: Ib5b4243d7a4cb713ccea505a5f0064bf3377caa8 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4356115 Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Yuxin Hu <yuxinhu@google.com> Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Cody Northrop 31321cb3 2023-03-28T09:57:48 Tests: Add Minecraft Bedrock trace This CL adds a new Minecraft trace. The app has changed engines since our first trace, updating to the Bedrock engine. Also, our first trace was recorded on Qualcomm, and the trace does not behave correctly on ARM. This also bumps the original minecraft version, but the content is unchanged. Test: angle_trace_tests --gtest_filter="*minecraft_bedrock*" Bug: b/183647942 Bug: b/197965659 Change-Id: Id65889c65df8a6a3a1560ccbe4fce239982d98de Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4376790 Reviewed-by: Roman Lavrov <romanl@google.com>
Yuxin Hu 29abd5a2 2023-03-06T11:35:45 Explicitly Add Aliased Memory Decoration in SpirV In GLSL, aliased memory qualifier is implicitly available, unless we explicitly specify the memory is restrict: https://www.khronos.org/opengl/wiki/Type_Qualifier_(GLSL)#Memory_qualifiers. However, in SpirV, aliased memory qualifier has to be explicitly specified: https://registry.khronos.org/SPIR-V/specs/unified1/SPIRV.html#AliasingSection This change adds the aliased memory decorations to SSBO if the GLSL does not specify the restrict memory qualifier. This is a temporary workaround to fix the deqp test failures on some android devices. Eventually we would like to waive this test for ANGLE due to alised memory in Vulkan does not suppose to affect SSBOs that have different set/binding, please refer to this Khronos ticket for more details: https://gitlab.khronos.org/Tracker/vk-gl-cts/-/issues/4321 Bug: b/266235549 Change-Id: Ic7afc417a5d421664b60e0413a011314787e14e7 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4312130 Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Geoff Lang bb15ceef 2023-03-27T11:32:30 Remove syncing of extended dirty bits for TexImage calls. All extended dirty bits were synced for glTexImage calls but many of them required valid GL state or a complete framebuffer. This caused errors in the Vulkan backend when we would read and write out of bounds of the framebuffer due to an incorrect render area. Bug: chromium:1410191 Change-Id: I17f156f71ded72761b631ef9842b048a9173c9b7 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4374102 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Mark Lobodzinski 14ddf569 2023-03-29T10:00:47 Tests: Add fishdom trace Test: angle_trace_tests --gtest_filter="*fishdom*" Bug: b/275532615 Change-Id: I2c5668db7f9ae9f1cdf87887640fc2faf0758d6d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4374161 Reviewed-by: Cody Northrop <cnorthrop@google.com>
Mike Schuchardt 4afbbe85 2023-03-28T09:08:31 Tests: Add Vainglory trace Test: angle_trace_tests --gtest_filter=TraceTest.vainglory Bug: b/275526619 Change-Id: Ie06afa408d61935c7ab8d4f4f15f38e10b38821a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4376791 Reviewed-by: Cody Northrop <cnorthrop@google.com>
Shahbaz Youssefi fe45418c 2023-03-28T11:43:23 Translator: Limit the size of private variables in WebGL shaders As a follow up to https://chromium-review.googlesource.com/c/angle/angle/+/3023033, the limit to shader-private variables (locals and globals) is further reduced to 1MB. A variable that large will not fit in GPU registers and will spill to memory, killing performance. Bug: chromium:1427865 Change-Id: I77314d4b891c591cd9a83ad2aebb77d7256f3ada Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4377639 Reviewed-by: Kenneth Russell <kbr@chromium.org>
Shahbaz Youssefi 97897d92 2023-03-27T16:02:57 Vulkan: Work around driver bug with dynamic primitive restart This CL forces the state to be static on buggy drivers. Bug: b/275210062 Change-Id: Ia3391ecb19c3c9d19c05a83e11da8c718513a4e2 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4374104 Reviewed-by: Yuxin Hu <yuxinhu@google.com> Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@google.com>
Shahbaz Youssefi 8b81a3d2 2023-03-27T10:03:34 GLES1: Use ASCII minus in comment Bug: angleproject:7933 Change-Id: I05fb4512594447ff02078f1845c1ceb74c1b27ce Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4374097 Reviewed-by: Yuxin Hu <yuxinhu@google.com> Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org>
Alexey Knyazev 6d12a280 2023-03-24T00:00:00 D3D11: Support NV_shader_noperspective_interpolation Fixed: angleproject:8096 Change-Id: Ic7c27c735661b2ef8095c81201b2ce0a82ad3ae7 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4368472 Reviewed-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang da7dd31f 2023-03-27T11:29:10 GL: Disable extended dirty bit states for internal blits. New GL states have been added to the GL backend and not updated in ScopedGLState which is used to reset internal state for blits. This caused test failures when tests were run in specific orders. Ex: ClipDistanceTest.ThreeClipDistancesRedeclared/ES2_OpenGL:CopyTextureVariationsTest.CopySubTexture/ES2_OpenGL__AToBGRAFlipYUnmultiplyAlpha Bug: angleproject:5160 Bug: chromium:1410191 Change-Id: I805e39bc8c4c7d7d843b43fdc7813dd668919e8a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4374101 Reviewed-by: Peng Huang <penghuang@chromium.org>
Alexey Knyazev 21ffb23a 2023-03-27T00:00:00 Add sample coverage regression tests * SimpleOperationTest.DrawSingleSampleWithCoverage * SimpleOperationTest.DrawSingleMultiSampleWithCoverage Bug: angleproject:8102 Change-Id: Iedc520a2c7d21912c3969ceaf3a8f1ef2ed7eae0 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4379837 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi 57dd0e5f 2023-03-27T13:05:36 Translator: Initialize out arguments too for WebGL Local variables were initialized for WebGL, but not `out` arguments. However, `out` arguments completely overwrite the passed-in variable at call site, so they should also be zeroed out. Bug: chromium:1425685 Change-Id: Ib2f61a962eea74c4933aafa4d5ad377189cec578 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4375137 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Charlie Lao fcf0ddeb 2023-03-27T15:27:29 Vulkan: Add more blitFramebuffer test UtilsVk::blitResolveImpl() implementation will set up customized program and scissor rect to implement blit. In other CL we may reuse the render pass that started by blit. This CL adds more test to ensure that continiued draw without any state change will continue work properly (i.e, the state destroyed by blit gets restored properly for the follow up draw calls issued by application). Bug: b/273808966 Change-Id: I164803512b334ca467ca08ea3b008b153fac334d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4375099 Reviewed-by: Yuxin Hu <yuxinhu@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Charlie Lao <cclao@google.com>
Geoff Lang c6ec59dc 2023-03-27T11:15:48 Explicitly pass the extended dirty bits to syncState. Add a the extended dirty bits and bit mask to syncState instead of calling gl::State::getAndResetExtendedDirtyBits when encountering DIRTY_BIT_EXTENDED. It disallowed us from masking the extended dirty bits and feels like an anti-pattern to modify the extended dirty bits in gl::State from the backend. This is a refactor only. Bug: chromium:1410191 Change-Id: I66fdec3eb57e3426cf0fda9ccb759700eafdda14 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4374100 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Alexey Knyazev fc7cb00e 2023-03-24T00:00:00 Metal: Support NV_shader_noperspective_interpolation Fixed: angleproject:8095 Change-Id: Ieded1f704f82963984f1aee5072f152de0de374c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4368473 Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Alexey Knyazev 1ee27fcd 2023-03-24T00:00:00 Fix translation of noperspective interpolation qualifier Auxiliary storage qualifiers used with 'noperspective' interpolation must be retained during ESSL translation * Added new qualifiers: * EvqNoPerspectiveCentroid * EvqNoPerspectiveCentroidIn * EvqNoPerspectiveCentroidOut * EvqNoPerspectiveSample * EvqNoPerspectiveSampleIn * EvqNoPerspectiveSampleOut * Adjusted GLSL and SPIR-V output * Adjusted 'sample' rank to be the same as 'centroid' Fixed: angleproject:4388 Change-Id: Iffc80a7a3b057beffd3bcbbc9446eeed77183c99 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4368471 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
Kramer Ge fbb16d64 2023-03-24T02:23:19 Mali: Disable disjointTimerQueries on ChromeOS with MaliT8xxOrOlder ChromeOS boards using MT8183 are encountering GL_OUT_OF_MEMORY errors when using disjointTimerQueries, which leads to meets visual effects freezing after a couple of seconds. Extend the workaround treatment to ChromeOS. Bug: chromium:1356053,b/269068358 Change-Id: I212f2b4a2fed1ddd8e8344bde4f4ca9069ea3393 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4369684 Commit-Queue: Kramer Ge <fangzhoug@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Auto-Submit: Kramer Ge <fangzhoug@chromium.org>
Colin Blundell abbbe970 2023-03-24T08:10:40 [GL backend] Get texture bindings size from frontend caps EGLContext currently sets the texture bindings size to be GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS. StateManagerGL later copies these bindings into its own textures array [1]. However, the latter texture array is clamped to a size of max 96 [2], and thus this copy can overflow (see crash in crbug.com/1418842). This CL changes the texture bindings size to be set from the frontend caps rather than the native caps. The former have the same clamping as for StateManagerGL's textures. [1] https://source.chromium.org/chromium/chromium/src/+/main:third_party/angle/src/libANGLE/renderer/gl/StateManagerGL.cpp;drc=c85c710dec58dfdcf2f35af647a0a5155639edd5;l=3274 [2] https://source.chromium.org/chromium/chromium/src/+/main:third_party/angle/src/libANGLE/angletypes.h;drc=4a77b0f5237515960673b9bd1bc5a229f0eeaa95;l=952 [3] https://source.chromium.org/chromium/chromium/src/+/main:third_party/angle/src/libANGLE/Context.cpp;l=4050-4059;drc=b4bc946c63b2b95e1f05dec4e84adcadd10499c6 Bug: chromium:1418842 Change-Id: I66c10b640f70d9dc6c7d41925f12ffb7a3ba78e0 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4369699 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Alexey Knyazev d8c9ba9a 2023-03-27T00:00:00 Avoid defaulted comparison operator Not available until C++20. Bug: angleproject:8046 Change-Id: I6f4093b0bdccca55818109836e2e0d68f66897b9 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4373861 Reviewed-by: Brian Osman <brianosman@google.com> Auto-Submit: Alexey Knyazev <lexa.knyazev@gmail.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Alexey Knyazev afc1e5dc 2023-03-27T00:00:00 GL: Support OES_sample_variables Bug: angleproject:8097 Change-Id: I983d6e83fe9ca942c91cbdf7274b46306e38f11f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4368476 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
Hailin Zhang 1301402c 2023-03-23T21:56:45 Vulkan: improve etc to bc grident texture precison. ETC has gradient modes. Two endpoints in BC are RGB565; the color depth is lower than ETC. Two endpoints in RGB888 space may be quite different, but after conversion to RGB565 they may be projected to the same point. This conversion loses quite a lot of details. This change tries to change one endpoint to an adjacent one (not optimal) in RGB565, so that all the colors are interpolated from these two endpoints. With this change, the arknight image in b/259327729 improved PSNR from 39 to 49. This change includes some of work by @gregschlom 1) Use look up table instead of bit operation. 2) Use more vector operations. This may not improve the performance but makes the code short and neat. bug: b/259327729 Change-Id: Ic0720aff17af5d466e5598dc38ba953dc084a3cc Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4368021 Reviewed-by: Charlie Lao <cclao@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Hailin Zhang <hailinzhang@google.com>
Cody Northrop 249b03ac 2023-03-24T15:11:10 restricted_trace_perf: Delete settings when using default Follow up to the addition of `--renderer default`, actively delete the settings if default is chosen. Otherwise the script will just use whatever settings you already have. Test: restricted_trace_perf.py Bug: b/269645211 Change-Id: I83be7e3f7fa2f2a2bc9f9d243820b49a3cdbed82 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4368874 Commit-Queue: Cody Northrop <cnorthrop@google.com> Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Igor Nazarov 435e557c 2023-03-22T21:35:09 Vulkan: Do not enforce custom ANGLEs secondary command buffers. This change become possible after the commit: Vulkan: Fix Secondary Command Buffers with asyncCommandQueue. After the above change, `attach/detachAllocatorImpl<>()` will be skipped when using Vulkan secondary command buffers. Other places that use `mCommandAllocator` already no-op regardless of the allocator type. Therefore enforcing: ANGLE_USE_CUSTOM_VULKAN_OUTSIDE_RENDER_PASS_CMD_BUFFERS ANGLE_USE_CUSTOM_VULKAN_RENDER_PASS_CMD_BUFFERS when enabling `angle_enable_vulkan_shared_ring_buffer_cmd_alloc` is no longer required. This will remove possible confusion when configuring ANGLE build and allow mixing Vulkan secondary command buffers and ANGLEs custom secondary buffers that use `shared_ring_buffer_cmd_alloc`. Bug: angleproject:6401 Bug: b/256666069 Change-Id: I52a64065e6ce9e4aabbf76031c3f5443e0e26a3a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4360071 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Igor Nazarov <i.nazarov@samsung.com> Reviewed-by: Charlie Lao <cclao@google.com>
Igor Nazarov aa8f2e4b 2023-03-22T19:53:04 Vulkan: Minor SecondaryCommandPool::destroy() optimization. Follow up for the commit: 9b6368ccfceddf1784ef41e95e57696453cca71d Vulkan: Fix freeing Secondary Command Buffers from wrong thread. Bug: angleproject:6100 Change-Id: I8ef34898941c0c5684d3ea4378332cdf6b87c0c8 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4359703 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Igor Nazarov <i.nazarov@samsung.com> Reviewed-by: Charlie Lao <cclao@google.com>
Igor Nazarov 85735eb4 2023-03-17T19:56:23 Vulkan: Enable async features for Secondary Command Buffers. Since, all known problems with Secondary Command Buffers and async features are fixed, it should be safe to allow enabling these features for testing. Locally, this CL passes custom build dEQP tests (EGL/GLES2/3/3.1) with asyncCommandQueue and Vulkan Secondary Command buffers enabled. Tests were executed on S906B that uses ANGLE as the system GLES driver. Bug: angleproject:6811 Bug: angleproject:6100 Change-Id: Id3ef6df56f0a3bd1986f2e6047f01e6eac165fc6 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4350270 Reviewed-by: Charlie Lao <cclao@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Igor Nazarov <i.nazarov@samsung.com>
Cody Northrop 2bd8acfe 2023-03-23T18:24:43 Tests: Add Geometry Dash trace Test: angle_trace_tests --gtest_filter="*geometry_dash*" Bug: b/271876646 Change-Id: I18ab2f22230f0c63d3aaf7c825c9cc55d896d4d0 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4368019 Commit-Queue: Cody Northrop <cnorthrop@google.com> Reviewed-by: Roman Lavrov <romanl@google.com>
Igor Nazarov e27e7c6a 2023-03-17T19:43:54 Vulkan: Retire Command Buffers before destroying the Pools. "VulkanSecondaryCommandBuffer"s may be still in "CommandQueue" when "ContextVk" destroys the Command Pools (asyncCommandBufferReset = true). Fixed by calling "retireFinishedCommandsLocked()" when appropriate. Normally, it is only required to retire Vulkan Secondary Buffers. However, some drivers may have bug and also require to reset Primary Buffers, that have Secondaries recorded, before destroying the Secondaries Pools. Bug: angleproject:6811 Bug: angleproject:6100 Change-Id: I891547c95cfbdfab44398980f939596af56ab57b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4350269 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Igor Nazarov <i.nazarov@samsung.com> Reviewed-by: Charlie Lao <cclao@google.com>
Igor Nazarov 9524c639 2023-01-17T18:47:47 Vulkan: Fix Secondary Command Buffers with asyncCommandQueue. This change fixes following errors (asyncCommandQueue = true): 1. "vkEndCommandBuffer()" called from "asyncCommandQueue" thread. Call stack: vkEndCommandBuffer() VulkanSecondaryCommandBuffer::end() OutsideRenderPassCommandBufferHelper::flushToPrimary() CommandQueue::flushOutsideRPCommands() CommandProcessor::processTask() Fixed by calling "vkEndCommandBuffer()" from the Context thread in the new "OutsideRenderPassCommandBufferHelper::detachCommandPool()" method. 2. "vkAllocateCommandBuffers()/vkBeginCommandBuffer()" called from "asyncCommandQueue" thread. Call stack: vkAllocateCommandBuffers()/vkBeginCommandBuffer() VulkanSecondaryCommandBuffer::initialize() <*>CommandBufferHelper::initializeCommandBuffer() <*>CommandBufferHelper::reset() <*>CommandBufferHelper::flushToPrimary() CommandQueue::flush<*>Commands() CommandProcessor::processTask() Fixed by calling "vkAllocateCommandBuffers()/vkBeginCommandBuffer()" from the Context thread in the new "<*>CommandBufferHelper::attachCommandPool()" method. 3. "SecondaryCommandPool::collect()" called from "asyncCommandQueue" thread without synchronization. Call stack: SecondaryCommandPool::collect() rx::vk::RecycleCommandBufferHelper() CommandBufferRecycler<>::recycleCommandBufferHelper) RendererVk::recycle<*>CommandBufferHelper() CommandProcessor::processTask() No need for this call, because "SecondaryCommandPool" is already detached. Notes: This CL not only fixes errors, but also optimizes CommandBufferHelper recycling. Before, there was no recycling plus unnecessary "VulkanSecondaryCommandBuffer" allocation/freeing. Further optimization may add multiple "VkCommandPool"s to the "SecondaryCommandPool" to allow resetting buffers in the async thread. Bug: angleproject:6811 Bug: angleproject:6100 Change-Id: I7004c27a112e916c5c973b43b137193017d6aa3d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4342189 Reviewed-by: Charlie Lao <cclao@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Igor Nazarov <i.nazarov@samsung.com>
Amirali Abdolrashidi dae99340 2023-03-23T14:36:28 Remove uninited pixel check from TexStorageWithPBO Towards the end of the test "TexStorageWithPBO" from Texture2DTest, the color of the pixel outside the red square is checked to confirm that it is black. However, due to that part being uninitialized in the test, its color could be left over from a prior test, causing a failure. * Removed the pixel check for outside the square. * Updated the color check for the square to cover its whole area. Bug: angleproject:4126 Bug: angleproject:5081 Bug: angleproject:5097 Bug: angleproject:5651 Bug: angleproject:8093 Change-Id: I3ceb8cf30456f51a60630f9e258210a8ccae0d95 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4367898 Reviewed-by: Yuxin Hu <yuxinhu@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Amirali Abdolrashidi f2c5ce4e 2023-03-16T17:44:56 Re-enable mutable texture upload for one context It was observed that in some apps, mutable textures are uploaded in a context, but that context's outside RP command buffer is not flushed at all, resulting in invalid (noise) or incorrect textures. * Added isEligibleForMutableTextureFlush() to be used to determine whether onMutableTextureUpload() should be called. * Restricted the use of mutable texture upload to single-context share groups. * When the number of contexts becomes greater than one, the original context's outside render pass command buffer is flushed. * Added related tests. * Added a test to make sure that textures can be uploaded in one thread, and used for draw calls in another, with the help of a sync object. * Added a test to make sure that textures can be uploaded in the main thread, and used in a new thread. * Added a test in which a new context is created after mutable mipmap textures are defined. Bug: b/264143971 Change-Id: I66c0d8b04d39bb7244e5752aac0e46a0192f012e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4349156 Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Alexey Knyazev 997c4c7b 2023-03-21T00:00:00 D3D11: Implement EXT_conservative_depth Drive-by: * Hid the extension from ES 2.0 client contexts. Bug: angleproject:8046 Change-Id: I8bca4161dde4bda7ee75541b9164777884900d89 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4366784 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
Alexey Knyazev 648f3657 2023-03-21T00:00:00 Metal: Implement EXT_conservative_depth Bug: angleproject:8046 Change-Id: I3b9f497da19bf005c7948e552f2e1c7415d4ac6d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4363020 Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com> Reviewed-by: Kyle Piddington <kpiddington@apple.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Yuly Novikov 34a06e25 2023-03-15T18:46:55 Start MacBook Pro AMD 2019 experiment on ANGLE bots Suppress failing tests Bug: chromium:1382149, angleproject:8091 Change-Id: I817d3db8badc35a12ecc9650750ca9190c617f6c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4341695 Commit-Queue: Geoff Lang <geofflang@chromium.org> Auto-Submit: Yuly Novikov <ynovikov@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Igor Nazarov 0e502f8c 2023-03-20T20:34:28 Vulkan: Update SharedCommandBlockPool::valid() method. Current logic returns `valid()` result whether `mAllocator` is attached or not. However this is not correct, because it is allowed to use some method even after allocator is detached. Since this class does not require initialization - it is always valid. Bug: angleproject:6401 Bug: b/256666069 Change-Id: I57f899ae7718762b7e2b68e9c3d1e04dccb2c351 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4355391 Reviewed-by: Charlie Lao <cclao@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Igor Nazarov <i.nazarov@samsung.com>
Yuly Novikov 74edb4b4 2023-03-22T18:38:38 Skip PixelLocalStorageTest.Interrupt on iOS Metal Bug: angleproject:7994, chromium:1421437 Change-Id: Ib6a8b316212510f73f56ef9e56c8d2da2fe07cfc Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4359704 Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Auto-Submit: Yuly Novikov <ynovikov@chromium.org> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Kramer Ge 888ca8d9 2023-03-21T18:56:56 Bind FBO before timer query on Mali GL driver. glBeginQuery(GL_TIME_ELAPSED/GL_TIMESTAMP) on Mali implementation assumes a complete FrameBuffer. Without it glGetQueryObject will return a meaningless value, causing some applications to misbehave. This workaround caches and binds a default FBO in this case. Bug: chromium:1356053,b/269068358 Change-Id: I756ded948c2c5aada744f9dd428ad77c37a009c6 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4359032 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Kramer Ge <fangzhoug@chromium.org>
Alexey Knyazev ad52f12e 2023-03-21T00:00:00 Implement EXT_conservative_depth Added translator frontend and GLSL backend support for gl_FragDepth redeclaration and layout qualifiers. Added mappings to DepthGreater, DepthLess, and DepthUnchanged SPIR-V execution modes. Bug: angleproject:8046 Change-Id: I23f19ff54380741107970a44055ea269eef179f6 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4355028 Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Greg Schlomoff a621ea88 2023-03-17T10:21:56 Adding a trace point for texture metrics. Bug: b/236121838 Change-Id: I28e7977f7b5dc6e24cb5a2be10689c223851ba0b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4348737 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Doug Horn <doughorn@google.com> Reviewed-by: Charlie Lao <cclao@google.com>
Cody Northrop ec9595f1 2023-03-21T10:02:00 restricted_trace_perf: Run against default driver On newer Android versions where ANGLE can be the default driver, selecting "native" as the driver will always seek out the system driver instead of the default driver. To allow the platform to select the GLES driver, add a "default" mode that does not use any Android settings for driver selection. To use, pass `--renderer default` Test: restricted_trace_perf.py Bug: b/269645211 Change-Id: Ie9bf64eaa823d9d54301472c1d4e48bf2f5482cd Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4358331 Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com> Auto-Submit: Cody Northrop <cnorthrop@google.com> Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com>
Chris Dalton a491bbe3 2023-03-18T19:05:08 Add PLS utilities for interrupting a rendering pass Adds two more simple commands to ANGLE_shader_pixel_local_storage that allow WebGL and the command buffer to interrupt rendering passes without having to either (1) make expensive queries, or (2) track lots of complex state for validation that they are not currently equipped to track. Bug: chromium:1421437 Change-Id: I80eaef3ae6b0b4bbbecb9cd2268ac90b43675d1c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4355032 Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Kenneth Russell <kbr@chromium.org>
Mark Lobodzinski 23ad4fa2 2023-03-10T11:56:00 Don't hold global surface lock during AcquireNextImage On Android, the global surface lock must be released before calls to vkAcquireNextImageKHR, though GetSurfaceIfValid must remain inside the surface lock. Bug: b/268091451 Test: Mini-game puzzles in 'Fishdom' app, available in play store Change-Id: Ia9c96de52a367b4537a42cee83e2372322fbdfbc Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4316610 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Mark Łobodziński <mark@lunarg.com> Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: mohan maiya <m.maiya@samsung.com>
Alexey Knyazev ba845fcf 2023-03-20T00:00:00 Metal: Implement EXT_clip_control * Skipped vertex shader depth correction when clip depth mode is set to GL_ZERO_TO_ONE. * Adjusted front face mode and pre-fragment vertical flip driver uniform based on the clip origin state. * Added more clip control end2end tests. * D3D11: Fixed scissored draws with upper-left clip origin. Fixed: angleproject:8065 Change-Id: Ife82fa2ad39fad463c23ec10b49bff409272ebf2 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4356661 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com> Reviewed-by: Kyle Piddington <kpiddington@apple.com>
Alexey Knyazev 1e6dd013 2023-03-21T00:00:00 Metal: Support centroid qualifier Fixed: angleproject:8090 Change-Id: I3137599e976bc469709347f423b7e8b71e6ed9f7 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4356667 Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Kyle Piddington <kpiddington@apple.com>
Scott Violet 53d1a179 2023-03-20T17:17:59 Makes ToposortStructs() return consistent results This patch introduces a step in ToposortStructs() that sorts the nodes by name. Doing this ensures consistent results between calls. Without this, the order depends upon the pointer value, which varies depending upon when called. Ensuring consistent results for the same input is important for other parts of this code that use the string as key. Bug: chromium:1423136 Change-Id: I19f053df5cf86c81b800056e86b742d8c34af7d4 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4357255 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Scott Violet <sky@chromium.org>
Alexey Knyazev f5695244 2023-03-21T00:00:00 Fix sample qualifier validation * `smooth sample` is the same as `sample` * `flat sample` is the same as `flat` Bug: angleproject:3589 Change-Id: I8615fa73f4b0cea729b8e09d86f1b8183669de2b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4356666 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Gert Wollny 0cb6697a 2023-03-09T10:35:04 Capture/restricted_traces: update documentation With the new context handling the trace files are named differently, and the description how to remove secondary contexts also is out of date. Bug: None Change-Id: Ia8258502ef53f9d90b742eff01f8125d816ca74e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4323658 Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Gert Wollny <gert.wollny@collabora.com>
Mike Schuchardt d7201a0f 2023-03-20T11:22:22 Tests: Add New Legend of the Condor Heroes trace Test: angle_trace_tests --gtest_filter=TraceTest.new_legend_of_the_condor_heroes Bug: b/274401318 Change-Id: If910e5d3215bfebf8a2779313f709a18a1f58caa Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4355351 Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Mike Schuchardt <mikes@lunarg.com>
Yuly Novikov bacc066b 2023-03-20T17:01:03 Unskip dEQP-EGL tests dEQP-EGL.functional.image.api.create_image_gles2_android_native_* on Mac Bug: chromium:1347817 Change-Id: Iea7a2a05ec32eec8f86f9d0c02fe9e8a43d1922b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4352891 Auto-Submit: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Alexey Knyazev e809e7bd 2023-03-13T00:00:00 Reland "Implement EXT_depth_clamp" This is a reland of commit f8c1418319ac2aef4b3101e322005b1d0f73120f Host GPU bugs are observable in iOS Simulator Original change's description: > Implement EXT_depth_clamp > > * Added depthClamp to the RasterizerState > * Added DepthWriteTest end2end tests covering > both clipped and clamped depth writes > > Capture > * Updated serialized rasterizer state > * Updated CaptureMidExecutionSetup > > OpenGL > * Requires GL 3.2 or ARB_depth_clamp > on desktop contexts > * Maps to EXT_depth_clamp on ES > > D3D11 > * Maps to the opposite of > D3D11_RASTERIZER_DESC.DepthClipEnable > * The new tests uncover several edge cases where > a workaround is needed to implement unextended > OpenGL semantics on top of D3D > > Metal > * Maps to the setDepthClipMode command > > Bug: angleproject:8047 > Bug: angleproject:8077 > Change-Id: I1b3448e5b84443e4be18af9bc22d2f8495ac8267 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4347753 > Reviewed-by: Geoff Lang <geofflang@chromium.org> > Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com> Bug: angleproject:8047 Bug: angleproject:8077 Change-Id: I8c5f8304276c97c51b2c3382cd2764592ee0c3fe Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4349938 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
Jose Dapena Paz 5384667f 2023-03-20T10:23:13 IWYU: missing include for std::atomic in FixedQueue.h Fix build error using libstdc++ due to missing include for usage of std::atomic in FixedQueue.h: ../../third_party/angle/src/common/FixedQueue.h:61:10: error: ‘atomic’ in namespace ‘std’ does not name a template type 61 | std::atomic<size_type> mSize; | ^~~~~~ Bug: chromium:957519 Change-Id: I099a4a8c463149d74cf82ec6eda5e4a872d6e812 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4352888 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Mohan Maiya 07074968 2023-03-17T19:13:39 Validate gl[Push,Pop]DebugGroup Bug: angleproject:8089 Test: DebugTestES32.DebugGroup* Change-Id: I3a20822a072cea8f4a8a58445917a4ebb86db9da Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4350852 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Yuxin Hu 4a77b0f5 2023-03-18T00:16:24 Revert "Implement EXT_depth_clamp" This reverts commit f8c1418319ac2aef4b3101e322005b1d0f73120f. Reason for revert: This change breaks angle_end2end_tests on Metal backend: https://ci.chromium.org/ui/p/chromium/builders/ci/ios-angle-intel/26035/overview Original change's description: > Implement EXT_depth_clamp > > * Added depthClamp to the RasterizerState > * Added DepthWriteTest end2end tests covering > both clipped and clamped depth writes > > Capture > * Updated serialized rasterizer state > * Updated CaptureMidExecutionSetup > > OpenGL > * Requires GL 3.2 or ARB_depth_clamp > on desktop contexts > * Maps to EXT_depth_clamp on ES > > D3D11 > * Maps to the opposite of > D3D11_RASTERIZER_DESC.DepthClipEnable > * The new tests uncover several edge cases where > a workaround is needed to implement unextended > OpenGL semantics on top of D3D > > Metal > * Maps to the setDepthClipMode command > > Bug: angleproject:8047 > Bug: angleproject:8077 > Change-Id: I1b3448e5b84443e4be18af9bc22d2f8495ac8267 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4347753 > Reviewed-by: Geoff Lang <geofflang@chromium.org> > Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com> Bug: angleproject:8047 Bug: angleproject:8077 Change-Id: I829add68c006c72b7b4acf03aee3efa8a9a16fac No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4350876 Reviewed-by: Alexis Hétu <sugoi@google.com> Reviewed-by: Yuxin Hu <yuxinhu@google.com> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Commit-Queue: Yuxin Hu <yuxinhu@google.com>
Mark Lobodzinski d521ccb3 2023-03-16T15:09:10 Tests: Add Rise Of Empires trace Test: angle_trace_tests --gtest_filter=TraceTest.rise_of_empires bug: b/274049298 Change-Id: I1fc2c177a3901bb9997f532e6d3fa686736eaa94 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4350370 Commit-Queue: Mark Łobodziński <mark@lunarg.com> Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Igor Nazarov 7d1a401b 2023-01-17T18:45:55 Vulkan: Fix freeing not completed Secondary Command Buffers. Problem: - Protected Context flushes its commands to the Protected Primary Command Buffer; - Unprotected Context flushes its commands to the Unprotected Primary Command Buffer; - Context with different "egl::ContextPriority" may flush commands into different Primary Command Buffers. - Secondary Command Buffers from all Contexts end-up in the single "CommandBufferRecycler::mSecondaryCommandBuffersToReset" list; - One of the Contexts submits its Primary Command Buffer, and attaches current "mSecondaryCommandBuffersToReset" list to the "CommandBatch"; - Secondary Command Buffers of other Contexts may be collected and later freed by "SecondaryCommandPool" without submitting/completion corresponding Primary Command Buffers. Fix: - Moving "mSecondaryCommandBuffersToReset" to the new "SecondaryCommandBufferCollector" class. - Separate "SecondaryCommandBufferCollector" instance is stored in the "CommandQueue" for each current Primary Command Buffer. Additionally fixes "asyncCommandQueue" related problem: "releaseCommandBuffersToReset()" may get outdated results if flush is not yet executed in the "asyncCommandQueue" thread. Bug: angleproject:6100 Change-Id: I7df161ac1f999fb34d4eccaebb603c58ecb1ac11 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4334579 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Igor Nazarov <i.nazarov@samsung.com>
Igor Nazarov 9b6368cc 2023-03-14T14:48:30 Vulkan: Fix freeing Secondary Command Buffers from wrong thread. Problem: - Secondary Command Buffers are freed in the "CommandQueue" class. - This may happen from any Context thread that calls "checkCompletedCommands()" or "finish<*>()" methods. - As the result, one Command Buffer may be freed from one thread, while other Command Buffer from the same "VkCommandPool" is allocated/reset/recorded in the other thread. Vulkan spec demands external "VkCommandPool" synchronization for any modifications (begin/end/reset/free/cmd) on its "VkCommandBuffer"s. Fix: - Added new "rx::vk::SecondaryCommandPool" class that replaces the "rx::vk::CommandPool" wrapper. - This class has "collect()" method for storing "VkCommandBuffer"s. Collected buffers are freed from the correct thread on the next "allocate()" call. This CL only fixes the problem, keeping Secondary Command Buffer memory management as is (allocate/free single buffer without reuse). In the future CLs this behavior may be changed (reuse buffers, reset/free entire pools). Bug: angleproject:6100 Change-Id: If938416c4df4fe55f0cfb418b6759721ac53098b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4334577 Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Igor Nazarov <i.nazarov@samsung.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Igor Nazarov 29f80eda 2023-03-15T14:59:26 Vulkan: Hot fix crash when using Invalid VkSemaphore Object. Problem started after the commit: b194c21ad30145ca15153a93425a37a8211df373 Vulkan: Enforce ContextPriority in ShareGroup and with EGLImage Happens only with enabled "asyncCommandQueue" feature: - "RendererVk::submitPriorityDependency()" creates "Vk::Semaphore" object on the stack. - Then submits this Semaphore with "queueSubmitWaitSemaphore()" method. - "vk::Semaphore" passed to the "CommandProcessor"s "enqueueSubmitOneOffCommands()" method where stored in the "CommandProcessorTask". - Stack "vk::Semaphore" object garbage collected by the "RendererVk" and then destroyed. - "CommandProcessorTask" now points to the invalid memory. This CL changes usage of "vk::Semaphore" and "vk::Fence" pointers in the "CommandProcessor.h" classes to Vulkan Handles. This will make API consistent, fix this problem, and avoid similar problems in the future. Issue discovered while testing ANGLE as a system driver on S906B with "asyncCommandQueue" enabled. Several system processes crashed with VVL: VUID-VkSubmitInfo-pWaitSemaphores-parameter(ERROR / SPEC):msgNum: -1328048864 - Validation Error: [ VUID-VkSubmitInfo-pWaitSemaphores-parameter ] Object 0: handle = 0xb4000078c1aab430, type = VK_OBJECT_TYPE_INSTANCE; | MessageID = 0xb0d79520 | Invalid VkSemaphore Object 0xb400007831740b98. The Vulkan spec states: If waitSemaphoreCount is not 0, pWaitSemaphores must be a valid pointer to an array of waitSemaphoreCount valid VkSemaphore handles (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-VkSubmitInfo-pWaitSemaphores-parameter) Bug: angleproject:8039 Change-Id: I8818288b9783b5c5a7970bf82ec721452ae57471 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4339758 Reviewed-by: Charlie Lao <cclao@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Igor Nazarov <i.nazarov@samsung.com>
Igor Nazarov 12b3d52d 2023-03-10T17:02:55 Prevent bugs in "FastVector" class. FastVector does not call destructors when resizing down and constructors when resizing up. This may cause reuse of previous values after resizing up and prevent releasing resource in destructors. Above problems only relevant for non trivially constructible/destructible types. For performance reasons (chromium:1417087) this CL disables using trivially destructible types at all and adds special resizing methods for non trivially constructible types. Almost all uses of FastVector was already using trivially destructible types. Except "angle::FixedVector" used in "rx::vk::SubpassVector<>". However, "angle::FixedVector" is unnecessarily calls "clear()" in the destructor. This CL removed "clear()" and made the destructor trivial. All non trivial constructor cases are limited to "angle::spirv::BoxedUint32<>" used in "angle::spirv::FastVectorHelper<>". No problems found because of the possibility to reuse previous values. All "resize(count)" methods replaced with special versions. Therefore, this CL does not fix actual bugs, but rather prevents incorrect use in the future. Bug: angleproject:8021 Bug: chromium:1417087 Change-Id: Id65d75575f2f582450b1cc45dc6b1f2bf3bc5289 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4328286 Reviewed-by: Charlie Lao <cclao@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Igor Nazarov <i.nazarov@samsung.com>
Yuxin Hu 6ea6b360 2023-03-15T13:49:02 Fix allowed_keywords dEQP test failures Bug: b/272756897 Bug: angleproject:7592 Change-Id: I12f498f4ef0a1fa6da7d45345a4cb9e208bd9f03 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4343518 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Yuxin Hu <yuxinhu@google.com>
Roman Lavrov 50dec716 2023-03-17T11:39:15 Linux skips RegisterContextCompatibilityTests altogether. It is already effectively disabled by skipping all configs but that still makes egl* calls leading to sporadic process corruption due to loading desktop drivers under xvfb. Note that it currently fails to register tests on all platforms as RegisterContextCompatibilityTests is called after TestSuite instantiation which leads to tests not being registered at all. +some cleanups Bug: angleproject:8083 Change-Id: I075dc67b73d627548efb3f80186ec408481e2707 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4348334 Commit-Queue: Roman Lavrov <romanl@google.com> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Alexey Knyazev f8c14183 2023-03-13T00:00:00 Implement EXT_depth_clamp * Added depthClamp to the RasterizerState * Added DepthWriteTest end2end tests covering both clipped and clamped depth writes Capture * Updated serialized rasterizer state * Updated CaptureMidExecutionSetup OpenGL * Requires GL 3.2 or ARB_depth_clamp on desktop contexts * Maps to EXT_depth_clamp on ES D3D11 * Maps to the opposite of D3D11_RASTERIZER_DESC.DepthClipEnable * The new tests uncover several edge cases where a workaround is needed to implement unextended OpenGL semantics on top of D3D Metal * Maps to the setDepthClipMode command Bug: angleproject:8047 Bug: angleproject:8077 Change-Id: I1b3448e5b84443e4be18af9bc22d2f8495ac8267 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4347753 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
Igor Nazarov 21a3367a 2023-03-17T00:56:18 Tests: Reduce load of computation heavy tests for Swiftshader. Affected tests are very core heavy and may load all CPU cores. LUCI BOT is running multiple tests in parallel. Having such heavy tests increases containment for CPU cores. As result, some tests may take a lot more time to complete and even hit timeout (currently 60 sec). Typical time to complete all tests on the LUCI BOT: With this tests disabled: 295 sec enabled: 475 sec (+180 sec or +61%) Time to complete all tests on the local machine: Normal tests: Tests completed in 173.040861 seconds Tests completed in 184.974704 seconds Tests completed in 171.654014 seconds Reduced load: Tests completed in 127.693891 seconds Tests completed in 125.536354 seconds Tests completed in 128.236671 seconds Disabled tests: Tests completed in 124.614823 seconds Tests completed in 119.456267 seconds Tests completed in 118.890189 seconds This CL instead of disabling, reduces the load for Swiftshader. Bug: chromium:1424783 Bug: angleproject:8039 Change-Id: I44ed6a6c8322033b1d2c3e9e52a06fe1bb74864c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4345872 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Igor Nazarov <i.nazarov@samsung.com> Reviewed-by: Charlie Lao <cclao@google.com>
Yiwei Zhang 12aefbc0 2023-03-16T04:43:38 Vulkan: add MESA Virtio-GPU Venus driver feature conditions Bug: b/267576238 Change-Id: I5f0c479b23cd3465ca7560966bb4d98edf4c40df Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4342819 Auto-Submit: Yiwei Zhang <zzyiwei@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Charlie Lao f4e71351 2023-03-14T14:55:04 Vulkan: Switch acquireAndUpdate to use Buddy pool Based on survey of all app traces we have, it is common that we end up with BufferVk::acquireAndUpdate even though the buffer was created with STATIC usage. This is mostly due to glBufferSubData call on the STATIC usage buffers and on ARM we most likely end up with acquireAndUpdate. Similarly, we also getting into ghostMappedBuffer and mapRangeImpl with STATIC usage buffers, even though with less app traces. Since the usage pattern usually repeats, using generic allocation algorithm has performance penalty. This CL moves these usage to buddy algorithm to ensure alloc/free are fast. This CL and previous CL crrev.com/c/4327290, reduces efootball_pes-2021 frame time from 4.2 ms to 2.87 ms, achieves parity with native GLES on pixel 7 pro. Bug: b/271915956 Change-Id: I56e0195181c77a3130513c74ec8a5075b2b29ea4 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4321870 Commit-Queue: Charlie Lao <cclao@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Charlie Lao 4c157b4b 2023-03-14T18:45:38 Vulkan: Switch staging buffer to Buddy algorithm Staging buffer should be considered as dynamic and uses buddy allocator. Bug: b/271915956 Change-Id: I7cbe3765fdae120582034b24376560043e007e67 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4327290 Commit-Queue: Charlie Lao <cclao@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Austin Eng a8401f03 2023-03-15T09:29:14 Mark the context as needing flush in TextureGL set*Image operations Bug: chromium:1181068, chromium:1418291 Change-Id: I70b158dcec54edf20b44fcc6169d1fc1d86a0de7 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4341190 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Austin Eng <enga@chromium.org>
Charlie Lao 4982b903 2023-03-14T19:56:51 Revert "Vulkan: Remove inUseAndRespecifiedWithoutData from BufferVk" This reverts commit 755bfe471d23bc2aac5e78493537801dc5f90792. Reason for revert: Causing flaky on pixel 6 angleproject:8082 Original change's description: > Vulkan: Remove inUseAndRespecifiedWithoutData from BufferVk > > BufferVk::setDataWithMemoryType() has one optimization that it tries to > detect glBufferData(target, size, nullptr, usage) and if existing > storage is busy, it immediately reallocate storage. With the > optimization in previous CL (crrev.com/c/4317488), the storage reuse > logic should detect if we can reuse the storage or not. If the size > matches the existing storage's size, then there is no reason we can not > reuse existing storage. Later on when glBufferSubData or > glMapBufferRange is called, there are optimization in those calls that > will detect if we should reallocate storage or not as the further > optimization. This CL removes this check and replies on the other > optimization to handle the storage reallocate (shadowing) if necessary. > This simplifies code and also potentially avoids storage reallocation in > certain usage cases. > > This CL also fixes a test bug in > BufferDataTestES3.BufferDataWithNullFollowedByMap that was calling > glMapBufferRange with MAP_UNSYNCHRONIZED_BIT but incorrectly expecting > GL to do synchronization. > > Bug: b/271915956 > Change-Id: I7901687b3e3e262e77699f14eb8602d8a57eda3e > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4322048 > Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> > Commit-Queue: Charlie Lao <cclao@google.com> > Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com> Bug: b/271915956 Change-Id: Ie5716b609ab96b96afbe5927f20dfcf2bf5d4db6 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4338263 Auto-Submit: Charlie Lao <cclao@google.com> Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Geoff Lang a8720455 2023-03-10T13:48:03 D3D11: Add logic to disassociate EGL image storages. The TextureStorage classes for External and EGLImages were missing the logic to disassociate from images. This lead to the images continuing to hold references to deleted storages. Bug: chromium:1415330 Change-Id: I8303f6751d87a9b0a52993c7d4e9509b086b93f3 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4328347 Reviewed-by: Peng Huang <penghuang@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Austin Eng 9c167fd2 2023-03-14T10:37:39 Mark the context as needing flush in TextureGL copy/blit operations Bug: chromium:1181068, chromium:1418291 Change-Id: Ibce7d27ba33e7ed3a05ea0226ef60aa31682286a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4337957 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Chris Dalton 513ca723 2023-03-13T14:30:20 Delete GL_LOAD_OP_DISABLE_ANGLE from PLS This load op makes the PLS spec and WebGL implementations unnecessarily complex. Bug: chromium:1421437 Change-Id: Iab02a8b02083899c6cc345ecb25b88c5871611c9 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4335148 Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Chris Dalton <chris@rive.app> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Alexey Knyazev b26b01a2 2023-03-09T00:00:00 Implement EXT_render_snorm Bug: angleproject:8048 Change-Id: Id01beaea9565f8ab374c732fef70ec0ac0d8743e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4334303 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>