mesa/main: fix inverted condition
authorErik Faye-Lund <erik.faye-lund@collabora.com>
Wed, 17 Jun 2020 21:50:06 +0000 (23:50 +0200)
committerMarge Bot <eric+marge@anholt.net>
Thu, 18 Jun 2020 17:07:14 +0000 (17:07 +0000)
I accidentally got one of the conditions wrong here. Sorry for the
mixup.

See ttps://gitlab.freedesktop.org/mesa/mesa/-/issues/3134 for details.

Fixes: b112e62ba48 ("mesa/main: do not allow MESA_ycbcr_texture enums on gles")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5532>

src/mesa/main/glformats.c

index 5709b98306702afe0c64be3c0fd9c3386200b30a..dfff4a21f0418afa3652c1f25783fe3df08916b2 100644 (file)
@@ -2391,7 +2391,7 @@ _mesa_base_tex_format(const struct gl_context *ctx, GLint internalFormat)
         is_astc_3d_format(internalFormat)))
         return GL_RGBA;
 
-   if (!_mesa_has_MESA_ycbcr_texture(ctx)) {
+   if (_mesa_has_MESA_ycbcr_texture(ctx)) {
       if (internalFormat == GL_YCBCR_MESA)
          return GL_YCBCR_MESA;
    }