gallium: move logicop test outside of loop
authorBrian Paul <brian.paul@tungstengraphics.com>
Wed, 23 Apr 2008 17:24:42 +0000 (11:24 -0600)
committerBrian Paul <brian.paul@tungstengraphics.com>
Wed, 23 Apr 2008 17:38:40 +0000 (11:38 -0600)
src/gallium/drivers/softpipe/sp_quad_blend.c

index ca266ec..74c6bff 100644 (file)
@@ -232,6 +232,11 @@ blend_quad(struct quad_stage *qs, struct quad_header *quad)
    struct softpipe_context *softpipe = qs->softpipe;
    uint cbuf;
 
+   if (softpipe->blend->logicop_enable) {
+      logicop_quad(qs, quad);
+      return;
+   }
+
    /* loop over colorbuffer outputs */
    for (cbuf = 0; cbuf < softpipe->framebuffer.num_cbufs; cbuf++) {
       float source[4][QUAD_SIZE], dest[4][QUAD_SIZE];
@@ -242,11 +247,6 @@ blend_quad(struct quad_stage *qs, struct quad_header *quad)
       float (*quadColor)[4] = quad->outputs.color[cbuf];
       uint i, j;
 
-      if (softpipe->blend->logicop_enable) {
-         logicop_quad(qs, quad);
-         return;
-      }
-
       /* get/swizzle dest colors */
       for (j = 0; j < QUAD_SIZE; j++) {
          int x = (quad->x0 & (TILE_SIZE-1)) + (j & 1);