summaryrefslogtreecommitdiffstats
path: root/src/mesa/main
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2013-11-20 13:22:05 -0800
committerIan Romanick <[email protected]>2013-12-04 17:22:42 -0800
commit01bbebce4d7e69867735115890b359c67972e654 (patch)
tree4ac97e0e29b83f558d59cd0fd544173fec79ffd6 /src/mesa/main
parent5cddb1ce3c9890435374ae3e03fc4a5b57dee314 (diff)
mesa: Add missing checks for GL_TEXTURE_CUBE_MAP_ARRAY
That enum requires GL_ARB_texture_cube_map_array, and it is only available on desktop GL. It looks like this has been an un-noticed issue since GL_ARB_texture_cube_map_array support was added in commit e0e7e295. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Jordan Justen <[email protected]> Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/mesa/main')
-rw-r--r--src/mesa/main/texobj.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mesa/main/texobj.c b/src/mesa/main/texobj.c
index abd30c56320..c110f504469 100644
--- a/src/mesa/main/texobj.c
+++ b/src/mesa/main/texobj.c
@@ -1205,7 +1205,8 @@ target_enum_to_index(struct gl_context *ctx, GLenum target)
return _mesa_is_gles(ctx) && ctx->Extensions.OES_EGL_image_external
? TEXTURE_EXTERNAL_INDEX : -1;
case GL_TEXTURE_CUBE_MAP_ARRAY:
- return TEXTURE_CUBE_ARRAY_INDEX;
+ return _mesa_is_desktop_gl(ctx) && ctx->Extensions.ARB_texture_cube_map_array
+ ? TEXTURE_CUBE_ARRAY_INDEX : -1;
case GL_TEXTURE_2D_MULTISAMPLE:
return _mesa_is_desktop_gl(ctx) && ctx->Extensions.ARB_texture_multisample
? TEXTURE_2D_MULTISAMPLE_INDEX: -1;