summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2009-08-20 08:10:14 -0600
committerBrian Paul <brianp@vmware.com>2009-08-20 08:12:16 -0600
commit39ec4a9253197c4507d53ce9a3c1d8963d8f5cea (patch)
treeb111fd60ca138253c2425b88f1f8017fd0b7e76e
parent525ddb1f56aceee74a08764315dc6420f198ccc2 (diff)
mesa: add GL_DEPTH_STENCIL to glCopyPixels error check
Plus, add a comment about 'type' error checking. See bug 19087.
-rw-r--r--src/mesa/main/drawpix.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/mesa/main/drawpix.c b/src/mesa/main/drawpix.c
index 6d31f32443..67311f71a2 100644
--- a/src/mesa/main/drawpix.c
+++ b/src/mesa/main/drawpix.c
@@ -152,7 +152,14 @@ _mesa_CopyPixels( GLint srcx, GLint srcy, GLsizei width, GLsizei height,
return;
}
- if (type != GL_COLOR && type != GL_DEPTH && type != GL_STENCIL) {
+ /* Note: more detailed 'type' checking is done by the
+ * _mesa_source/dest_buffer_exists() calls below. That's where we
+ * check if the stencil buffer exists, etc.
+ */
+ if (type != GL_COLOR &&
+ type != GL_DEPTH &&
+ type != GL_STENCIL &&
+ type != GL_DEPTH_STENCIL) {
_mesa_error(ctx, GL_INVALID_ENUM, "glCopyPixels(type=%s)",
_mesa_lookup_enum_by_nr(type));
return;