Module: Mesa
Branch: master
Commit: 7144b768727c106ca6e38e29aacc558036ffe0b6
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=7144b768727c106ca6e38e29aacc558036ffe0b6

Author: Ian Romanick <[email protected]>
Date:   Sat Nov 23 12:13:50 2013 -0800

mesa: Add missing API check for GL_TEXTURE_3D

There are no 3D textures in OpenGL ES 1.x.

Signed-off-by: Ian Romanick <[email protected]>
Reviewed-by: Jordan Justen <[email protected]>
Reviewed-by: Brian Paul <[email protected]>

---

 src/mesa/main/texobj.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/mesa/main/texobj.c b/src/mesa/main/texobj.c
index c110f50..4c3d468 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;

_______________________________________________
mesa-commit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to