Fix vertex cache bug that allows multiple vertices to fall into the same slot.
authorBrian <brian.paul@tungstengraphics.com>
Tue, 23 Oct 2007 21:08:54 +0000 (15:08 -0600)
committerBrian <brian.paul@tungstengraphics.com>
Tue, 23 Oct 2007 21:08:54 +0000 (15:08 -0600)
commit4664261f8d8fefa347bf38a224f6584d0fdeebfc
treef2bfecda388f5ae02875aed15a09fdaf4f3852a9
parent3df65af849280863a15fefcb11f8304b83c9ffa0
Fix vertex cache bug that allows multiple vertices to fall into the same slot.

Need to set the slot's bit in draw->vcache.referenced even when there was a
cache hit since flushing the primitive buffer will have cleared the bitfield
but not the cache's vertex indexes.

Fixes a bug found when drawing long triangle fans but could be hit by other
prim types as well.

An alternate fix would be to call draw_vertex_cache_invalidate() from
draw_vertex_cache_unreference().
src/mesa/pipe/draw/draw_vertex_cache.c