1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2024-12-03 04:24:11 +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;
}
if (m_execBarriers.isImageDirty(dstImage, dstSubresourceRange, DxvkAccess::Write)
|| m_execBarriers.isImageDirty(srcImage, srcSubresourceRange, DxvkAccess::Write))
m_execBarriers.recordCommands(m_cmd);
flushPendingAccesses(*dstImage, dstSubresourceRange, DxvkAccess::Write);
flushPendingAccesses(*srcImage, srcSubresourceRange, DxvkAccess::Read);
// Discard the destination image if we're fully writing it,
// and transition the image layout if necessary
@ -4299,19 +4298,14 @@ namespace dxvk {
m_cmd->cmdDraw(3, region.dstSubresource.layerCount, 0, 0);
m_cmd->cmdEndRendering();
m_execBarriers.accessImage(
srcImage, srcSubresourceRange, srcLayout,
VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT, 0,
srcImage->info().layout,
srcImage->info().stages,
srcImage->info().access);
accessImage(DxvkCmdBuffer::ExecBuffer,
*srcImage, srcSubresourceRange, srcLayout,
VK_PIPELINE_STAGE_2_FRAGMENT_SHADER_BIT,
VK_ACCESS_2_SHADER_READ_BIT);
m_execBarriers.accessImage(
dstImage, dstSubresourceRange,
dstLayout, dstStages, dstAccess,
dstImage->info().layout,
dstImage->info().stages,
dstImage->info().access);
accessImage(DxvkCmdBuffer::ExecBuffer,
*dstImage, dstSubresourceRange,
dstLayout, dstStages, dstAccess);
m_cmd->trackResource<DxvkAccess::Write>(dstImage);
m_cmd->trackResource<DxvkAccess::Read>(srcImage);