aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/texgetimage.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-12-17 13:46:47 +0100
committerMarc Haesen <marc@hc-consult.be>2011-12-17 13:46:47 +0100
commitcd55591be471b59faf9693651837a61e8376d85a (patch)
treedaa8bcdb500384d7112f5114bf9c11b0bc2ab78d /mesalib/src/mesa/main/texgetimage.c
parent1ae4005bfe3690b34ec40e33918b3e24468d47e1 (diff)
parentabacebe06d9f3d2fe1b7d256bd86cddbfa592a85 (diff)
downloadvcxsrv-cd55591be471b59faf9693651837a61e8376d85a.tar.gz
vcxsrv-cd55591be471b59faf9693651837a61e8376d85a.tar.bz2
vcxsrv-cd55591be471b59faf9693651837a61e8376d85a.zip
Merge remote-tracking branch 'origin/released'
Diffstat (limited to 'mesalib/src/mesa/main/texgetimage.c')
-rw-r--r--mesalib/src/mesa/main/texgetimage.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/mesalib/src/mesa/main/texgetimage.c b/mesalib/src/mesa/main/texgetimage.c
index ae0d51fbb..3f2418729 100644
--- a/mesalib/src/mesa/main/texgetimage.c
+++ b/mesalib/src/mesa/main/texgetimage.c
@@ -708,6 +708,14 @@ getteximage_error_check(struct gl_context *ctx, GLenum target, GLint level,
return GL_TRUE;
}
+ if (!_mesa_is_legal_format_and_type(ctx, format, type)) {
+ /*GL_INVALID_OPERATION is generated by a format/type
+ * mismatch (see the 1.2 spec page 94, sec 3.6.4.)
+ */
+ _mesa_error(ctx, GL_INVALID_OPERATION, "glGetTexImage(target)");
+ return GL_TRUE;
+ }
+
baseFormat = _mesa_get_format_base_format(texImage->TexFormat);
/* Make sure the requested image format is compatible with the