Revert "Remove opt-out of blocking swap buffers logic for KMSDRM"
This significantly hurts performance on slower GPUs by preventing
the pipelining required when frametimes exceed the video frame
interval.
This reverts commit c26e437f40.
This commit is contained in:
parent
c5960c3e15
commit
232ff0b3c6
1 changed files with 11 additions and 1 deletions
|
|
@ -600,7 +600,17 @@ bool EGLRenderer::initialize(PDECODER_PARAMETERS params)
|
|||
#endif
|
||||
) {
|
||||
SDL_GL_SetSwapInterval(1);
|
||||
|
||||
#if SDL_VERSION_ATLEAST(2, 0, 15) && defined(SDL_VIDEO_DRIVER_KMSDRM)
|
||||
// The SDL KMSDRM backend already enforces double buffering (due to
|
||||
// SDL_HINT_VIDEO_DOUBLE_BUFFER=1), so calling glFinish() after
|
||||
// SDL_GL_SwapWindow() will block an extra frame and lock rendering
|
||||
// at 1/2 the display refresh rate.
|
||||
if (info.subsystem != SDL_SYSWM_KMSDRM)
|
||||
#endif
|
||||
{
|
||||
m_BlockingSwapBuffers = true;
|
||||
}
|
||||
} else {
|
||||
SDL_GL_SetSwapInterval(0);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue