From 7d2228c6738b8793bc616c9436cdc7a1cf149a79 Mon Sep 17 00:00:00 2001 From: James Ross-Gowan Date: Mon, 12 Feb 2018 23:06:57 +1100 Subject: vo_gpu: use a variable for the RA_CAP_FRAGCOORD flag This is just a cosmetic change. Now the RA_CAP_FRAGCOORD check looks like all the others. --- video/out/gpu/video.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/video/out/gpu/video.c b/video/out/gpu/video.c index b48172433e..2d4e711210 100644 --- a/video/out/gpu/video.c +++ b/video/out/gpu/video.c @@ -3488,6 +3488,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_fragcoord = ra->caps & RA_CAP_FRAGCOORD; bool have_numgroups = ra->caps & RA_CAP_NUM_GROUPS; const char *auto_fbo_fmts[] = {"rgba16", "rgba16f", "rgba16hf", @@ -3510,15 +3511,13 @@ static void check_gl_features(struct gl_video *p) } } - if (!(ra->caps & RA_CAP_FRAGCOORD) && p->opts.dither_depth >= 0 && + if (!have_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) - { + if (!have_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"); -- cgit v1.2.3