[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
1 changed files with 12 additions and 0 deletions

View File

@ -177,6 +177,18 @@ namespace dxvk {
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);
}
}