diff options
Diffstat (limited to 'src/gallium/auxiliary/draw/draw_pt_vsplit.c')
-rw-r--r-- | src/gallium/auxiliary/draw/draw_pt_vsplit.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/gallium/auxiliary/draw/draw_pt_vsplit.c b/src/gallium/auxiliary/draw/draw_pt_vsplit.c index a687525..c19dcd9 100644 --- a/src/gallium/auxiliary/draw/draw_pt_vsplit.c +++ b/src/gallium/auxiliary/draw/draw_pt_vsplit.c @@ -85,7 +85,12 @@ vsplit_flush_cache(struct vsplit_frontend *vsplit, unsigned flags) static INLINE void vsplit_add_cache(struct vsplit_frontend *vsplit, unsigned fetch) { - unsigned hash = fetch % MAP_SIZE; + struct draw_context *draw = vsplit->draw; + unsigned hash; + + fetch = MIN2(fetch, draw->pt.max_index); + + hash = fetch % MAP_SIZE; if (vsplit->cache.fetches[hash] != fetch) { /* update cache */ |