mesa/main: use extension-helper

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 <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29528>
This commit is contained in:
Erik Faye-Lund
2024-06-06 15:00:23 +02:00
committed by Marge Bot
parent d2817013ba
commit 75645387b6

View File

@@ -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)