iris_batch_maybe_noop(batch);
}
-void
+static void
iris_batch_free(struct iris_batch *batch)
{
struct iris_screen *screen = batch->screen;
intel_batch_decode_ctx_finish(&batch->decoder);
}
+void
+iris_destroy_batches(struct iris_context *ice)
+{
+ for (int i = 0; i < IRIS_BATCH_COUNT; i++)
+ iris_batch_free(&ice->batches[i]);
+}
+
/**
* If we've chained to a secondary batch, or are getting near to the end,
* then flush. This should only be called between draws.
void iris_init_batches(struct iris_context *ice, int priority);
void iris_chain_to_new_batch(struct iris_batch *batch);
-void iris_batch_free(struct iris_batch *batch);
+void iris_destroy_batches(struct iris_context *ice);
void iris_batch_maybe_flush(struct iris_batch *batch, unsigned estimate);
void _iris_batch_flush(struct iris_batch *batch, const char *file, int line);
u_upload_destroy(ice->state.dynamic_uploader);
u_upload_destroy(ice->query_buffer_uploader);
- iris_batch_free(&ice->batches[IRIS_BATCH_RENDER]);
- iris_batch_free(&ice->batches[IRIS_BATCH_COMPUTE]);
+ iris_destroy_batches(ice);
iris_destroy_binder(&ice->state.binder);
slab_destroy_child(&ice->transfer_pool);