auxiliary: fix nvfx/nv50 primitive splitting for line loops
authorLuca Barbieri <luca@luca-barbieri.com>
Mon, 23 Aug 2010 19:43:11 +0000 (21:43 +0200)
committerLuca Barbieri <luca@luca-barbieri.com>
Mon, 23 Aug 2010 19:47:47 +0000 (21:47 +0200)
s->close_first was on the wrong side of the inequality.

Caught by blender.
Thanks to AndrewR for reporting this.

src/gallium/auxiliary/util/u_split_prim.h

index 206e1ec3118c233da2ffbdd878d2f272304bfb13..e63a7c1fadd56ab931564e07eaad9a3170e34035 100644 (file)
@@ -48,7 +48,7 @@ util_split_prim_next(struct util_split_prim *s, unsigned max_verts)
       }
    }
 
-   if (s->p_start + s->close_first + max_verts >= s->p_end) {
+   if ((s->p_end - s->p_start) + s->close_first <= max_verts) {
       s->emit(s->priv, s->p_start, s->p_end - s->p_start);
       if (s->close_first)
          s->emit(s->priv, s->start, 1);