draw/gs: preserve leading vertex info for gs
authorZack Rusin <zackr@vmware.com>
Tue, 23 Apr 2013 00:44:21 +0000 (20:44 -0400)
committerZack Rusin <zackr@vmware.com>
Tue, 23 Apr 2013 10:17:59 +0000 (06:17 -0400)
We need to handle the leading vertex information when
assembling primitives for the geometry shader otherwise
the resulting triangles will have vertices at incorrect
input locations.

Signed-off-by: Zack Rusin <zackr@vmware.com>
Reviewed-by: José Fonseca <jfonseca@vmware.com>
src/gallium/auxiliary/draw/draw_gs_tmp.h

index 92b6fb75ea1a04d78d8f5d9116e3e66d499edf45..b10bbc413d9de8123a80d2857bedcb0895c4d40b 100644 (file)
@@ -10,7 +10,7 @@
    const unsigned prim_flags = input_prims->flags;                \
    const unsigned count = input_prims->count;                     \
    const boolean quads_flatshade_last = FALSE;                    \
-   const boolean last_vertex_last = TRUE;                         \
+   const boolean last_vertex_last = !gs->draw->rasterizer->flatshade_first;  \
    do {                                                           \
       debug_assert(input_prims->primitive_count == 1);            \
       switch (prim) {                                             \