1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-19 13:21:13 +00:00

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
This commit is contained in:
James Ross-Gowan 2018-01-29 23:08:49 +11:00
parent 93403b13a4
commit edb4970ca8

View File

@ -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; p->forced_dumb_mode = p->opts.dumb_mode > 0 || !have_fbo || !have_texrg;
bool voluntarily_dumb = check_dumb_mode(p); bool voluntarily_dumb = check_dumb_mode(p);
if (p->forced_dumb_mode || voluntarily_dumb) { 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; p->opts.compute_hdr_peak = 0;
MP_WARN(p, "Disabling HDR peak computation (no compute shaders).\n"); 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) static void init_gl(struct gl_video *p)