main: GL_RGB10_A2UI does not come with GL 3.0/EXT_texture_integer
authorIlia Mirkin <imirkin@alum.mit.edu>
Sun, 4 Sep 2016 00:19:56 +0000 (20:19 -0400)
committerIlia Mirkin <imirkin@alum.mit.edu>
Wed, 7 Sep 2016 02:41:48 +0000 (22:41 -0400)
Add a separate extension check for that format. Prevents glTexImage from
trying to find a matching format, which fails on drivers without support
for this format.

Fixes: sized-texture-format-channels (on a3xx)
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Cc: mesa-stable@lists.freedesktop.org
src/mesa/main/glformats.c

index 0c2210a42d9f0bdf36df6a7d169312fa0a5b03e7..85d00af487fe4dd580808fec05962ffb6a1e4c69 100644 (file)
@@ -2518,7 +2518,6 @@ _mesa_base_tex_format(const struct gl_context *ctx, GLint internalFormat)
       case GL_RGBA8I_EXT:
       case GL_RGBA16I_EXT:
       case GL_RGBA32I_EXT:
-      case GL_RGB10_A2UI:
          return GL_RGBA;
       case GL_RGB8UI_EXT:
       case GL_RGB16UI_EXT:
@@ -2530,6 +2529,13 @@ _mesa_base_tex_format(const struct gl_context *ctx, GLint internalFormat)
       }
    }
 
+   if (ctx->Extensions.ARB_texture_rgb10_a2ui) {
+      switch (internalFormat) {
+      case GL_RGB10_A2UI:
+         return GL_RGBA;
+      }
+   }
+
    if (ctx->Extensions.EXT_texture_integer) {
       switch (internalFormat) {
       case GL_ALPHA8UI_EXT: