mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-01-31 14:52:11 +01:00
[dxvk] Use new layout transition helper for blitImageFb
This commit is contained in:
parent
971042b3d3
commit
aff6cb744c
@ -2604,30 +2604,13 @@ namespace dxvk {
|
|||||||
VkImageLayout dstLayout = dstView->image()->pickLayout(
|
VkImageLayout dstLayout = dstView->image()->pickLayout(
|
||||||
VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL);
|
VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL);
|
||||||
|
|
||||||
if (dstView->image()->info().layout != dstLayout) {
|
addImageLayoutTransition(*dstView->image(), dstView->imageSubresources(),
|
||||||
m_execAcquires.accessImage(
|
dstLayout, VK_PIPELINE_STAGE_2_COLOR_ATTACHMENT_OUTPUT_BIT,
|
||||||
dstView->image(),
|
VK_ACCESS_2_COLOR_ATTACHMENT_READ_BIT | VK_ACCESS_2_COLOR_ATTACHMENT_WRITE_BIT, false);
|
||||||
dstView->imageSubresources(),
|
addImageLayoutTransition(*srcView->image(), srcView->imageSubresources(),
|
||||||
dstView->image()->info().layout,
|
srcLayout, VK_PIPELINE_STAGE_2_FRAGMENT_SHADER_BIT,
|
||||||
dstView->image()->info().stages, 0,
|
VK_ACCESS_2_SHADER_READ_BIT, false);
|
||||||
dstLayout,
|
flushImageLayoutTransitions(DxvkCmdBuffer::ExecBuffer);
|
||||||
VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT,
|
|
||||||
VK_ACCESS_COLOR_ATTACHMENT_READ_BIT |
|
|
||||||
VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (srcView->image()->info().layout != srcLayout) {
|
|
||||||
m_execAcquires.accessImage(
|
|
||||||
srcView->image(),
|
|
||||||
srcView->imageSubresources(),
|
|
||||||
srcView->image()->info().layout,
|
|
||||||
srcView->image()->info().stages, 0,
|
|
||||||
srcLayout,
|
|
||||||
VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT,
|
|
||||||
VK_ACCESS_SHADER_READ_BIT);
|
|
||||||
}
|
|
||||||
|
|
||||||
m_execAcquires.recordCommands(m_cmd);
|
|
||||||
|
|
||||||
// Sort out image offsets so that dstOffset[0] points
|
// Sort out image offsets so that dstOffset[0] points
|
||||||
// to the top-left corner of the target area
|
// to the top-left corner of the target area
|
||||||
|
Loading…
x
Reference in New Issue
Block a user