mirror of
https://github.com/doitsujin/dxvk.git
synced 2024-12-12 13:08:50 +01:00
[dxvk] Use new barrier helpers in resolveImageHw
This commit is contained in:
parent
63347b5fce
commit
7b436a63fb
@ -3975,9 +3975,8 @@ namespace dxvk {
|
|||||||
auto dstSubresourceRange = vk::makeSubresourceRange(region.dstSubresource);
|
auto dstSubresourceRange = vk::makeSubresourceRange(region.dstSubresource);
|
||||||
auto srcSubresourceRange = vk::makeSubresourceRange(region.srcSubresource);
|
auto srcSubresourceRange = vk::makeSubresourceRange(region.srcSubresource);
|
||||||
|
|
||||||
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);
|
|
||||||
|
|
||||||
// We only support resolving to the entire image
|
// We only support resolving to the entire image
|
||||||
// area, so we might as well discard its contents
|
// area, so we might as well discard its contents
|
||||||
@ -4008,21 +4007,15 @@ namespace dxvk {
|
|||||||
|
|
||||||
m_cmd->cmdResolveImage(&resolveInfo);
|
m_cmd->cmdResolveImage(&resolveInfo);
|
||||||
|
|
||||||
m_execBarriers.accessImage(
|
accessImage(DxvkCmdBuffer::ExecBuffer,
|
||||||
dstImage, dstSubresourceRange, dstLayout,
|
*dstImage, dstSubresourceRange, dstLayout,
|
||||||
VK_PIPELINE_STAGE_TRANSFER_BIT,
|
VK_PIPELINE_STAGE_2_TRANSFER_BIT,
|
||||||
VK_ACCESS_TRANSFER_WRITE_BIT,
|
VK_ACCESS_2_TRANSFER_WRITE_BIT);
|
||||||
dstImage->info().layout,
|
|
||||||
dstImage->info().stages,
|
|
||||||
dstImage->info().access);
|
|
||||||
|
|
||||||
m_execBarriers.accessImage(
|
accessImage(DxvkCmdBuffer::ExecBuffer,
|
||||||
srcImage, srcSubresourceRange, srcLayout,
|
*srcImage, srcSubresourceRange, srcLayout,
|
||||||
VK_PIPELINE_STAGE_TRANSFER_BIT,
|
VK_PIPELINE_STAGE_2_TRANSFER_BIT,
|
||||||
VK_ACCESS_TRANSFER_READ_BIT,
|
VK_ACCESS_2_TRANSFER_READ_BIT);
|
||||||
srcImage->info().layout,
|
|
||||||
srcImage->info().stages,
|
|
||||||
srcImage->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);
|
||||||
|
Loading…
Reference in New Issue
Block a user