From: Brian Date: Sat, 14 Apr 2007 15:38:20 +0000 (-0600) Subject: illegal to set GL_TEXTURE_MAX_LEVEL w/ GL_TEXTURE_RECTANGLE_ARB X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=9519785e298c665f8aafe57a6a1b2d5c5d484a6d;p=mesa.git illegal to set GL_TEXTURE_MAX_LEVEL w/ GL_TEXTURE_RECTANGLE_ARB --- diff --git a/src/mesa/main/texstate.c b/src/mesa/main/texstate.c index bed2c1220a0..51e19b7f4e7 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);