diff options
author | Keith Whitwell <[email protected]> | 2009-11-26 15:25:09 +0000 |
---|---|---|
committer | Keith Whitwell <[email protected]> | 2009-11-26 15:25:42 +0000 |
commit | b96218c65622a7814ff8154a91874a5e5a9dc773 (patch) | |
tree | b8167be355c03a9011b50c154f8b2fcb53858f00 /src/gallium/drivers/svga/svga_screen_cache.c | |
parent | 3eb3bfb7c761ed41a09c4d1c7eff38f2d92ba3ba (diff) |
svga: hash the whole key, not just the first four bytes
Diffstat (limited to 'src/gallium/drivers/svga/svga_screen_cache.c')
-rw-r--r-- | src/gallium/drivers/svga/svga_screen_cache.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gallium/drivers/svga/svga_screen_cache.c b/src/gallium/drivers/svga/svga_screen_cache.c index 65f5c07a72d..689981cc6d2 100644 --- a/src/gallium/drivers/svga/svga_screen_cache.c +++ b/src/gallium/drivers/svga/svga_screen_cache.c @@ -41,7 +41,7 @@ static INLINE unsigned svga_screen_cache_bucket(const struct svga_host_surface_cache_key *key) { - return util_hash_crc32( key, sizeof key ) % SVGA_HOST_SURFACE_CACHE_BUCKETS; + return util_hash_crc32( key, sizeof *key ) % SVGA_HOST_SURFACE_CACHE_BUCKETS; } @@ -95,8 +95,8 @@ svga_screen_cache_lookup(struct svga_screen *svgascreen, pipe_mutex_unlock(cache->mutex); if (SVGA_DEBUG & DEBUG_DMA) - debug_printf("%s: cache %s after %u tries\n", __FUNCTION__, - handle ? "hit" : "miss", tries); + debug_printf("%s: cache %s after %u tries (bucket %d)\n", __FUNCTION__, + handle ? "hit" : "miss", tries, bucket); return handle; } |