mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-03-06 20:58:37 +01:00
[dxvk] Use granular image access tracking in copyBufferToImageHw
This commit is contained in:
parent
02dc403074
commit
d2b53b76de
1 changed files with 5 additions and 5 deletions
|
@ -3435,15 +3435,15 @@ namespace dxvk {
|
|||
// barriers need to have all available aspect bits set
|
||||
auto dstFormatInfo = image->formatInfo();
|
||||
|
||||
auto dstSubresourceRange = vk::makeSubresourceRange(imageSubresource);
|
||||
dstSubresourceRange.aspectMask = dstFormatInfo->aspectMask;
|
||||
auto dstSubresource = imageSubresource;
|
||||
dstSubresource.aspectMask = dstFormatInfo->aspectMask;
|
||||
|
||||
if (!prepareOutOfOrderTransfer(buffer, bufferOffset, dataSize, DxvkAccess::Read)
|
||||
|| !prepareOutOfOrderTransfer(image, DxvkAccess::Write)) {
|
||||
spillRenderPass(true);
|
||||
prepareImage(image, vk::makeSubresourceRange(imageSubresource));
|
||||
|
||||
flushPendingAccesses(*image, dstSubresourceRange, DxvkAccess::Write);
|
||||
flushPendingAccesses(*image, dstSubresource, imageOffset, imageExtent, DxvkAccess::Write);
|
||||
flushPendingAccesses(*buffer, bufferOffset, dataSize, DxvkAccess::Read);
|
||||
|
||||
cmdBuffer = DxvkCmdBuffer::ExecBuffer;
|
||||
|
@ -3454,7 +3454,7 @@ namespace dxvk {
|
|||
// Initialize the image if the entire subresource is covered
|
||||
VkImageLayout dstImageLayoutTransfer = image->pickLayout(VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL);
|
||||
|
||||
addImageLayoutTransition(*image, dstSubresourceRange, dstImageLayoutTransfer,
|
||||
addImageLayoutTransition(*image, vk::makeSubresourceRange(dstSubresource), dstImageLayoutTransfer,
|
||||
VK_PIPELINE_STAGE_2_TRANSFER_BIT, VK_ACCESS_2_TRANSFER_WRITE_BIT,
|
||||
image->isFullSubresource(imageSubresource, imageExtent));
|
||||
flushImageLayoutTransitions(cmdBuffer);
|
||||
|
@ -3463,7 +3463,7 @@ namespace dxvk {
|
|||
image, imageSubresource, imageOffset, imageExtent, dstImageLayoutTransfer,
|
||||
bufferSlice, bufferRowAlignment, bufferSliceAlignment);
|
||||
|
||||
accessImage(cmdBuffer, *image, dstSubresourceRange, dstImageLayoutTransfer,
|
||||
accessImageRegion(cmdBuffer, *image, dstSubresource, imageOffset, imageExtent, dstImageLayoutTransfer,
|
||||
VK_PIPELINE_STAGE_2_TRANSFER_BIT, VK_ACCESS_2_TRANSFER_WRITE_BIT, DxvkAccessOp::None);
|
||||
|
||||
accessBuffer(cmdBuffer, *buffer, bufferOffset, dataSize,
|
||||
|
|
Loading…
Add table
Reference in a new issue