[Mesa-dev] [PATCH] mesa: Fix error code for glTexParameteri of TEXTURE_MAX_LEVEL.
Matt Turner
mattst88 at gmail.com
Mon Nov 19 10:29:24 PST 2012
On Sun, Nov 18, 2012 at 12:30 AM, Kenneth Graunke <kenneth at whitecape.org> wrote:
> Calling glTexParameteri() with pname GL_TEXTURE_MAX_LEVEL and either a
> target of GL_TEXTURE_RECTANGLE or a negative value previously generated
> GL_INVALID_OPERATION. However, GL_INVALID_VALUE seems more appropriate.
>
> Fixes oglconform's api-error/negative.glTexParameter and es3conform's
> sgis_texture_lod_basic_error.
>
> Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
> ---
> src/mesa/main/texparam.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/mesa/main/texparam.c b/src/mesa/main/texparam.c
> index 8ce0546..92c8910 100644
> --- a/src/mesa/main/texparam.c
> +++ b/src/mesa/main/texparam.c
> @@ -349,7 +349,7 @@ set_tex_parameteri(struct gl_context *ctx,
> if (texObj->MaxLevel == params[0])
> return GL_FALSE;
> if (params[0] < 0 || texObj->Target == GL_TEXTURE_RECTANGLE_ARB) {
> - _mesa_error(ctx, GL_INVALID_OPERATION,
> + _mesa_error(ctx, GL_INVALID_VALUE,
> "glTexParameter(param=%d)", params[0]);
> return GL_FALSE;
> }
> --
> 1.8.0
Tested-by: Matt Turner <mattst88 at gmail.com>
More information about the mesa-dev
mailing list