mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 21:50:12 +01:00
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 <zackr@vmware.com> Reviewed-by: José Fonseca <jfonseca@vmware.com> Reviewed-by: Roland Scheidegger <sroland@vmware.com>
This commit is contained in:
parent
155139059b
commit
48b07fb4fc
1 changed files with 1 additions and 0 deletions
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue