r600g: make range/block act more like a page table
authorDave Airlie <airlied@redhat.com>
Thu, 12 May 2011 05:01:33 +0000 (15:01 +1000)
committerDave Airlie <airlied@redhat.com>
Thu, 12 May 2011 23:26:16 +0000 (09:26 +1000)
commit240049adfa7af6e60977139492a873933b353a0a
tree1a0e77b38532d63300bff0fe16ea1ecf04f3ffd5
parentd79a4a612bae66581caf21a74bd745ec51a18e80
r600g: make range/block act more like a page table

only allocate the blocks ptr in the range if we ever have one,
otherwise don't bother wasting the memory.

valgrind glxinfo
before:
==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

after:
==5227==     in use at exit: 419,754 bytes in 706 blocks
==5227==   total heap usage: 3,452 allocs, 2,746 frees, 3,140,531 bytes allocate

Signed-off-by: Dave Airlie <airlied@redhat.com>
src/gallium/winsys/r600/drm/evergreen_hw_context.c
src/gallium/winsys/r600/drm/r600_hw_context.c
src/gallium/winsys/r600/drm/r600_priv.h