Skip to content

Commit b23a593

Browse files
committed
Add write access in subpass dependency.
1 parent 6ea4997 commit b23a593

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

vulkan/render_pass.cpp

+8
Original file line numberDiff line numberDiff line change
@@ -793,6 +793,14 @@ RenderPass::RenderPass(Hash hash, Device *device_, const RenderPassInfo &info)
793793
{
794794
dep.dstStageMask |= VK_PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BIT | VK_PIPELINE_STAGE_LATE_FRAGMENT_TESTS_BIT;
795795
dep.dstAccessMask |= VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_READ_BIT;
796+
797+
// The store op that comes later will need to write and storeOp accesses in WRITE_BIT.
798+
// It's unclear if we need this barrier, but VVL complains if we don't ...
799+
if (ds_store_op != VK_ATTACHMENT_STORE_OP_NONE &&
800+
(depth_stencil_attachment_write & (1u << (subpass - 1))))
801+
{
802+
dep.dstAccessMask |= VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT;
803+
}
796804
}
797805

798806
if (depth_stencil_attachment_write & (1u << subpass))

0 commit comments

Comments
 (0)