From 9519785e298c665f8aafe57a6a1b2d5c5d484a6d Mon Sep 17 00:00:00 2001 From: Brian Date: Sat, 14 Apr 2007 09:38:20 -0600 Subject: [PATCH] illegal to set GL_TEXTURE_MAX_LEVEL w/ GL_TEXTURE_RECTANGLE_ARB --- src/mesa/main/texstate.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/mesa/main/texstate.c b/src/mesa/main/texstate.c index bed2c12..51e19b7 100644 --- a/src/mesa/main/texstate.c +++ b/src/mesa/main/texstate.c @@ -1440,11 +1440,11 @@ _mesa_TexParameterfv( GLenum target, GLenum pname, const GLfloat *params ) break; case GL_TEXTURE_BASE_LEVEL: if (params[0] < 0.0) { - _mesa_error(ctx, GL_INVALID_VALUE, "glTexParameter(param)" ); + _mesa_error(ctx, GL_INVALID_VALUE, "glTexParameter(param)"); return; } - if (target == GL_TEXTURE_RECTANGLE_NV && params[0] != 0.0) { - _mesa_error(ctx, GL_INVALID_VALUE, "glTexParameter(param)" ); + if (target == GL_TEXTURE_RECTANGLE_ARB && params[0] != 0.0) { + _mesa_error(ctx, GL_INVALID_VALUE, "glTexParameter(param)"); return; } FLUSH_VERTICES(ctx, _NEW_TEXTURE); @@ -1452,7 +1452,11 @@ _mesa_TexParameterfv( GLenum target, GLenum pname, const GLfloat *params ) break; case GL_TEXTURE_MAX_LEVEL: if (params[0] < 0.0) { - _mesa_error(ctx, GL_INVALID_VALUE, "glTexParameter(param)" ); + _mesa_error(ctx, GL_INVALID_VALUE, "glTexParameter(param)"); + return; + } + if (target == GL_TEXTURE_RECTANGLE_ARB) { + _mesa_error(ctx, GL_INVALID_OPERATION, "glTexParameter(param)"); return; } FLUSH_VERTICES(ctx, _NEW_TEXTURE); -- 2.7.4