mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 09:28:07 +02:00
mesa: Add error condition for format=STENCIL_INDEX in glGetTexImage()
From OpenGL 4.0 spec, page 306:
"Calling GetTexImage with a format of STENCIL_INDEX
causes the error INVALID_ENUM."
Cc: <mesa-stable@lists.freedesktop.org>
Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
This commit is contained in:
parent
340658e44f
commit
5388fc157e
1 changed files with 5 additions and 0 deletions
|
|
@ -838,6 +838,11 @@ getteximage_error_check(struct gl_context *ctx, GLenum target, GLint level,
|
|||
_mesa_error(ctx, GL_INVALID_OPERATION, "glGetTexImage(format mismatch)");
|
||||
return GL_TRUE;
|
||||
}
|
||||
else if (_mesa_is_stencil_format(format)
|
||||
&& !ctx->Extensions.ARB_texture_stencil8) {
|
||||
_mesa_error(ctx, GL_INVALID_ENUM, "glGetTexImage(format=GL_STENCIL_INDEX)");
|
||||
return GL_TRUE;
|
||||
}
|
||||
else if (_mesa_is_ycbcr_format(format)
|
||||
&& !_mesa_is_ycbcr_format(baseFormat)) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION, "glGetTexImage(format mismatch)");
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue