llvmpipe: shortcircuit repeated lookups of the same tile
authorKeith Whitwell <keithw@vmware.com>
Wed, 22 Jul 2009 14:08:42 +0000 (15:08 +0100)
committerJosé Fonseca <jfonseca@vmware.com>
Sat, 29 Aug 2009 08:21:17 +0000 (09:21 +0100)
commit2301314e7ccd37faae80353d35109bb029dc9335
tree2204dad40e37adbaa8bb70bd6f07c34f674b7786
parentdf1823ec5b2c64a9d1a5fc13be0e0f37741c3ffa
llvmpipe: shortcircuit repeated lookups of the same tile

The lp_tile_cache is often called repeatedly to look up the same
tile.  Add a cache (to the cache) of the single tile most recently
retreived and make a quick inline check to see if this matches the
subsequent request.

Add a tile_address bitfield struct to make this check easier.
src/gallium/drivers/llvmpipe/lp_tex_sample.c
src/gallium/drivers/llvmpipe/lp_tile_cache.c
src/gallium/drivers/llvmpipe/lp_tile_cache.h