diff options
author | Ilia Mirkin <[email protected]> | 2016-09-03 20:19:56 -0400 |
---|---|---|
committer | Emil Velikov <[email protected]> | 2016-11-08 16:23:10 +0000 |
commit | 5eabc81d50332ab5e6d5001ef258d5c14e08e0e2 (patch) | |
tree | 34e285b3d72a352aed441412c98b1504a66d1ad2 /src/mesa | |
parent | 2fbce4c9e1eea629af41cd1fa96abc8e09729d77 (diff) |
main: GL_RGB10_A2UI does not come with GL 3.0/EXT_texture_integer
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 <[email protected]>
Reviewed-by: Nicolai Hähnle <[email protected]>
Cc: [email protected]
(cherry picked from commit 36347c8d6f265fb9b8ebcd598b189d3b43d6b513)
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/main/glformats.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/mesa/main/glformats.c b/src/mesa/main/glformats.c index 90f525c20a9..6df09bbd441 100644 --- a/src/mesa/main/glformats.c +++ b/src/mesa/main/glformats.c @@ -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: |