Fix Vulkan render-pass resource synchronization - #107
Conversation
Keep the render-pass state while flushing so dependencies are emitted in the preceding command-buffer chunk, before the consuming draws. Reported and isolated by neocromicon on a Pixel 7 Pro (Mali-G710), where ambient lighting flickered white.
|
Hi, @Solessfir and thanks for the fix. Generally makes sense. However, I'm always playing with validation layers and haven't had any warnings. Can you provide add a test case for this? PS |
|
Thanks! I'll add a regression test in |
|
Added in 1e6b7f7. The new Also found that Aligned MSVC Release build and all 11 targeted resource-state and Vulkan/DirectX tests passed locally on an NVIDIA GPU. |
|
Merged, thanks! |
Register graphics resource accesses before flushing barriers in
VCommandBuffer::endRendering().Previously,
onUavUsage()ran after the flush, so dependencies it discovered could be emitted after the render pass that needed them. Keepingstate == RenderPassduring the flush places these barriers in the preceding command-buffer chunk, before the consuming draws.Reported and isolated by neocromicon (discord): ambient lighting flickered white on a Pixel 7 Pro (Mali-G710, Vulkan SDR). He reports that this ordering change fixed the affected scene with the original shaders and fog enabled.