Skip to content

Commit

Permalink
Fix racy depth buffer access by fog subpass
Browse files Browse the repository at this point in the history
  • Loading branch information
Ralith committed May 5, 2024
1 parent 6424e14 commit 00ef28a
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions client/src/graphics/base.rs
Original file line number Diff line number Diff line change
Expand Up @@ -215,10 +215,12 @@ impl Base {
vk::SubpassDependency {
src_subpass: 0,
dst_subpass: 1,
src_stage_mask: vk::PipelineStageFlags::LATE_FRAGMENT_TESTS, // depth write
dst_stage_mask: vk::PipelineStageFlags::EARLY_FRAGMENT_TESTS, // depth read
src_stage_mask: vk::PipelineStageFlags::EARLY_FRAGMENT_TESTS
| vk::PipelineStageFlags::LATE_FRAGMENT_TESTS, // depth write
dst_stage_mask: vk::PipelineStageFlags::FRAGMENT_SHADER, // subpass input

src_access_mask: vk::AccessFlags::DEPTH_STENCIL_ATTACHMENT_WRITE,
dst_access_mask: vk::AccessFlags::DEPTH_STENCIL_ATTACHMENT_READ,
dst_access_mask: vk::AccessFlags::INPUT_ATTACHMENT_READ,
dependency_flags: vk::DependencyFlags::BY_REGION,
},
]),
Expand Down

0 comments on commit 00ef28a

Please sign in to comment.