1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2024-12-03 04:24:11 +01:00

[dxvk] Use new barrier helper in copyBuffer

This commit is contained in:
Philip Rebohle 2024-10-11 23:15:51 +02:00 committed by Philip Rebohle
parent 6e6ee35587
commit 6b01203ddf

View File

@ -434,21 +434,15 @@ namespace dxvk {
m_cmd->cmdCopyBuffer(cmdBuffer, &copyInfo);
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<DxvkAccess::Write>(dstBuffer);
m_cmd->trackResource<DxvkAccess::Read>(srcBuffer);