1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-01-31 05:52:11 +01:00

[dxvk] Fix DxvkContext::transformImage

We have to spill the render pass before transforming the
image. We don't need the barrier if the old and new
layout are the same.
This commit is contained in:
Philip Rebohle 2018-05-01 23:29:58 +02:00
parent 4c298d486d
commit badb93334e

View File

@ -1211,17 +1211,21 @@ namespace dxvk {
const VkImageSubresourceRange& dstSubresources,
VkImageLayout srcLayout,
VkImageLayout dstLayout) {
m_barriers.accessImage(
dstImage, dstSubresources,
srcLayout,
dstImage->info().stages,
dstImage->info().access,
dstLayout,
dstImage->info().stages,
dstImage->info().access);
m_barriers.recordCommands(m_cmd);
this->spillRenderPass();
m_cmd->trackResource(dstImage);
if (srcLayout != dstLayout) {
m_barriers.accessImage(
dstImage, dstSubresources,
srcLayout,
dstImage->info().stages,
dstImage->info().access,
dstLayout,
dstImage->info().stages,
dstImage->info().access);
m_barriers.recordCommands(m_cmd);
m_cmd->trackResource(dstImage);
}
}