GS/Vulkan: Avoid incorrect-layout RT descriptor

This commit is contained in:
Stenzek 2023-08-18 22:39:34 +10:00 committed by refractionpcsx2
parent 0998c5539a
commit 98f7c29683
1 changed files with 4 additions and 0 deletions

View File

@ -5638,6 +5638,10 @@ void GSDeviceVK::RenderHW(GSHWDrawConfig& config)
{
pxAssertMsg(m_features.texture_barrier, "Texture barriers enabled");
PSSetShaderResource(2, draw_rt, false);
// If this is the first draw to the target as a feedback loop, make sure we re-generate the texture descriptor.
// Otherwise, we might have a previous descriptor left over, that has the RT in a different state.
m_dirty_flags |= (skip_first_barrier ? DIRTY_FLAG_TFX_TEXTURE_RT : 0);
}
// Begin render pass if new target or out of the area.