From 02dc4030740d550b8e492a659f462a3766bb3543 Mon Sep 17 00:00:00 2001 From: Philip Rebohle Date: Sat, 1 Mar 2025 02:45:46 +0100 Subject: [PATCH] [dxvk] Use granular image access tracking in copyImageToBufferCs --- src/dxvk/dxvk_context.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/dxvk/dxvk_context.cpp b/src/dxvk/dxvk_context.cpp index 6e791f48c..287647b44 100644 --- a/src/dxvk/dxvk_context.cpp +++ b/src/dxvk/dxvk_context.cpp @@ -3787,7 +3787,8 @@ namespace dxvk { ensureImageCompatibility(image, imageUsage); - flushPendingAccesses(*image, vk::makeSubresourceRange(imageSubresource), DxvkAccess::Read); + flushPendingAccesses(*image, imageSubresource, + imageOffset, imageExtent, DxvkAccess::Read); if (unlikely(m_features.test(DxvkContextFeature::DebugUtils))) { const char* dstName = buffer->info().debugName; @@ -3932,7 +3933,7 @@ namespace dxvk { accessBuffer(DxvkCmdBuffer::ExecBuffer, *bufferView, VK_PIPELINE_STAGE_2_COMPUTE_SHADER_BIT, VK_ACCESS_2_SHADER_WRITE_BIT, DxvkAccessOp::None); - accessImage(DxvkCmdBuffer::ExecBuffer, *image, vk::makeSubresourceRange(imageSubresource), imageLayout, + accessImageRegion(DxvkCmdBuffer::ExecBuffer, *image, imageSubresource, imageOffset, imageExtent, imageLayout, VK_PIPELINE_STAGE_2_COMPUTE_SHADER_BIT, VK_ACCESS_2_SHADER_READ_BIT, DxvkAccessOp::None); m_flags.set(DxvkContextFlag::ForceWriteAfterWriteSync);