From 75645387b6dd7cfe010c91b73c2074a3de93616b Mon Sep 17 00:00:00 2001 From: Erik Faye-Lund Date: Thu, 6 Jun 2024 15:00:23 +0200 Subject: [PATCH] mesa/main: use extension-helper MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is only allowed if the extension is supported, so let's actually check for it, instead of checking for GLES2 support. Reviewed-by: Marek Olšák Part-of: --- src/mesa/main/glformats.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/main/glformats.c b/src/mesa/main/glformats.c index a7a685538ba..bf627406f8c 100644 --- a/src/mesa/main/glformats.c +++ b/src/mesa/main/glformats.c @@ -1968,7 +1968,7 @@ _mesa_error_check_format_and_type(const struct gl_context *ctx, return GL_NO_ERROR; case GL_UNSIGNED_INT_2_10_10_10_REV: /* OK by GL_EXT_texture_type_2_10_10_10_REV */ - return _mesa_is_gles2(ctx) + return _mesa_has_EXT_texture_type_2_10_10_10_REV(ctx) ? GL_NO_ERROR : GL_INVALID_ENUM; case GL_UNSIGNED_INT_5_9_9_9_REV: return _mesa_has_texture_shared_exponent(ctx)