mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-30 16:30:10 +01:00
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 <ian.d.romanick@intel.com>
This commit is contained in:
parent
1c6aa6599e
commit
475f5ff64d
1 changed files with 2 additions and 2 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue