From edb4970ca8b9bee8e54222a1e119af9d355d451a Mon Sep 17 00:00:00 2001 From: James Ross-Gowan Date: Mon, 29 Jan 2018 23:08:49 +1100 Subject: [PATCH] vo_gpu: check for RA_CAP_FRAGCOORD in dumb mode too The RA_CAP_FRAGCOORD checks apply to dumb mode as well, but they were after the check for dumb mode, which returns early, so they never ran. Fixes #5436 --- video/out/gpu/video.c | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/video/out/gpu/video.c b/video/out/gpu/video.c index 5b8191d16b..24b14c537b 100644 --- a/video/out/gpu/video.c +++ b/video/out/gpu/video.c @@ -3406,6 +3406,20 @@ static void check_gl_features(struct gl_video *p) } } + if (!(ra->caps & RA_CAP_FRAGCOORD) && p->opts.dither_depth >= 0 && + p->opts.dither_algo != DITHER_NONE) + { + p->opts.dither_algo = DITHER_NONE; + MP_WARN(p, "Disabling dithering (no gl_FragCoord).\n"); + } + if (!(ra->caps & RA_CAP_FRAGCOORD) && + p->opts.alpha_mode == ALPHA_BLEND_TILES) + { + p->opts.alpha_mode = ALPHA_BLEND; + // Verbose, since this is the default setting + MP_VERBOSE(p, "Disabling alpha checkerboard (no gl_FragCoord).\n"); + } + 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) { @@ -3494,19 +3508,6 @@ static void check_gl_features(struct gl_video *p) p->opts.compute_hdr_peak = 0; MP_WARN(p, "Disabling HDR peak computation (no compute shaders).\n"); } - if (!(ra->caps & RA_CAP_FRAGCOORD) && p->opts.dither_depth >= 0 && - p->opts.dither_algo != DITHER_NONE) - { - p->opts.dither_algo = DITHER_NONE; - MP_WARN(p, "Disabling dithering (no gl_FragCoord).\n"); - } - if (!(ra->caps & RA_CAP_FRAGCOORD) && - p->opts.alpha_mode == ALPHA_BLEND_TILES) - { - p->opts.alpha_mode = ALPHA_BLEND; - // Verbose, since this is the default setting - MP_VERBOSE(p, "Disabling alpha checkerboard (no gl_FragCoord).\n"); - } } static void init_gl(struct gl_video *p)