mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-04-06 00:57:40 +02:00
[dxvk] Use new barrier helpers in copyImageFb
This commit is contained in:
parent
42da4348bf
commit
706d6cbc1c
@ -3588,9 +3588,8 @@ namespace dxvk {
|
|||||||
auto dstSubresourceRange = vk::makeSubresourceRange(dstSubresource);
|
auto dstSubresourceRange = vk::makeSubresourceRange(dstSubresource);
|
||||||
auto srcSubresourceRange = vk::makeSubresourceRange(srcSubresource);
|
auto srcSubresourceRange = vk::makeSubresourceRange(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);
|
|
||||||
|
|
||||||
// Flag used to determine whether we can do an UNDEFINED transition
|
// Flag used to determine whether we can do an UNDEFINED transition
|
||||||
bool doDiscard = dstImage->isFullSubresource(dstSubresource, extent);
|
bool doDiscard = dstImage->isFullSubresource(dstSubresource, extent);
|
||||||
@ -3729,20 +3728,14 @@ namespace dxvk {
|
|||||||
m_cmd->cmdDraw(3, dstSubresource.layerCount, 0, 0);
|
m_cmd->cmdDraw(3, 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,
|
VK_PIPELINE_STAGE_2_FRAGMENT_SHADER_BIT,
|
||||||
VK_ACCESS_SHADER_READ_BIT,
|
VK_ACCESS_2_SHADER_READ_BIT);
|
||||||
srcImage->info().layout,
|
|
||||||
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);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user