Skip to content

Commit

Permalink
Add write access in subpass dependency.
Browse files Browse the repository at this point in the history
  • Loading branch information
Themaister committed May 15, 2024
1 parent 6ea4997 commit b23a593
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions vulkan/render_pass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -793,6 +793,14 @@ RenderPass::RenderPass(Hash hash, Device *device_, const RenderPassInfo &info)
{
dep.dstStageMask |= VK_PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BIT | VK_PIPELINE_STAGE_LATE_FRAGMENT_TESTS_BIT;
dep.dstAccessMask |= VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_READ_BIT;

// The store op that comes later will need to write and storeOp accesses in WRITE_BIT.
// It's unclear if we need this barrier, but VVL complains if we don't ...
if (ds_store_op != VK_ATTACHMENT_STORE_OP_NONE &&
(depth_stencil_attachment_write & (1u << (subpass - 1))))
{
dep.dstAccessMask |= VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT;
}
}

if (depth_stencil_attachment_write & (1u << subpass))
Expand Down

0 comments on commit b23a593

Please sign in to comment.