vo_opengl: if glfinish is used, also call it after swappping

It seems that at least on nvidia systems with composting disabled, we
can get it to block deterministically on the actual vsync event, which
should improve framedropping.
This commit is contained in:
wm4 2014-08-15 23:36:02 +02:00
parent 543ba6c114
commit 4a297554bc
2 changed files with 6 additions and 1 deletions

View File

@ -439,7 +439,9 @@ Available video output drivers are:
Borders will be distorted due to filtering. Borders will be distorted due to filtering.
``glfinish`` ``glfinish``
Call ``glFinish()`` before swapping buffers Call ``glFinish()`` before and after swapping buffers (default: disabled).
Slower, but might help getting better results when doing framedropping.
The details depend entirely on the OpenGL driver.
``sw`` ``sw``
Continue even if a software renderer is detected. Continue even if a software renderer is detected.

View File

@ -105,6 +105,9 @@ static void flip_page(struct vo *vo)
if (p->frames_rendered > 5) if (p->frames_rendered > 5)
gl_video_set_debug(p->renderer, false); gl_video_set_debug(p->renderer, false);
if (p->use_glFinish)
p->gl->Finish();
mpgl_unlock(p->glctx); mpgl_unlock(p->glctx);
} }