mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-02-21 22:54:16 +01:00
[dxvk] Use new layout transition helper in copyImageToBufferFb
This commit is contained in:
parent
e8a5583562
commit
18cdc25773
@ -3332,18 +3332,9 @@ namespace dxvk {
|
|||||||
? image->pickLayout(VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL)
|
? image->pickLayout(VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL)
|
||||||
: image->pickLayout(VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL);
|
: image->pickLayout(VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL);
|
||||||
|
|
||||||
if (imageLayout != image->info().layout) {
|
addImageLayoutTransition(*image, vk::makeSubresourceRange(imageSubresource),
|
||||||
m_execAcquires.accessImage(image,
|
imageLayout, VK_PIPELINE_STAGE_2_COMPUTE_SHADER_BIT, VK_ACCESS_2_SHADER_READ_BIT, false);
|
||||||
vk::makeSubresourceRange(imageSubresource),
|
flushImageLayoutTransitions(DxvkCmdBuffer::ExecBuffer);
|
||||||
image->info().layout,
|
|
||||||
image->info().stages,
|
|
||||||
image->info().access,
|
|
||||||
imageLayout,
|
|
||||||
VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT,
|
|
||||||
VK_ACCESS_SHADER_READ_BIT);
|
|
||||||
|
|
||||||
m_execAcquires.recordCommands(m_cmd);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Retrieve pipeline
|
// Retrieve pipeline
|
||||||
VkImageViewType viewType = image->info().type == VK_IMAGE_TYPE_1D
|
VkImageViewType viewType = image->info().type == VK_IMAGE_TYPE_1D
|
||||||
|
Loading…
x
Reference in New Issue
Block a user