From 4e7f4f10cef15d29f9e5093eff84e9e8168caf89 Mon Sep 17 00:00:00 2001 From: Niklas Haas Date: Sat, 10 Feb 2018 22:49:19 +0100 Subject: 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. --- video/out/gpu/video.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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; -- cgit v1.2.3