From 1efdfd2ac5e2cdabc42d3b2e2a40b835740fdffc Mon Sep 17 00:00:00 2001 From: Joshua Simmons Date: Mon, 18 Nov 2024 18:54:41 +0100 Subject: [PATCH] narcissus-gpu: Make validation layers about dst access A bit of an open question what's actually required here, but this makes the validation layers happy so let's go with that. --- engine/narcissus-gpu/src/backend/vulkan/barrier.rs | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/engine/narcissus-gpu/src/backend/vulkan/barrier.rs b/engine/narcissus-gpu/src/backend/vulkan/barrier.rs index 9e32275..72092aa 100644 --- a/engine/narcissus-gpu/src/backend/vulkan/barrier.rs +++ b/engine/narcissus-gpu/src/backend/vulkan/barrier.rs @@ -298,14 +298,9 @@ pub fn vulkan_image_memory_barrier( let info = vulkan_access_info(access); dst_stage_mask |= info.stages; - // Add visibility operations if necessary. - // - // If the src access mask is zero, this is a write-after-read hazard (or for - // some reason, a read-after-read hazard), so the dst access mask can be safely - // zeroed as these don't need visibility. - if src_access_mask != default() { - dst_access_mask |= info.access; - } + // Open question whether this is always required. + // + dst_access_mask |= info.access; let layout = match barrier.next_layout { ImageLayout::Optimal => info.layout, -- 2.49.0