int batch_idx;
struct iris_monitor_object *monitor;
+
+ /* Fence for PIPE_QUERY_GPU_FINISHED. */
+ struct pipe_fence_handle *fence;
};
struct iris_query_snapshots {
query->monitor = NULL;
} else {
iris_syncpt_reference(screen, &query->syncpt, NULL);
+ screen->base.fence_reference(ctx->screen, &query->fence, NULL);
}
free(query);
}
if (q->monitor)
return iris_end_monitor(ctx, q->monitor);
+ if (q->type == PIPE_QUERY_GPU_FINISHED) {
+ ctx->flush(ctx, &q->fence, PIPE_FLUSH_DEFERRED);
+ return true;
+ }
+
struct iris_batch *batch = &ice->batches[q->batch_idx];
if (q->type == PIPE_QUERY_TIMESTAMP) {
return true;
}
+ if (q->type == PIPE_QUERY_GPU_FINISHED) {
+ struct pipe_screen *screen = ctx->screen;
+
+ result->b = screen->fence_finish(screen, ctx, q->fence,
+ wait ? PIPE_TIMEOUT_INFINITE : 0);
+ return result->b;
+ }
+
if (!q->ready) {
struct iris_batch *batch = &ice->batches[q->batch_idx];
if (q->syncpt == iris_batch_get_signal_syncpt(batch))