summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary
diff options
context:
space:
mode:
authorZack Rusin <[email protected]>2013-12-10 00:06:48 -0500
committerZack Rusin <[email protected]>2013-12-10 16:40:54 -0500
commit48b07fb4fc7e936ee1da4ad856a83740be65ddaf (patch)
tree7f5d31ad582d8f0874bd1d4df273b7e1f7645fdf /src/gallium/auxiliary
parent155139059ba588da1161eaa692515cacdead9f4e (diff)
draw: fix vbuf caching of vertices with inject front face
Caching in the vbuf module meant that once a vertex has been emitted it was cached, but it's possible for a vertex at the same location to be emitted again, but this time with a different front-face semantic. Caching was causing the first version of the vertex to be emitted, which resulted in the renderer getting incorrect front-face attributes. By reseting the vertex_id (which is used for caching) we make sure that once a front-face info has been injected the vertex will endup getting emitted. Signed-off-by: Zack Rusin <[email protected]> Reviewed-by: José Fonseca <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary')
-rw-r--r--src/gallium/auxiliary/draw/draw_pipe_unfilled.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/draw/draw_pipe_unfilled.c b/src/gallium/auxiliary/draw/draw_pipe_unfilled.c
index 8cba07c34bc..4f0326bf399 100644
--- a/src/gallium/auxiliary/draw/draw_pipe_unfilled.c
+++ b/src/gallium/auxiliary/draw/draw_pipe_unfilled.c
@@ -81,6 +81,7 @@ inject_front_face_info(struct draw_stage *stage,
v->data[slot][1] = is_front_face;
v->data[slot][2] = is_front_face;
v->data[slot][3] = is_front_face;
+ v->vertex_id = UNDEFINED_VERTEX_ID;
}
}