OSDN Git Service

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 0053b16..0f07364 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;
    }