mesa: Add missing API check for GL_TEXTURE_3D
authorIan Romanick <ian.d.romanick@intel.com>
Sat, 23 Nov 2013 20:13:50 +0000 (12:13 -0800)
committerIan Romanick <ian.d.romanick@intel.com>
Thu, 5 Dec 2013 01:22:42 +0000 (17:22 -0800)
There are no 3D textures in OpenGL ES 1.x.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
src/mesa/main/texobj.c

index c110f5044698562c5597cfb528fbced5aeb21e20..4c3d4687027700b44c9c1d158a17a9772cc5a834 100644 (file)
@@ -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;