Vk: Don't try to transition present source during present

This commit is contained in:
TellowKrinkle 2024-08-21 22:22:36 -05:00 committed by TellowKrinkle
parent c647a30aa9
commit fd5a652270
1 changed files with 5 additions and 0 deletions

View File

@ -2344,6 +2344,11 @@ GSDevice::PresentResult GSDeviceVK::BeginPresent(bool frame_skip)
swap_chain_texture->OverrideImageLayout(GSTextureVK::Layout::Undefined);
swap_chain_texture->TransitionToLayout(cmdbuffer, GSTextureVK::Layout::ColorAttachment);
// Present render pass gets started out here, so we can't transition source textures in DoStretchRect
// Make sure they're ready now
if (!frame_skip && m_current)
static_cast<GSTextureVK*>(m_current)->TransitionToLayout(GSTextureVK::Layout::ShaderReadOnly);
const VkFramebuffer fb = swap_chain_texture->GetFramebuffer(false);
if (fb == VK_NULL_HANDLE)
return GSDevice::PresentResult::FrameSkipped;