summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKenneth Graunke <kenneth@whitecape.org>2019-01-11 00:21:06 -0800
committerKenneth Graunke <kenneth@whitecape.org>2019-01-23 00:37:45 -0800
commit8fc390f07871bcc3a6a1d3e07e1ef858f1ae366e (patch)
treecef617ad87a22a24bcb9a1ecedcd3dfe23ce8df7
parent45c7e4aae2c961b46f94c37144d2a06308ed55d0 (diff)
iris: Use new PIPE_STAT_QUERY enums rather than hardcoded numbers.
-rw-r--r--src/gallium/drivers/iris/iris_query.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/gallium/drivers/iris/iris_query.c b/src/gallium/drivers/iris/iris_query.c
index 0318b76a0f2..9d854f4bdcd 100644
--- a/src/gallium/drivers/iris/iris_query.c
+++ b/src/gallium/drivers/iris/iris_query.c
@@ -701,7 +701,9 @@ calculate_result_on_gpu(struct iris_context *ice, struct iris_query *q)
iris_batch_emit(batch, math, sizeof(math));
/* WaDividePSInvocationCountBy4:HSW,BDW */
- if (q->type == PIPE_QUERY_PIPELINE_STATISTICS && q->index == 7 && devinfo->gen == 8)
+ if (devinfo->gen == 8 &&
+ q->type == PIPE_QUERY_PIPELINE_STATISTICS &&
+ q->index == PIPE_STAT_QUERY_PS_INVOCATIONS)
shr_gpr0_by_2_bits(ice);
if (q->type == PIPE_QUERY_OCCLUSION_PREDICATE ||
@@ -724,7 +726,8 @@ iris_create_query(struct pipe_context *ctx,
q->type = query_type;
q->index = index;
- if (q->type == PIPE_QUERY_PIPELINE_STATISTICS && q->index == 10)
+ if (q->type == PIPE_QUERY_PIPELINE_STATISTICS &&
+ q->index == PIPE_STAT_QUERY_CS_INVOCATIONS)
q->batch_idx = IRIS_BATCH_COMPUTE;
else
q->batch_idx = IRIS_BATCH_RENDER;