From 475f5ff64d7f64a9df2d7aabc772487bf24d1dd5 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 24 Apr 2014 14:44:03 -0600 Subject: mesa: change invalid texture swizzle error to GL_INVALID_ENUM The original GL_EXT_texture_swizzle extensions said GL_INVALID_OPERATION was to be generated when the an invalid swizzle was passed to glTexParameter(). But in OpenGL 3.3 and later, the error should be GL_INVALID_ENUM. Reviewed-by: Ian Romanick --- src/mesa/main/texparam.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/mesa/main/texparam.c b/src/mesa/main/texparam.c index 40790ff..dc17ea5 100644 --- a/src/mesa/main/texparam.c +++ b/src/mesa/main/texparam.c @@ -485,7 +485,7 @@ set_tex_parameteri(struct gl_context *ctx, const GLuint comp = pname - GL_TEXTURE_SWIZZLE_R_EXT; const GLint swz = comp_to_swizzle(params[0]); if (swz < 0) { - _mesa_error(ctx, GL_INVALID_OPERATION, + _mesa_error(ctx, GL_INVALID_ENUM, "glTexParameter(swizzle 0x%x)", params[0]); return GL_FALSE; } @@ -510,7 +510,7 @@ set_tex_parameteri(struct gl_context *ctx, set_swizzle_component(&texObj->_Swizzle, comp, swz); } else { - _mesa_error(ctx, GL_INVALID_OPERATION, + _mesa_error(ctx, GL_INVALID_ENUM, "glTexParameter(swizzle 0x%x)", params[comp]); return GL_FALSE; } -- cgit v1.1