mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 11:48:06 +02:00
iris: timestamps
This commit is contained in:
parent
23572cdd07
commit
ec82be57e8
1 changed files with 13 additions and 1 deletions
|
|
@ -189,7 +189,8 @@ write_value(struct iris_context *ice, struct iris_query *q, unsigned offset)
|
|||
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);
|
||||
|
|
@ -239,6 +240,12 @@ calculate_result_on_cpu(struct iris_query *q)
|
|||
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:
|
||||
|
|
@ -362,6 +369,11 @@ iris_end_query(struct pipe_context *ctx, struct pipe_query *query)
|
|||
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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue