Commit 92cc4e0275a0f8e5a5a761738d434dc9e5f56bc9

Igor Nazarov 2025-01-22T16:07:00

Vulkan: Fix incorrect initial RP layout for shared present Renderpass was using `ImageLayout::ColorWrite` as initial layout for the SharedPresent image. Vulkan validation did not detect errors because of limitations (or bug?): once command buffer with barrier is submitted, layers no longer track the current layout, and therefore skip the check. In other words, it seems like VVL only track layout transitions within a command buffer. Transition to `ImageLayout::SharedPresent` currently performed using one-off command buffer, which is always immediately submitted. This is the reason why VVL was ignoring the error for so long. Bug was discovered in `EGLSingleBufferTest.AcquireImageFromSwapImpl` during local testing, where one-off command buffer was replaced with outside RP commands. Other tests were still working fine, because they are using `glClear()` in the very first flush - no renderpass in the first submission, and so VVL can't track the layout once it is used in a renderpass in the second submission. Bug: angleproject:42262606 Change-Id: I19404b5be706e54e53890c2fec9cb4796296c698 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6182598 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Igor Nazarov <i.nazarov@samsung.com>