ARB prog lexer: Fix lexer to eat both DOS and Unix line endings
[mesa.git] / src / mesa / main / drawpix.c
index 6d31f32443a316668dbc4500ac844e77484e1abc..67311f71a2671abda40bd67aea5021aaa4c21c91 100644 (file)
@@ -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;