offset);
break;
case PIPE_QUERY_TIME_ELAPSED:
- assert(false);
+ case PIPE_QUERY_TIMESTAMP:
+ case PIPE_QUERY_TIMESTAMP_DISJOINT:
iris_pipelined_write(&ice->render_batch, q,
PIPE_CONTROL_WRITE_TIMESTAMP,
offset);
case PIPE_QUERY_OCCLUSION_PREDICATE_CONSERVATIVE:
q->result = q->map->end != q->map->start;
break;
+ case PIPE_QUERY_TIMESTAMP:
+ case PIPE_QUERY_TIMESTAMP_DISJOINT:
+ /* The timestamp is the single ending snapshot. */
+ // XXX: timebase scale
+ q->result = q->map->end;
+ break;
case PIPE_QUERY_OCCLUSION_COUNTER:
case PIPE_QUERY_TIME_ELAPSED:
case PIPE_QUERY_PRIMITIVES_GENERATED:
struct iris_context *ice = (void *) ctx;
struct iris_query *q = (void *) query;
+ if (q->type == PIPE_QUERY_TIMESTAMP) {
+ iris_begin_query(ctx, query);
+ write_availability(ice, q, true);
+ }
+
if (q->type == PIPE_QUERY_PRIMITIVES_GENERATED && q->index == 0) {
ice->state.prims_generated_query_active = true;
ice->state.dirty |= IRIS_DIRTY_STREAMOUT;