diff options
author | James Ross-Gowan <rossy@jrg.systems> | 2018-01-29 23:08:49 +1100 |
---|---|---|
committer | James Ross-Gowan <rossy@jrg.systems> | 2018-01-30 20:22:58 +1100 |
commit | edb4970ca8b9bee8e54222a1e119af9d355d451a (patch) | |
tree | 624daaa524b265398bdd675449708e1ecf265e73 | |
parent | 93403b13a45cd29e6a919363653b9e5f47eaa639 (diff) | |
download | mpv-edb4970ca8b9bee8e54222a1e119af9d355d451a.tar.bz2 mpv-edb4970ca8b9bee8e54222a1e119af9d355d451a.tar.xz |
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
-rw-r--r-- | video/out/gpu/video.c | 27 |
1 files 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) |