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

[dxvk] Use new barrier helpers in resolveImageFb

This commit is contained in:
Philip Rebohle 2024-10-12 10:04:11 +02:00 committed by Philip Rebohle
parent 7b65ee00d9
commit c2edd0f9bb

View File

@ -4150,9 +4150,8 @@ namespace dxvk {
return; return;
} }
if (m_execBarriers.isImageDirty(dstImage, dstSubresourceRange, DxvkAccess::Write) flushPendingAccesses(*dstImage, dstSubresourceRange, DxvkAccess::Write);
|| m_execBarriers.isImageDirty(srcImage, srcSubresourceRange, DxvkAccess::Write)) flushPendingAccesses(*srcImage, srcSubresourceRange, DxvkAccess::Read);
m_execBarriers.recordCommands(m_cmd);
// Discard the destination image if we're fully writing it, // Discard the destination image if we're fully writing it,
// and transition the image layout if necessary // and transition the image layout if necessary
@ -4299,19 +4298,14 @@ namespace dxvk {
m_cmd->cmdDraw(3, region.dstSubresource.layerCount, 0, 0); m_cmd->cmdDraw(3, region.dstSubresource.layerCount, 0, 0);
m_cmd->cmdEndRendering(); m_cmd->cmdEndRendering();
m_execBarriers.accessImage( accessImage(DxvkCmdBuffer::ExecBuffer,
srcImage, srcSubresourceRange, srcLayout, *srcImage, srcSubresourceRange, srcLayout,
VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT, 0, VK_PIPELINE_STAGE_2_FRAGMENT_SHADER_BIT,
srcImage->info().layout, VK_ACCESS_2_SHADER_READ_BIT);
srcImage->info().stages,
srcImage->info().access);
m_execBarriers.accessImage( accessImage(DxvkCmdBuffer::ExecBuffer,
dstImage, dstSubresourceRange, *dstImage, dstSubresourceRange,
dstLayout, dstStages, dstAccess, dstLayout, dstStages, dstAccess);
dstImage->info().layout,
dstImage->info().stages,
dstImage->info().access);
m_cmd->trackResource<DxvkAccess::Write>(dstImage); m_cmd->trackResource<DxvkAccess::Write>(dstImage);
m_cmd->trackResource<DxvkAccess::Read>(srcImage); m_cmd->trackResource<DxvkAccess::Read>(srcImage);