1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-04-06 00:57:40 +02:00

[dxvk] Use new barrier helpers in blitImageFb

This commit is contained in:
Philip Rebohle 2024-10-12 09:14:32 +02:00 committed by Philip Rebohle
parent a4daa63d2b
commit 82c2f5d5d1

View File

@ -2509,9 +2509,8 @@ namespace dxvk {
return; return;
} }
if (m_execBarriers.isImageDirty(dstView->image(), dstView->imageSubresources(), DxvkAccess::Write) flushPendingAccesses(*dstView, DxvkAccess::Write);
|| m_execBarriers.isImageDirty(srcView->image(), srcView->imageSubresources(), DxvkAccess::Write)) flushPendingAccesses(*srcView, DxvkAccess::Read);
m_execBarriers.recordCommands(m_cmd);
VkImageLayout srcLayout = srcView->image()->pickLayout(srcIsDepthStencil VkImageLayout srcLayout = srcView->image()->pickLayout(srcIsDepthStencil
? VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL ? VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL
@ -2639,23 +2638,15 @@ namespace dxvk {
m_cmd->cmdEndRendering(); m_cmd->cmdEndRendering();
// Add barriers and track image objects // Add barriers and track image objects
m_execBarriers.accessImage( accessImage(DxvkCmdBuffer::ExecBuffer,
dstView->image(), *dstView->image(), dstView->imageSubresources(), dstLayout,
dstView->imageSubresources(), dstLayout, VK_PIPELINE_STAGE_2_COLOR_ATTACHMENT_OUTPUT_BIT,
VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT, VK_ACCESS_2_COLOR_ATTACHMENT_WRITE_BIT);
VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT,
dstView->image()->info().layout,
dstView->image()->info().stages,
dstView->image()->info().access);
m_execBarriers.accessImage( accessImage(DxvkCmdBuffer::ExecBuffer,
srcView->image(), *srcView->image(), srcView->imageSubresources(), srcLayout,
srcView->imageSubresources(), srcLayout, VK_PIPELINE_STAGE_2_FRAGMENT_SHADER_BIT,
VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT, VK_ACCESS_2_SHADER_READ_BIT);
VK_ACCESS_SHADER_READ_BIT,
srcView->image()->info().layout,
srcView->image()->info().stages,
srcView->image()->info().access);
m_cmd->trackResource<DxvkAccess::Write>(dstView->image()); m_cmd->trackResource<DxvkAccess::Write>(dstView->image());
m_cmd->trackResource<DxvkAccess::Read>(srcView->image()); m_cmd->trackResource<DxvkAccess::Read>(srcView->image());