i915: Remove the remainder of the batchbuffer caching.
authorEric Anholt <eric@anholt.net>
Thu, 20 Jun 2013 22:00:44 +0000 (15:00 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Fri, 28 Jun 2013 20:35:23 +0000 (13:35 -0700)
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/i915/intel_batchbuffer.c
src/mesa/drivers/dri/i915/intel_context.h

index 2a279f6b915926b1d3ab64d55c49c6afebe5e0b1..432f89e77034bf82345d9f846e758fe14a724510 100644 (file)
 static void
 intel_batchbuffer_reset(struct intel_context *intel);
 
-struct cached_batch_item {
-   struct cached_batch_item *next;
-   uint16_t header;
-   uint16_t size;
-};
-
-static void clear_cache( struct intel_context *intel )
-{
-   struct cached_batch_item *item = intel->batch.cached_items;
-
-   while (item) {
-      struct cached_batch_item *next = item->next;
-      free(item);
-      item = next;
-   }
-
-   intel->batch.cached_items = NULL;
-}
-
 void
 intel_batchbuffer_init(struct intel_context *intel)
 {
@@ -74,8 +55,6 @@ intel_batchbuffer_reset(struct intel_context *intel)
    }
    intel->batch.last_bo = intel->batch.bo;
 
-   clear_cache(intel);
-
    intel->batch.bo = drm_intel_bo_alloc(intel->bufmgr, "batchbuffer",
                                        intel->maxBatchSize, 4096);
    if (intel->has_llc) {
@@ -95,7 +74,6 @@ intel_batchbuffer_free(struct intel_context *intel)
    free(intel->batch.cpu_map);
    drm_intel_bo_unreference(intel->batch.last_bo);
    drm_intel_bo_unreference(intel->batch.bo);
-   clear_cache(intel);
 }
 
 static void
index 04f820744e09cbaab659a47f71faf708bc3b9612..033ab476826fbf9aca60a37ef0a3483dcaee8c1e 100644 (file)
@@ -122,8 +122,6 @@ struct intel_batchbuffer {
    /** Last BO submitted to the hardware.  Used for glFinish(). */
    drm_intel_bo *last_bo;
 
-   struct cached_batch_item *cached_items;
-
    uint16_t emit, total;
    uint16_t used, reserved_space;
    uint32_t *map;