1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-01-20 08:52:22 +01:00

[dxvk] Fix when tracking happens in resource relocation

Invalidation now resets tracking, so it is possible that after recreating
an image with different usage we'd use it on the wrong command buffer for
certain functions.
This commit is contained in:
Philip Rebohle 2024-11-03 10:57:47 +01:00
parent c764dd97a6
commit 54c45ef3fa

View File

@ -6397,11 +6397,11 @@ namespace dxvk {
copy.regionCount = 1;
copy.pRegions = &region;
invalidateBuffer(info.buffer, Rc<DxvkResourceAllocation>(info.storage));
m_cmd->cmdCopyBuffer(DxvkCmdBuffer::ExecBuffer, &copy);
m_cmd->track(info.buffer, DxvkAccess::Write);
invalidateBuffer(info.buffer, Rc<DxvkResourceAllocation>(info.storage));
memoryBarrier.dstStageMask |= info.buffer->info().stages;
memoryBarrier.dstAccessMask |= info.buffer->info().access;
}
@ -6493,10 +6493,10 @@ namespace dxvk {
copy.regionCount = imageRegions.size();
copy.pRegions = imageRegions.data();
invalidateImageWithUsage(info.image, Rc<DxvkResourceAllocation>(info.storage), info.usageInfo);
m_cmd->cmdCopyImage(DxvkCmdBuffer::ExecBuffer, &copy);
m_cmd->track(info.image, DxvkAccess::Write);
invalidateImageWithUsage(info.image, Rc<DxvkResourceAllocation>(info.storage), info.usageInfo);
}
if (!imageBarriers.empty()) {