Mesa (master): mesa: Add error condition for format= STENCIL_INDEX in glGetTexImage()
Anuj Phogat
aphogat at kemper.freedesktop.org
Thu May 1 18:25:12 UTC 2014
Module: Mesa
Branch: master
Commit: 5388fc157e2b78d67a05dc923b98857e6449cf1e
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=5388fc157e2b78d67a05dc923b98857e6449cf1e
Author: Anuj Phogat <anuj.phogat at gmail.com>
Date: Tue Mar 18 16:52:24 2014 -0700
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 at lists.freedesktop.org>
Signed-off-by: Anuj Phogat <anuj.phogat at gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>
---
src/mesa/main/texgetimage.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/mesa/main/texgetimage.c b/src/mesa/main/texgetimage.c
index 2beb0ab..754c365 100644
--- a/src/mesa/main/texgetimage.c
+++ b/src/mesa/main/texgetimage.c
@@ -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)");
More information about the mesa-commit
mailing list