From 7144b768727c106ca6e38e29aacc558036ffe0b6 Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Sat, 23 Nov 2013 12:13:50 -0800 Subject: [PATCH] mesa: Add missing API check for GL_TEXTURE_3D There are no 3D textures in OpenGL ES 1.x. Signed-off-by: Ian Romanick Reviewed-by: Jordan Justen Reviewed-by: Brian Paul --- src/mesa/main/texobj.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/main/texobj.c b/src/mesa/main/texobj.c index c110f504469..4c3d4687027 100644 --- a/src/mesa/main/texobj.c +++ b/src/mesa/main/texobj.c @@ -1179,7 +1179,7 @@ target_enum_to_index(struct gl_context *ctx, GLenum target) case GL_TEXTURE_2D: return TEXTURE_2D_INDEX; case GL_TEXTURE_3D: - return TEXTURE_3D_INDEX; + return ctx->API != API_OPENGLES ? TEXTURE_3D_INDEX : -1; case GL_TEXTURE_CUBE_MAP_ARB: return ctx->Extensions.ARB_texture_cube_map ? TEXTURE_CUBE_INDEX : -1; -- 2.30.2