From 07ff7c2285d9cb10ca52d7de7a6b86fd00379d6f Mon Sep 17 00:00:00 2001 From: "Xiang, Haihao" Date: Mon, 17 Mar 2008 16:47:42 +0800 Subject: [PATCH] mesa: Follow GL spec to draw DEPTH_COMPONENT pixels when there's no depth buffer. Fix bug #11580 --- src/mesa/main/drawpix.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/mesa/main/drawpix.c b/src/mesa/main/drawpix.c index c82abccc41a..a001cf172c7 100644 --- a/src/mesa/main/drawpix.c +++ b/src/mesa/main/drawpix.c @@ -105,8 +105,7 @@ error_check_format_type(GLcontext *ctx, GLenum format, GLenum type, } break; case GL_DEPTH_COMPONENT: - if ((drawing && !_mesa_dest_buffer_exists(ctx, format)) || - (!drawing && !_mesa_source_buffer_exists(ctx, format))) { + if (!drawing && !_mesa_source_buffer_exists(ctx, format)) { _mesa_error(ctx, GL_INVALID_OPERATION, "gl%sPixels(no depth buffer)", readDraw); return GL_TRUE; -- 2.30.2