OGL: Fix headless frame dumping

Also skips swapping the window system buffers in headless mode, as there
may not be a surface which can be swapped in the first place. Instead,
we call glFlush() at the end of a frame in this case.
This commit is contained in:
Stenzek
2017-11-23 16:53:44 +10:00
parent ab44536a3c
commit 32125cf181
5 changed files with 48 additions and 24 deletions

View File

@ -600,7 +600,6 @@ void Renderer::DrawScreen(VKTexture* xfb_texture, const EFBRectangle& xfb_region
VK_SUBPASS_CONTENTS_INLINE);
// Draw
TargetRectangle source_rc = xfb_texture->GetConfig().GetRect();
BlitScreen(m_swap_chain->GetRenderPass(), GetTargetRectangle(), xfb_region,
xfb_texture->GetRawTexIdentifier());
@ -702,6 +701,7 @@ void Renderer::CheckForSurfaceChange()
// Notify calling thread.
m_surface_needs_change.Clear();
m_surface_handle = m_new_surface_handle;
m_new_surface_handle = nullptr;
m_surface_changed.Set();
}