1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2024-12-12 13:08:50 +01:00

[dxvk] Update tracked rtLayouts when changing image layout

This commit is contained in:
Robin Kertels 2023-05-03 03:17:28 +02:00 committed by Philip Rebohle
parent 860237e775
commit 9ce1c4df0d

View File

@ -177,6 +177,18 @@ namespace dxvk {
image->setLayout(layout); image->setLayout(layout);
for (uint32_t i = 0; i < MaxNumRenderTargets; i++) {
const DxvkAttachment& rt = m_state.om.renderTargets.color[i];
if (rt.view != nullptr && rt.view->image() == image) {
m_rtLayouts.color[i] = layout;
}
}
const DxvkAttachment& ds = m_state.om.renderTargets.depth;
if (ds.view != nullptr && ds.view->image() == image) {
m_rtLayouts.depth = layout;
}
m_cmd->trackResource<DxvkAccess::Write>(image); m_cmd->trackResource<DxvkAccess::Write>(image);
} }
} }