From: Brian Paul Date: Thu, 24 Apr 2014 20:44:03 +0000 (-0600) Subject: mesa: change invalid texture swizzle error to GL_INVALID_ENUM X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=475f5ff64d7f64a9df2d7aabc772487bf24d1dd5;p=mesa.git 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 --- diff --git a/src/mesa/main/texparam.c b/src/mesa/main/texparam.c index 40790ff0ed9..dc17ea58475 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; }