GSTextureVK: Fix download inside render pass

Backport from: 5f8082734e
This commit is contained in:
KamFretoZ 2024-08-22 23:17:40 +07:00 committed by lightningterror
parent aebebf5115
commit a3c2a4db5f
1 changed files with 7 additions and 0 deletions

View File

@ -924,9 +924,16 @@ void GSDownloadTextureVK::Flush()
// Need to execute command buffer.
if (GSDeviceVK::GetInstance()->GetCurrentFenceCounter() == m_copy_fence_counter)
{
if (GSDeviceVK::GetInstance()->InRenderPass())
GSDeviceVK::GetInstance()->EndRenderPass();
GSDeviceVK::GetInstance()->ExecuteCommandBufferForReadback();
}
else
{
GSDeviceVK::GetInstance()->WaitForFenceCounter(m_copy_fence_counter);
}
}
#ifdef PCSX2_DEVBUILD