batch->state_sizes = ice->state.sizes;
batch->name = name;
batch->ice = ice;
+ batch->contains_fence_signal = false;
batch->fine_fences.uploader =
u_upload_create(&ice->ctx, 4096, PIPE_BIND_CUSTOM,
batch->primary_batch_size = 0;
batch->total_chained_batch_size = 0;
batch->contains_draw = false;
+ batch->contains_fence_signal = false;
batch->decoder.surface_base = batch->last_surface_base_address;
create_batch(batch);
{
struct iris_screen *screen = batch->screen;
- if (iris_batch_bytes_used(batch) == 0)
+ /* If a fence signals we need to flush it. */
+ if (iris_batch_bytes_used(batch) == 0 && !batch->contains_fence_signal)
return;
iris_measure_batch_end(batch->ice, batch);
/** Have we emitted any draw calls with next_seqno? */
bool contains_draw_with_next_seqno;
+ /** Batch contains fence signal operation. */
+ bool contains_fence_signal;
+
/**
* Number of times iris_batch_sync_region_start() has been called without a
* matching iris_batch_sync_region_end() on this batch.
if (iris_fine_fence_signaled(fine))
continue;
+ ice->batches[b].contains_fence_signal = true;
iris_batch_add_syncobj(&ice->batches[b], fine->syncobj,
I915_EXEC_FENCE_SIGNAL);
}