iris_syncpt_reference(screen, s, NULL);
ralloc_free(batch->syncpts.mem_ctx);
+ iris_syncpt_reference(screen, &batch->last_syncpt, NULL);
+
iris_bo_unreference(batch->bo);
batch->bo = NULL;
batch->map = NULL;
batch->exec_count = 0;
batch->aperture_space = 0;
+ struct iris_syncpt *syncpt =
+ ((struct iris_syncpt **) util_dynarray_begin(&batch->syncpts))[0];
+ iris_syncpt_reference(screen, &batch->last_syncpt, syncpt);
+
util_dynarray_foreach(&batch->syncpts, struct iris_syncpt *, s)
iris_syncpt_reference(screen, s, NULL);
util_dynarray_clear(&batch->syncpts);
/** The amount of aperture space (in bytes) used by all exec_bos */
int aperture_space;
+ /** A sync-point for the last batch that was submitted. */
+ struct iris_syncpt *last_syncpt;
+
/** List of other batches which we might need to flush to use a BO */
struct iris_batch *other_batches[IRIS_BATCH_COUNT - 1];