From: Ian Romanick Date: Sat, 23 Nov 2013 20:13:50 +0000 (-0800) Subject: mesa: Add missing API check for GL_TEXTURE_3D X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7144b768727c106ca6e38e29aacc558036ffe0b6;p=mesa.git 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 --- 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;