summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/teximage.c
diff options
context:
space:
mode:
authorAnuj Phogat <[email protected]>2012-03-02 12:00:51 -0800
committerAnuj Phogat <[email protected]>2012-03-05 19:02:08 -0800
commita9523af0e88017d683c19ff238bfc5eb7cb88fd0 (patch)
tree7162e60603e02adf850d37ceb16979f0b3f82849 /src/mesa/main/teximage.c
parent71f4a960f8e034cc73aaa81b4343101d0046ffb3 (diff)
mesa: Fix valid texture target test in _mesa_GetTexLevelParameteriv()
_mesa_max_texture_levels() is also used to test valid texture target in _mesa_GetTexLevelParameteriv(). GL_TEXTURE_CUBE_MAP is not allowed as texture target in glGetTexLevelParameter(). So, this should throw GL_INVALID_ENUM error. Few other functions which use _mesa_max_texture_levels() like getcompressedteximage_error_check() and getteximage_error_check() also don't accept GL_TEXTURE_CUBE_MAP. Above fix makes piglit fbo-cubemap test to fail. This is because of incorrect texture target passed to _mesa_max_texture_levels() in framebuffer_texture(). Fixing that as well Note: This is a candidate for the stable branches Signed-off-by: Anuj Phogat <[email protected]> Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/mesa/main/teximage.c')
-rw-r--r--src/mesa/main/teximage.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
index 4fb81e62d23..c0e5b9bec14 100644
--- a/src/mesa/main/teximage.c
+++ b/src/mesa/main/teximage.c
@@ -915,7 +915,6 @@ _mesa_max_texture_levels(struct gl_context *ctx, GLenum target)
case GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB:
case GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB:
case GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB:
- case GL_TEXTURE_CUBE_MAP_ARB:
case GL_PROXY_TEXTURE_CUBE_MAP_ARB:
return ctx->Extensions.ARB_texture_cube_map
? ctx->Const.MaxCubeTextureLevels : 0;