diff options
author | Dave Airlie <[email protected]> | 2011-05-12 13:20:02 +1000 |
---|---|---|
committer | Dave Airlie <[email protected]> | 2011-05-13 09:22:40 +1000 |
commit | d015d2f3912463e694d1e3c1b8cb6891f553f1f1 (patch) | |
tree | 21229625226c061e9e1d1ff4f8c1352c30beffc5 /src/gallium/drivers | |
parent | 5e15497452cf3e4d2fc76fdc6ed8113d0891b467 (diff) |
r600g: reduce memory usage from range/block hash table.
This table covered a large range unnecessarily, reduce the address
range covered, use the fact that the bottom two bits aren't significant,
and remove unused fields from the range struct. It also drops the hash_size/shift in context in favour of a define, which should make doing the math
a bit less CPU intensive.
valgrind glxinfo
Before:
==320== in use at exit: 419,754 bytes in 706 blocks
==320== total heap usage: 3,691 allocs, 2,985 frees, 7,272,467 bytes allocated
After:
==967== in use at exit: 419,754 bytes in 706 blocks
==967== total heap usage: 3,552 allocs, 2,846 frees, 3,550,131 bytes allocated
Signed-off-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r-- | src/gallium/drivers/r600/r600.h | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/gallium/drivers/r600/r600.h b/src/gallium/drivers/r600/r600.h index 33aa45088a8..7b57fc80dc2 100644 --- a/src/gallium/drivers/r600/r600.h +++ b/src/gallium/drivers/r600/r600.h @@ -193,8 +193,6 @@ struct r600_block { }; struct r600_range { - unsigned start_offset; - unsigned end_offset; struct r600_block **blocks; }; @@ -239,9 +237,7 @@ struct r600_query { struct r600_context { struct radeon *radeon; - unsigned hash_size; - unsigned hash_shift; - struct r600_range range[256]; + struct r600_range *range; unsigned nblocks; struct r600_block **blocks; struct list_head dirty; |