mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-01-31 14: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:
parent
4c298d486d
commit
badb93334e
@ -1211,17 +1211,21 @@ namespace dxvk {
|
|||||||
const VkImageSubresourceRange& dstSubresources,
|
const VkImageSubresourceRange& dstSubresources,
|
||||||
VkImageLayout srcLayout,
|
VkImageLayout srcLayout,
|
||||||
VkImageLayout dstLayout) {
|
VkImageLayout dstLayout) {
|
||||||
m_barriers.accessImage(
|
this->spillRenderPass();
|
||||||
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);
|
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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user