[Mesa-dev] [PATCH] draw/gs: preserve leading vertex info for gs

Zack Rusin zackr at vmware.com
Mon Apr 22 17:51:39 PDT 2013


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 at vmware.com>
---
 src/gallium/auxiliary/draw/draw_gs_tmp.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/auxiliary/draw/draw_gs_tmp.h b/src/gallium/auxiliary/draw/draw_gs_tmp.h
index 92b6fb7..b10bbc4 100644
--- a/src/gallium/auxiliary/draw/draw_gs_tmp.h
+++ b/src/gallium/auxiliary/draw/draw_gs_tmp.h
@@ -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) {                                             \
-- 
1.7.10.4


More information about the mesa-dev mailing list