From 9409113d265d4c5f11e55790e0d6022c0eb8c2ab Mon Sep 17 00:00:00 2001 From: Erik Faye-Lund Date: Thu, 6 Jun 2024 15:02:04 +0200 Subject: [PATCH] mesa/main: validate GL_UNSIGNED_INT_2_10_10_10_REV This type is allowed in OpenGL 1.2, which is guaranteed on desktop GL. For OpenGL ES, it got introduced in EXT_texture_type_2_10_10_10_REV as well as OpenGL ES 3.0. However, we already require EXT_texture_type_2_10_10_10_REV for OpenGL ES 3.0 support, so just checking for the extension should be enough. We already have a helper that does all of the above, so let's use that one. Reviewed-by: Adam Jackson Part-of: --- src/mesa/main/glformats.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/mesa/main/glformats.c b/src/mesa/main/glformats.c index 876a675de0c..2d973782c27 100644 --- a/src/mesa/main/glformats.c +++ b/src/mesa/main/glformats.c @@ -1744,6 +1744,9 @@ static bool valid_texture_type_enum(const struct gl_context *ctx, GLenum type) { switch (type) { + case GL_UNSIGNED_INT_2_10_10_10_REV: + return _mesa_has_texture_type_2_10_10_10_REV(ctx); + case GL_UNSIGNED_INT_10F_11F_11F_REV: return _mesa_has_packed_float(ctx);