i965: Mostly fix glsl-max-varyings.
[mesa.git] / src / mesa / drivers / dri / i965 / brw_state_cache.c
index c19ea85e7464747cce66af5a4ff1be3800d55b41..b31d84953a1a9639e85b956d0dd360e29768f62c 100644 (file)
@@ -310,9 +310,7 @@ drm_intel_bo *
 brw_cache_data(struct brw_cache *cache,
               enum brw_cache_id cache_id,
               const void *data,
-              GLuint data_size,
-              drm_intel_bo **reloc_bufs,
-              GLuint nr_reloc_bufs)
+              GLuint data_size)
 {
    drm_intel_bo *bo;
    struct brw_cache_item *item, lookup;
@@ -321,8 +319,8 @@ brw_cache_data(struct brw_cache *cache,
    lookup.cache_id = cache_id;
    lookup.key = data;
    lookup.key_size = data_size;
-   lookup.reloc_bufs = reloc_bufs;
-   lookup.nr_reloc_bufs = nr_reloc_bufs;
+   lookup.reloc_bufs = NULL;
+   lookup.nr_reloc_bufs = 0;
    hash = hash_key(&lookup);
    lookup.hash = hash;
 
@@ -335,7 +333,7 @@ brw_cache_data(struct brw_cache *cache,
 
    bo = brw_upload_cache(cache, cache_id,
                         data, data_size,
-                        reloc_bufs, nr_reloc_bufs,
+                        NULL, 0,
                         data, data_size);
 
    return bo;
@@ -433,42 +431,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)
 {