checkpoint: implement z/depth testing
[mesa.git] / src / mesa / pipe / softpipe / sp_quad.c
index 168872c64d0414160dad7520ec9fbf825d82b11f..32085ab8c45a059c483485f12bb849e73d967c16 100644 (file)
@@ -7,6 +7,7 @@
 void
 sp_build_quad_pipeline(struct softpipe_context *sp)
 {
+   /* build up the pipeline in reverse order... */
 
    sp->quad.first = sp->quad.output;
 
@@ -15,6 +16,11 @@ sp_build_quad_pipeline(struct softpipe_context *sp)
       sp->quad.first = sp->quad.blend;
    }
 
+   if (sp->depth_test.enabled) {
+      sp->quad.depth_test->next = sp->quad.first;
+      sp->quad.first = sp->quad.depth_test;
+   }
+
    /* XXX always enable shader? */
    if (1) {
       sp->quad.shade->next = sp->quad.first;