summaryrefslogtreecommitdiff
path: root/lib/mesa/src/gallium/drivers/freedreno/a5xx/fd5_query.c
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2020-08-26 06:03:18 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2020-08-26 06:03:18 +0000
commitaf5e8f5366b05c3d4f8521f318c143a5c5dc3ea9 (patch)
treec5691445908b1beca9facf0e5e3c5d7f35f74228 /lib/mesa/src/gallium/drivers/freedreno/a5xx/fd5_query.c
parent27c93456b58343162f7c4ad20ca6bea0c9a91646 (diff)
Merge Mesa 20.1.6
Diffstat (limited to 'lib/mesa/src/gallium/drivers/freedreno/a5xx/fd5_query.c')
-rw-r--r--lib/mesa/src/gallium/drivers/freedreno/a5xx/fd5_query.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/lib/mesa/src/gallium/drivers/freedreno/a5xx/fd5_query.c b/lib/mesa/src/gallium/drivers/freedreno/a5xx/fd5_query.c
index b438c7a56..254b49696 100644
--- a/lib/mesa/src/gallium/drivers/freedreno/a5xx/fd5_query.c
+++ b/lib/mesa/src/gallium/drivers/freedreno/a5xx/fd5_query.c
@@ -134,7 +134,6 @@ occlusion_predicate_result(struct fd_acc_query *aq, void *buf,
static const struct fd_acc_sample_provider occlusion_counter = {
.query_type = PIPE_QUERY_OCCLUSION_COUNTER,
- .active = FD_STAGE_DRAW,
.size = sizeof(struct fd5_query_sample),
.resume = occlusion_resume,
.pause = occlusion_pause,
@@ -143,7 +142,6 @@ static const struct fd_acc_sample_provider occlusion_counter = {
static const struct fd_acc_sample_provider occlusion_predicate = {
.query_type = PIPE_QUERY_OCCLUSION_PREDICATE,
- .active = FD_STAGE_DRAW,
.size = sizeof(struct fd5_query_sample),
.resume = occlusion_resume,
.pause = occlusion_pause,
@@ -152,7 +150,6 @@ static const struct fd_acc_sample_provider occlusion_predicate = {
static const struct fd_acc_sample_provider occlusion_predicate_conservative = {
.query_type = PIPE_QUERY_OCCLUSION_PREDICATE_CONSERVATIVE,
- .active = FD_STAGE_DRAW,
.size = sizeof(struct fd5_query_sample),
.resume = occlusion_resume,
.pause = occlusion_pause,
@@ -169,7 +166,7 @@ timestamp_resume(struct fd_acc_query *aq, struct fd_batch *batch)
struct fd_ringbuffer *ring = batch->draw;
OUT_PKT7(ring, CP_EVENT_WRITE, 4);
- OUT_RING(ring, CP_EVENT_WRITE_0_EVENT(CACHE_FLUSH_AND_INV_EVENT) |
+ OUT_RING(ring, CP_EVENT_WRITE_0_EVENT(RB_DONE_TS) |
CP_EVENT_WRITE_0_TIMESTAMP);
OUT_RELOCW(ring, query_sample(aq, start));
OUT_RING(ring, 0x00000000);
@@ -183,7 +180,7 @@ timestamp_pause(struct fd_acc_query *aq, struct fd_batch *batch)
struct fd_ringbuffer *ring = batch->draw;
OUT_PKT7(ring, CP_EVENT_WRITE, 4);
- OUT_RING(ring, CP_EVENT_WRITE_0_EVENT(CACHE_FLUSH_AND_INV_EVENT) |
+ OUT_RING(ring, CP_EVENT_WRITE_0_EVENT(RB_DONE_TS) |
CP_EVENT_WRITE_0_TIMESTAMP);
OUT_RELOCW(ring, query_sample(aq, stop));
OUT_RING(ring, 0x00000000);
@@ -229,7 +226,7 @@ timestamp_accumulate_result(struct fd_acc_query *aq, void *buf,
static const struct fd_acc_sample_provider time_elapsed = {
.query_type = PIPE_QUERY_TIME_ELAPSED,
- .active = FD_STAGE_DRAW | FD_STAGE_CLEAR,
+ .always = true,
.size = sizeof(struct fd5_query_sample),
.resume = timestamp_resume,
.pause = timestamp_pause,
@@ -245,7 +242,7 @@ static const struct fd_acc_sample_provider time_elapsed = {
static const struct fd_acc_sample_provider timestamp = {
.query_type = PIPE_QUERY_TIMESTAMP,
- .active = FD_STAGE_ALL,
+ .always = true,
.size = sizeof(struct fd5_query_sample),
.resume = timestamp_resume,
.pause = timestamp_pause,
@@ -366,7 +363,7 @@ perfcntr_accumulate_result(struct fd_acc_query *aq, void *buf,
static const struct fd_acc_sample_provider perfcntr = {
.query_type = FD_QUERY_FIRST_PERFCNTR,
- .active = FD_STAGE_DRAW | FD_STAGE_CLEAR,
+ .always = true,
.resume = perfcntr_resume,
.pause = perfcntr_pause,
.result = perfcntr_accumulate_result,
@@ -433,7 +430,7 @@ fd5_create_batch_query(struct pipe_context *pctx,
counters_per_group[entry->gid]++;
}
- q = fd_acc_create_query2(ctx, 0, &perfcntr);
+ q = fd_acc_create_query2(ctx, 0, 0, &perfcntr);
aq = fd_acc_query(q);
/* sample buffer size is based on # of queries: */