From 6b01203ddf10077f514385ba08528c565c8e3fb1 Mon Sep 17 00:00:00 2001 From: Philip Rebohle Date: Fri, 11 Oct 2024 23:15:51 +0200 Subject: [PATCH] [dxvk] Use new barrier helper in copyBuffer --- src/dxvk/dxvk_context.cpp | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/src/dxvk/dxvk_context.cpp b/src/dxvk/dxvk_context.cpp index 69db8b17..f1fe5dd9 100644 --- a/src/dxvk/dxvk_context.cpp +++ b/src/dxvk/dxvk_context.cpp @@ -434,21 +434,15 @@ namespace dxvk { m_cmd->cmdCopyBuffer(cmdBuffer, ©Info); - auto& barriers = replaceBuffer - ? m_initBarriers - : m_execBarriers; + accessBuffer(cmdBuffer, + *srcBuffer, srcOffset, numBytes, + VK_PIPELINE_STAGE_2_TRANSFER_BIT, + VK_ACCESS_2_TRANSFER_READ_BIT); - barriers.accessBuffer(srcSlice, - VK_PIPELINE_STAGE_TRANSFER_BIT, - VK_ACCESS_TRANSFER_READ_BIT, - srcBuffer->info().stages, - srcBuffer->info().access); - - barriers.accessBuffer(dstSlice, - VK_PIPELINE_STAGE_TRANSFER_BIT, - VK_ACCESS_TRANSFER_WRITE_BIT, - dstBuffer->info().stages, - dstBuffer->info().access); + accessBuffer(cmdBuffer, + *dstBuffer, dstOffset, numBytes, + VK_PIPELINE_STAGE_2_TRANSFER_BIT, + VK_ACCESS_2_TRANSFER_WRITE_BIT); m_cmd->trackResource(dstBuffer); m_cmd->trackResource(srcBuffer);