draw: don't always run pipeline if clipping
authorKeith Whitwell <keith@tungstengraphics.com>
Thu, 17 Apr 2008 13:42:05 +0000 (14:42 +0100)
committerKeith Whitwell <keith@tungstengraphics.com>
Thu, 17 Apr 2008 13:42:05 +0000 (14:42 +0100)
src/gallium/auxiliary/draw/draw_pt.c

index c0125c9..60a47f3 100644 (file)
@@ -74,11 +74,11 @@ draw_pt_arrays(struct draw_context *draw,
    }
 
 
-   if (draw->pt.middle.opt[opt] == NULL) {
-      opt = PT_PIPELINE | PT_CLIPTEST | PT_SHADE;
+   middle = draw->pt.middle.opt[opt];
+   if (middle == NULL) {
+      middle = draw->pt.middle.opt[PT_PIPELINE | PT_CLIPTEST | PT_SHADE];
    }
 
-   middle = draw->pt.middle.opt[opt];
    assert(middle);
 
    /* May create a short-circuited version of this for small primitives: