i965: Drop some more dead code from the old CACHED_BATCH feature.
authorEric Anholt <eric@anholt.net>
Thu, 13 Mar 2014 23:53:09 +0000 (16:53 -0700)
committerEric Anholt <eric@anholt.net>
Tue, 18 Mar 2014 21:45:09 +0000 (14:45 -0700)
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/i965/brw_blorp.cpp
src/mesa/drivers/dri/i965/brw_context.h
src/mesa/drivers/dri/i965/intel_batchbuffer.c
src/mesa/drivers/dri/i965/intel_batchbuffer.h

index f26d02662ff3cf443b316f417daf5d82f1411bec..252219e856412324b70a3bc2a60657f35046f980 100644 (file)
@@ -279,7 +279,6 @@ retry:
    brw->state.dirty.brw = ~0;
    brw->state.dirty.cache = ~0;
    brw->ib.type = -1;
-   intel_batchbuffer_clear_cache(brw);
 
    /* Flush the sampler cache so any texturing from the destination is
     * coherent.
index 80dba1011fa70a22e4a24fd0cdbf311e646d980f..32fc38be56aa62726e29eb9f9e6793f7e8873356 100644 (file)
@@ -820,12 +820,6 @@ enum shader_time_shader_type {
 #define CACHE_NEW_CLIP_UNIT              (1<<BRW_CLIP_UNIT)
 #define CACHE_NEW_CLIP_PROG              (1<<BRW_CLIP_PROG)
 
-struct brw_cached_batch_item {
-   struct header *header;
-   GLuint sz;
-   struct brw_cached_batch_item *next;
-};
-
 struct brw_vertex_buffer {
    /** Buffer object containing the uploaded vertex data */
    drm_intel_bo *bo;
@@ -877,8 +871,6 @@ struct intel_batchbuffer {
    drm_intel_bo *workaround_bo;
    bool need_workaround_flush;
 
-   struct cached_batch_item *cached_items;
-
    uint16_t emit, total;
    uint16_t used, reserved_space;
    uint32_t *map;
@@ -1129,7 +1121,6 @@ struct brw_context
    } state;
 
    struct brw_cache cache;
-   struct brw_cached_batch_item *cached_batch_items;
 
    /* Whether a meta-operation is in progress. */
    bool meta_in_progress;
index fe953422751275834156b4cab561af0734f3ba70..5a7cfcb1a93b09391d940c6b697b0e8aebf572b7 100644 (file)
 static void
 intel_batchbuffer_reset(struct brw_context *brw);
 
-struct cached_batch_item {
-   struct cached_batch_item *next;
-   uint16_t header;
-   uint16_t size;
-};
-
-void
-intel_batchbuffer_clear_cache(struct brw_context *brw)
-{
-   struct cached_batch_item *item = brw->batch.cached_items;
-
-   while (item) {
-      struct cached_batch_item *next = item->next;
-      free(item);
-      item = next;
-   }
-
-   brw->batch.cached_items = NULL;
-}
-
 void
 intel_batchbuffer_init(struct brw_context *brw)
 {
@@ -88,7 +68,6 @@ intel_batchbuffer_reset(struct brw_context *brw)
    }
    brw->batch.last_bo = brw->batch.bo;
 
-   intel_batchbuffer_clear_cache(brw);
    brw_render_cache_set_clear(brw);
 
    brw->batch.bo = drm_intel_bo_alloc(brw->bufmgr, "batchbuffer",
@@ -125,11 +104,6 @@ intel_batchbuffer_reset_to_saved(struct brw_context *brw)
    brw->batch.used = brw->batch.saved.used;
    if (brw->batch.used == 0)
       brw->batch.ring = UNKNOWN_RING;
-
-   /* Cached batch state is dead, since we just cleared some unknown part of the
-    * batchbuffer.  Assume that the caller resets any other state necessary.
-    */
-   intel_batchbuffer_clear_cache(brw);
 }
 
 void
@@ -139,7 +113,6 @@ intel_batchbuffer_free(struct brw_context *brw)
    drm_intel_bo_unreference(brw->batch.last_bo);
    drm_intel_bo_unreference(brw->batch.bo);
    drm_intel_bo_unreference(brw->batch.workaround_bo);
-   intel_batchbuffer_clear_cache(brw);
 }
 
 static void
index 779a7ccd05c023427945435aaa6204c4c9f59b26..7bdd8364346b05597b8a0623a405a698f5128635 100644 (file)
@@ -36,7 +36,6 @@ void intel_batchbuffer_init(struct brw_context *brw);
 void intel_batchbuffer_free(struct brw_context *brw);
 void intel_batchbuffer_save_state(struct brw_context *brw);
 void intel_batchbuffer_reset_to_saved(struct brw_context *brw);
-void intel_batchbuffer_clear_cache(struct brw_context *brw);
 
 int _intel_batchbuffer_flush(struct brw_context *brw,
                             const char *file, int line);