summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/genmipmap.c
diff options
context:
space:
mode:
authorNicolai Hähnle <[email protected]>2016-01-11 14:54:53 -0500
committerNicolai Hähnle <[email protected]>2016-02-03 14:03:49 +0100
commit6b057f8ecc43be2e190e53599bdd6b8cc96b6f19 (patch)
treeff6dcf3039d870a4a6089a86b2c1e3009d72befb /src/mesa/main/genmipmap.c
parent1a570d96a606249ba406da50a61e2eabb88c77ac (diff)
vbo: cache/memoize the result of vbo_get_minmax_indices (v3)
Some games developers are unaware that an index buffer in a VBO still needs to be read by the CPU if some varying data comes from a user pointer (unless glDrawRangeElements and friends are used). This is particularly bad when they tell us that the index buffer should live in VRAM. This cache helps, e.g. lifting This War Of Mine (a particularly bad offender) from under 10fps to slightly over 20fps on a Carrizo. Note that there is nothing prohibiting a user from rendering from multiple threads simultaneously with the same index buffer, hence the locking. (The internal buffer map taken for the buffer still leads to a race, but at least the locks are a move in the right direction.) v2: disable the cache on USAGE_TEXTURE_BUFFER as well (Chris Forbes) v3: - use bool instead of GLboolean for MinMaxCacheDirty (Ian Romanick) - replace the sticky USAGE_PERSISTENT_WRITE_MAP bit by a direct AccessFlags check Reviewed-by: Chris Forbes <[email protected]> (v2) Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/mesa/main/genmipmap.c')
0 files changed, 0 insertions, 0 deletions