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 <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29835>
This commit is contained in:
Erik Faye-Lund 2024-06-06 15:02:04 +02:00 committed by Marge Bot
parent 75cad45ab1
commit 9409113d26

View file

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