Mesa (master): i965: Remove brw_state_cache_bo_delete now that it' s unused again.

Eric Anholt anholt at kemper.freedesktop.org
Fri Jun 11 00:21:46 PDT 2010


Module: Mesa
Branch: master
Commit: 309c011641c6189dc74bc2f78ba6d6602d8c96b7
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=309c011641c6189dc74bc2f78ba6d6602d8c96b7

Author: Eric Anholt <eric at anholt.net>
Date:   Mon Jun  7 23:04:09 2010 -0700

i965: Remove brw_state_cache_bo_delete now that it's unused again.

---

 src/mesa/drivers/dri/i965/brw_state.h       |    1 -
 src/mesa/drivers/dri/i965/brw_state_cache.c |   36 ---------------------------
 2 files changed, 0 insertions(+), 37 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_state.h b/src/mesa/drivers/dri/i965/brw_state.h
index 577c70a..3e2ec3e 100644
--- a/src/mesa/drivers/dri/i965/brw_state.h
+++ b/src/mesa/drivers/dri/i965/brw_state.h
@@ -175,7 +175,6 @@ void brw_state_cache_check_size( struct brw_context *brw );
 
 void brw_init_caches( struct brw_context *brw );
 void brw_destroy_caches( struct brw_context *brw );
-void brw_state_cache_bo_delete(struct brw_cache *cache, drm_intel_bo *bo);
 
 /***********************************************************************
  * brw_state_batch.c
diff --git a/src/mesa/drivers/dri/i965/brw_state_cache.c b/src/mesa/drivers/dri/i965/brw_state_cache.c
index c19ea85..d8d577d 100644
--- a/src/mesa/drivers/dri/i965/brw_state_cache.c
+++ b/src/mesa/drivers/dri/i965/brw_state_cache.c
@@ -433,42 +433,6 @@ brw_clear_cache(struct brw_context *brw, struct brw_cache *cache)
    brw->state.dirty.cache |= ~0;
 }
 
-/* Clear all entries from the cache that point to the given bo.
- *
- * This lets us release memory for reuse earlier for known-dead buffers,
- * at the cost of walking the entire hash table.
- */
-void
-brw_state_cache_bo_delete(struct brw_cache *cache, drm_intel_bo *bo)
-{
-   struct brw_cache_item **prev;
-   GLuint i;
-
-   if (INTEL_DEBUG & DEBUG_STATE)
-      printf("%s\n", __FUNCTION__);
-
-   for (i = 0; i < cache->size; i++) {
-      for (prev = &cache->items[i]; *prev;) {
-	 struct brw_cache_item *c = *prev;
-
-	 if (drm_intel_bo_references(c->bo, bo)) {
-	    int j;
-
-	    *prev = c->next;
-
-	    for (j = 0; j < c->nr_reloc_bufs; j++)
-	       drm_intel_bo_unreference(c->reloc_bufs[j]);
-	    drm_intel_bo_unreference(c->bo);
-	    free((void *)c->key);
-	    free(c);
-	    cache->n_items--;
-	 } else {
-	    prev = &c->next;
-	 }
-      }
-   }
-}
-
 void
 brw_state_cache_check_size(struct brw_context *brw)
 {



More information about the mesa-commit mailing list