summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--DOCS/interface-changes.rst2
-rw-r--r--DOCS/man/options.rst8
-rw-r--r--video/out/opengl/video.c13
3 files changed, 15 insertions, 8 deletions
diff --git a/DOCS/interface-changes.rst b/DOCS/interface-changes.rst
index 1b4cfdf4c1..a09329f264 100644
--- a/DOCS/interface-changes.rst
+++ b/DOCS/interface-changes.rst
@@ -54,6 +54,8 @@ Interface changes
vf/af commands too)
- remove --demuxer-lavf-cryptokey. Use --demux-lavf-o=cryptokey=<hex> or
--demux-lavf-o=decryption_key=<hex> instead (whatever fits your situation).
+ - rename --opengl-dumb-mode=no to --opengl-dumb-mode=auto, and make `no`
+ always disable it (unless forced on by hardware limitation).
--- mpv 0.25.0 ---
- remove opengl-cb dxva2 dummy hwdec interop
(see git "vo_opengl: remove dxva2 dummy hwdec backend")
diff --git a/DOCS/man/options.rst b/DOCS/man/options.rst
index 8baf9708db..bb0e9107fd 100644
--- a/DOCS/man/options.rst
+++ b/DOCS/man/options.rst
@@ -4845,17 +4845,17 @@ The following video options are currently all specific to ``--vo=opengl`` and
flipping GL front and backbuffers immediately (i.e. it doesn't call it
in display-sync mode).
-``--opengl-dumb-mode=<yes|no>``
+``--opengl-dumb-mode=<yes|no|auto>``
This mode is extremely restricted, and will disable most extended OpenGL
- features. This includes high quality scalers and custom shaders!
+ features. That includes high quality scalers and custom shaders!
It is intended for hardware that does not support FBOs (including GLES,
which supports it insufficiently), or to get some more performance out of
bad or old hardware.
This mode is forced automatically if needed, and this option is mostly
- useful for debugging. It's also enabled automatically if nothing uses
- features which require FBOs.
+ useful for debugging. The default of ``auto`` will enable it automatically
+ if nothing uses features which require FBOs.
This option might be silently removed in the future.
diff --git a/video/out/opengl/video.c b/video/out/opengl/video.c
index 876da267a3..ca76af2b9b 100644
--- a/video/out/opengl/video.c
+++ b/video/out/opengl/video.c
@@ -340,7 +340,8 @@ static int validate_window_opt(struct mp_log *log, const m_option_t *opt,
const struct m_sub_options gl_video_conf = {
.opts = (const m_option_t[]) {
- OPT_FLAG("opengl-dumb-mode", dumb_mode, 0),
+ OPT_CHOICE("opengl-dumb-mode", dumb_mode, 0,
+ ({"auto", 0}, {"yes", 1}, {"no", -1})),
OPT_FLOATRANGE("opengl-gamma", gamma, 0, 0.1, 2.0),
OPT_FLAG("gamma-auto", gamma_auto, 0),
OPT_CHOICE_C("target-prim", target_prim, 0, mp_csp_prim_names),
@@ -3124,8 +3125,12 @@ static bool check_dumb_mode(struct gl_video *p)
struct gl_video_opts *o = &p->opts;
if (p->use_integer_conversion)
return false;
- if (o->dumb_mode)
+ if (o->dumb_mode > 0) // requested by user
return true;
+ if (o->dumb_mode < 0) // disabled by user
+ return false;
+
+ // otherwise, use auto-detection
if (o->target_prim || o->target_trc || o->linear_scaling ||
o->correct_downscaling || o->sigmoid_upscaling || o->interpolation ||
o->blend_subs || o->deband || o->unsharp)
@@ -3176,12 +3181,12 @@ static void check_gl_features(struct gl_video *p)
MP_WARN(p, "Disabling PBOs (GL2.1/GLES2 unsupported).\n");
}
- p->forced_dumb_mode = p->opts.dumb_mode || !have_fbo || !have_texrg;
+ p->forced_dumb_mode = p->opts.dumb_mode > 0 || !have_fbo || !have_texrg;
bool voluntarily_dumb = check_dumb_mode(p);
if (p->forced_dumb_mode || voluntarily_dumb) {
if (voluntarily_dumb) {
MP_VERBOSE(p, "No advanced processing required. Enabling dumb mode.\n");
- } else if (!p->opts.dumb_mode) {
+ } else if (p->opts.dumb_mode <= 0) {
MP_WARN(p, "High bit depth FBOs unsupported. Enabling dumb mode.\n"
"Most extended features will be disabled.\n");
}