brw->state.dirty.cache = ~0;
brw->state_batch_count = 0;
brw->batch.need_workaround_flush = true;
+ brw->ib.type = -1;
+ intel_batchbuffer_clear_cache(brw);
/* Flush the sampler cache so any texturing from the destination is
* coherent.
uint16_t size;
};
-static void
-clear_cache(struct brw_context *brw)
+void
+intel_batchbuffer_clear_cache(struct brw_context *brw)
{
struct cached_batch_item *item = brw->batch.cached_items;
}
brw->batch.last_bo = brw->batch.bo;
- clear_cache(brw);
+ intel_batchbuffer_clear_cache(brw);
brw->batch.bo = drm_intel_bo_alloc(brw->bufmgr, "batchbuffer",
BATCH_SZ, 4096);
/* Cached batch state is dead, since we just cleared some unknown part of the
* batchbuffer. Assume that the caller resets any other state necessary.
*/
- clear_cache(brw);
+ intel_batchbuffer_clear_cache(brw);
}
void
drm_intel_bo_unreference(brw->batch.last_bo);
drm_intel_bo_unreference(brw->batch.bo);
drm_intel_bo_unreference(brw->batch.workaround_bo);
- clear_cache(brw);
+ intel_batchbuffer_clear_cache(brw);
}
static void
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);