summaryrefslogtreecommitdiffstats
path: root/video/out/opengl/video.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2016-10-05 12:18:44 +0200
committerwm4 <wm4@nowhere>2016-10-05 12:21:34 +0200
commit6789f9b09411f83034883357303b4acfda9569ed (patch)
tree21f0eb78054198a13c640818f6a862a55031f85b /video/out/opengl/video.c
parent387f50127875f49236da918c4457bd837bb2f10e (diff)
downloadmpv-6789f9b09411f83034883357303b4acfda9569ed.tar.bz2
mpv-6789f9b09411f83034883357303b4acfda9569ed.tar.xz
vo_opengl: disable glFlush() by default, and add an option to enable it
It seems this can cause issues with certain platforms, so better to disable it by default. The original reason for this isn't overly justified, and display-sync mode should get rid of the need for it anyway. The new option is meant for testing, and will probably be removed if nobody comes up and reports that enabling the option actually improves anything.
Diffstat (limited to 'video/out/opengl/video.c')
-rw-r--r--video/out/opengl/video.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/video/out/opengl/video.c b/video/out/opengl/video.c
index fa170f61c9..9be12dee21 100644
--- a/video/out/opengl/video.c
+++ b/video/out/opengl/video.c
@@ -412,6 +412,7 @@ const struct m_sub_options gl_video_conf = {
OPT_INTRANGE("opengl-tex-pad-x", tex_pad_x, 0, 0, 4096),
OPT_INTRANGE("opengl-tex-pad-y", tex_pad_y, 0, 0, 4096),
OPT_SUBSTRUCT("", icc_opts, mp_icc_conf, 0),
+ OPT_FLAG("opengl-early-flush", early_flush, 0),
{0}
},
@@ -2848,7 +2849,8 @@ done:
// The playloop calls this last before waiting some time until it decides
// to call flip_page(). Tell OpenGL to start execution of the GPU commands
// while we sleep (this happens asynchronously).
- gl->Flush();
+ if (p->opts.early_flush)
+ gl->Flush();
p->frames_rendered++;