mirror of
https://github.com/doitsujin/dxvk.git
synced 2024-12-03 04:24:11 +01:00
[dxvk] Use new layout transition helper in copyBufferToImageHw
This commit is contained in:
parent
2353867d54
commit
ebd067f098
@ -2937,21 +2937,12 @@ namespace dxvk {
|
|||||||
m_execBarriers.recordCommands(m_cmd);
|
m_execBarriers.recordCommands(m_cmd);
|
||||||
|
|
||||||
// Initialize the image if the entire subresource is covered
|
// Initialize the image if the entire subresource is covered
|
||||||
VkImageLayout dstImageLayoutInitial = image->info().layout;
|
|
||||||
VkImageLayout dstImageLayoutTransfer = image->pickLayout(VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL);
|
VkImageLayout dstImageLayoutTransfer = image->pickLayout(VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL);
|
||||||
|
|
||||||
if (image->isFullSubresource(imageSubresource, imageExtent))
|
addImageLayoutTransition(*image, dstSubresourceRange, dstImageLayoutTransfer,
|
||||||
dstImageLayoutInitial = VK_IMAGE_LAYOUT_UNDEFINED;
|
VK_PIPELINE_STAGE_2_TRANSFER_BIT, VK_ACCESS_2_TRANSFER_WRITE_BIT,
|
||||||
|
image->isFullSubresource(imageSubresource, imageExtent));
|
||||||
m_execAcquires.accessImage(
|
flushImageLayoutTransitions(DxvkCmdBuffer::ExecBuffer);
|
||||||
image, dstSubresourceRange,
|
|
||||||
dstImageLayoutInitial,
|
|
||||||
VK_PIPELINE_STAGE_TRANSFER_BIT, 0,
|
|
||||||
dstImageLayoutTransfer,
|
|
||||||
VK_PIPELINE_STAGE_TRANSFER_BIT,
|
|
||||||
VK_ACCESS_TRANSFER_WRITE_BIT);
|
|
||||||
|
|
||||||
m_execAcquires.recordCommands(m_cmd);
|
|
||||||
|
|
||||||
this->copyImageBufferData<true>(DxvkCmdBuffer::ExecBuffer,
|
this->copyImageBufferData<true>(DxvkCmdBuffer::ExecBuffer,
|
||||||
image, imageSubresource, imageOffset, imageExtent, dstImageLayoutTransfer,
|
image, imageSubresource, imageOffset, imageExtent, dstImageLayoutTransfer,
|
||||||
|
Loading…
Reference in New Issue
Block a user