summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--DOCS/man/options.rst5
-rw-r--r--video/out/opengl/video.c4
-rw-r--r--video/out/opengl/video.h2
3 files changed, 10 insertions, 1 deletions
diff --git a/DOCS/man/options.rst b/DOCS/man/options.rst
index afd4b198fa..a32cb98cca 100644
--- a/DOCS/man/options.rst
+++ b/DOCS/man/options.rst
@@ -4591,6 +4591,11 @@ The following video options are currently all specific to ``--vo=opengl`` and
we may have to deal with additional padding, which can be tested with these
options). Could be removed any time.
+``--opengl-early-flush=<yes|no>``
+ Call ``glFlush()`` after rendering a frame and before attempting to display
+ it (default: no). Can fix stuttering in some causes, in other cases probably
+ causes it. For testing - could be removed any time.
+
Miscellaneous
-------------
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++;
diff --git a/video/out/opengl/video.h b/video/out/opengl/video.h
index f2fe5e4423..e7ece85138 100644
--- a/video/out/opengl/video.h
+++ b/video/out/opengl/video.h
@@ -132,6 +132,8 @@ struct gl_video_opts {
float unsharp;
int tex_pad_x, tex_pad_y;
struct mp_icc_opts *icc_opts;
+ int early_flush;
+ int use_overlay;
};
extern const struct m_sub_options gl_video_conf;