diff options
author | Kenneth Graunke <[email protected]> | 2019-01-11 13:39:04 -0800 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2019-02-21 10:26:11 -0800 |
commit | 1f91f688e8c05f1d026e92234d768a5d361e0805 (patch) | |
tree | 12e40c32b1025d160c1f925a83dd6aefdf67ad57 /src/gallium/drivers/iris/iris_query.c | |
parent | a23c06cabcfaaca4386eff7b73c9fb62894f6519 (diff) |
iris: Switch to the new PIPELINE_STATISTICS_QUERY_SINGLE capability
I had a hack in place earlier to pass the query type as q->index
for the regular statistics query, but we ended up adjusting the
interface and adding a new query type. Use that instead, fixing
pipeline statistics queries since the rebase.
Diffstat (limited to 'src/gallium/drivers/iris/iris_query.c')
-rw-r--r-- | src/gallium/drivers/iris/iris_query.c | 48 |
1 files changed, 5 insertions, 43 deletions
diff --git a/src/gallium/drivers/iris/iris_query.c b/src/gallium/drivers/iris/iris_query.c index 9d854f4bdcd..66169d1db05 100644 --- a/src/gallium/drivers/iris/iris_query.c +++ b/src/gallium/drivers/iris/iris_query.c @@ -235,7 +235,7 @@ write_value(struct iris_context *ice, struct iris_query *q, unsigned offset) SO_NUM_PRIMS_WRITTEN(q->index), q->bo, offset, false); break; - case PIPE_QUERY_PIPELINE_STATISTICS: { + case PIPE_QUERY_PIPELINE_STATISTICS_SINGLE: { static const uint32_t index_to_reg[] = { IA_VERTICES_COUNT, IA_PRIMITIVES_COUNT, @@ -334,7 +334,7 @@ calculate_result_on_cpu(const struct gen_device_info *devinfo, for (int i = 0; i < MAX_VERTEX_STREAMS; i++) q->result |= stream_overflowed((void *) q->map, i); break; - case PIPE_QUERY_PIPELINE_STATISTICS: + case PIPE_QUERY_PIPELINE_STATISTICS_SINGLE: q->result = q->map->end - q->map->start; /* WaDividePSInvocationCountBy4:HSW,BDW */ @@ -702,7 +702,7 @@ calculate_result_on_gpu(struct iris_context *ice, struct iris_query *q) /* WaDividePSInvocationCountBy4:HSW,BDW */ if (devinfo->gen == 8 && - q->type == PIPE_QUERY_PIPELINE_STATISTICS && + q->type == PIPE_QUERY_PIPELINE_STATISTICS_SINGLE && q->index == PIPE_STAT_QUERY_PS_INVOCATIONS) shr_gpr0_by_2_bits(ice); @@ -726,7 +726,7 @@ iris_create_query(struct pipe_context *ctx, q->type = query_type; q->index = index; - if (q->type == PIPE_QUERY_PIPELINE_STATISTICS && + if (q->type == PIPE_QUERY_PIPELINE_STATISTICS_SINGLE && q->index == PIPE_STAT_QUERY_CS_INVOCATIONS) q->batch_idx = IRIS_BATCH_COMPUTE; else @@ -848,45 +848,7 @@ iris_get_query_result(struct pipe_context *ctx, assert(q->ready); - if (q->type == PIPE_QUERY_PIPELINE_STATISTICS) { - switch (q->index) { - case 0: - result->pipeline_statistics.ia_vertices = q->result; - break; - case 1: - result->pipeline_statistics.ia_primitives = q->result; - break; - case 2: - result->pipeline_statistics.vs_invocations = q->result; - break; - case 3: - result->pipeline_statistics.gs_invocations = q->result; - break; - case 4: - result->pipeline_statistics.gs_primitives = q->result; - break; - case 5: - result->pipeline_statistics.c_invocations = q->result; - break; - case 6: - result->pipeline_statistics.c_primitives = q->result; - break; - case 7: - result->pipeline_statistics.ps_invocations = q->result; - break; - case 8: - result->pipeline_statistics.hs_invocations = q->result; - break; - case 9: - result->pipeline_statistics.ds_invocations = q->result; - break; - case 10: - result->pipeline_statistics.cs_invocations = q->result; - break; - } - } else { - result->u64 = q->result; - } + result->u64 = q->result; return true; } |