summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNiklas Haas <git@haasn.xyz>2018-02-10 22:49:19 +0100
committerKevin Mitchell <kevmitch@gmail.com>2018-02-11 16:45:20 -0800
commit4e7f4f10cef15d29f9e5093eff84e9e8168caf89 (patch)
tree69fb429d6f93fe29b07c75fe58bae438639b5f2b
parent4c2edecd7dc83caaaa37c797d66d9077e105eaee (diff)
downloadmpv-4e7f4f10cef15d29f9e5093eff84e9e8168caf89.tar.bz2
mpv-4e7f4f10cef15d29f9e5093eff84e9e8168caf89.tar.xz
vo_gpu: correctly infer HDR peak detection support
The re-ordering of commits e3d93fd and 0870859 ended up swallowing the change which made the HDR tone mapping algorithm actually check for RA_CAP_NUM_GROUPS support.
-rw-r--r--video/out/gpu/video.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/video/out/gpu/video.c b/video/out/gpu/video.c
index c27004e63b..ebf0234118 100644
--- a/video/out/gpu/video.c
+++ b/video/out/gpu/video.c
@@ -3393,6 +3393,7 @@ static void check_gl_features(struct gl_video *p)
bool have_texrg = rg_tex && !rg_tex->luminance_alpha;
bool have_compute = ra->caps & RA_CAP_COMPUTE;
bool have_ssbo = ra->caps & RA_CAP_BUF_RW;
+ bool have_numgroups = ra->caps & RA_CAP_NUM_GROUPS;
const char *auto_fbo_fmts[] = {"rgba16", "rgba16f", "rgba16hf",
"rgb10_a2", "rgba8", 0};
@@ -3512,7 +3513,9 @@ static void check_gl_features(struct gl_video *p)
p->opts.deband = 0;
MP_WARN(p, "Disabling debanding (GLSL version too old).\n");
}
- if ((!have_compute || !have_ssbo) && p->opts.compute_hdr_peak >= 0) {
+
+ 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;