summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Ross-Gowan <rossy@jrg.systems>2018-02-12 23:01:52 +1100
committerJan Ekström <jeebjp@gmail.com>2018-02-13 00:21:26 +0200
commit44dc79dcb0161dee3586f596f5c7669aeafb5cad (patch)
treed44d6cf4675bfe966a5373599c6a05d6788e95d8
parent8762818dd21d06244ab49731af5e88252fb888cf (diff)
downloadmpv-44dc79dcb0161dee3586f596f5c7669aeafb5cad.tar.bz2
mpv-44dc79dcb0161dee3586f596f5c7669aeafb5cad.tar.xz
vo_gpu: check for HDR peak detection in dumb mode too
Similar spirit to edb4970ca8b9. check_gl_features() has a confusing early-return. This also adds compute_hdr_peak to the list of options that is copied to the dumb-mode options struct, since it seems to make a difference. Otherwise it would be impossible to disable HDR peak detection in dumb mode.
-rw-r--r--video/out/gpu/video.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/video/out/gpu/video.c b/video/out/gpu/video.c
index 6edf4b0ccf..b48172433e 100644
--- a/video/out/gpu/video.c
+++ b/video/out/gpu/video.c
@@ -3524,6 +3524,13 @@ static void check_gl_features(struct gl_video *p)
MP_VERBOSE(p, "Disabling alpha checkerboard (no gl_FragCoord).\n");
}
+ bool have_compute_peak = have_compute && have_ssbo && have_numgroups;
+ if (!have_compute_peak && p->opts.compute_hdr_peak >= 0) {
+ int msgl = p->opts.compute_hdr_peak == 1 ? MSGL_WARN : MSGL_V;
+ MP_MSG(p, msgl, "Disabling HDR peak computation (no compute shaders).\n");
+ p->opts.compute_hdr_peak = -1;
+ }
+
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) {
@@ -3543,6 +3550,7 @@ static void check_gl_features(struct gl_video *p)
.alpha_mode = p->opts.alpha_mode,
.use_rectangle = p->opts.use_rectangle,
.background = p->opts.background,
+ .compute_hdr_peak = p->opts.compute_hdr_peak,
.dither_algo = p->opts.dither_algo,
.dither_depth = p->opts.dither_depth,
.dither_size = p->opts.dither_size,
@@ -3608,13 +3616,6 @@ static void check_gl_features(struct gl_video *p)
p->opts.deband = 0;
MP_WARN(p, "Disabling debanding (GLSL version too old).\n");
}
-
- bool have_compute_peak = have_compute && have_ssbo && have_numgroups;
- if (!have_compute_peak && p->opts.compute_hdr_peak >= 0) {
- int msgl = p->opts.compute_hdr_peak == 1 ? MSGL_WARN : MSGL_V;
- MP_MSG(p, msgl, "Disabling HDR peak computation (no compute shaders).\n");
- p->opts.compute_hdr_peak = -1;
- }
}
static void init_gl(struct gl_video *p)