OSDN Git Service

i965: Fix massive memory allocation for streaming texture usage.
authorEric Anholt <eric@anholt.net>
Thu, 12 Feb 2009 11:54:58 +0000 (03:54 -0800)
committerEric Anholt <eric@anholt.net>
Wed, 30 Sep 2009 18:27:27 +0000 (11:27 -0700)
commit49fbdd18ed738feaf73b7faba4d3577cd9cc3e59
tree65a5cca320d3f4ad3baadefe975a3628982587e4
parentb77469871a57240b33b61f12cde0da078470237b
i965: Fix massive memory allocation for streaming texture usage.

Once we've freed a miptree, we won't see any more state cache requests
that would hit the things that pointed at it until we've let the miptree
get released back into the BO cache to be reused.  By leaving those
surface state and binding table pointers that pointed at it around, we
would end up with up to (500 * texture size) in memory uselessly consumed
by the state cache.

Bug #20057
Bug #23530
src/mesa/drivers/dri/i965/brw_state.h
src/mesa/drivers/dri/i965/brw_state_cache.c
src/mesa/drivers/dri/intel/intel_mipmap_tree.c