check if we have a zbuf before enabling depth_test stage
authorBrian <brian.paul@tungstengraphics.com>
Mon, 13 Aug 2007 21:21:01 +0000 (15:21 -0600)
committerBrian <brian.paul@tungstengraphics.com>
Mon, 13 Aug 2007 21:21:01 +0000 (15:21 -0600)
src/mesa/pipe/softpipe/sp_quad.c

index 0053b16e683b735b1859c705bcfc8fa9f220fad6..0f0736479f2c8ecdc5b54f73f3d6aa4d01f5c09e 100644 (file)
@@ -48,7 +48,8 @@ sp_build_quad_pipeline(struct softpipe_context *sp)
       sp->quad.stencil_test->next = sp->quad.first;
       sp->quad.first = sp->quad.stencil_test;
    }
-   else if (sp->depth_test.enabled) {
+   else if (sp->depth_test.enabled &&
+            sp->framebuffer.zbuf) {
       sp->quad.depth_test->next = sp->quad.first;
       sp->quad.first = sp->quad.depth_test;
    }