diff options
author | Eric Anholt <[email protected]> | 2020-03-27 17:23:19 -0700 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-03-30 21:35:21 +0000 |
commit | d0b3ccb06076c921e60afbf0810b3b50bbce39e4 (patch) | |
tree | 09d3e6b53e17fb231a16bb145921bd9663c2963b /src/gallium/drivers/freedreno/a5xx | |
parent | 57d54bcf994f2b3a963f73775a3dd756e8d96be3 (diff) |
freedreno: Fix detection of being in a blit for acc queries.
The batch might not have stage == FD_STAGE_BLIT set because
fd_blitter_pipe_begin was sticking the stage on some random batch (or none
at all) rather than the one that would be used in the meta operation.
What we actually wanted to be looking at was set_active_query_state(),
which is already called by util_blitter and whose state we just needed to
track.
Fixes piglit occlusion_query_meta_no_fragments. I haven't changed
query_hw.c's stage handling to clean the rest up because I don't have a
db410c/db820c at home to iterate over the piglit tests.
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4356>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4356>
Diffstat (limited to 'src/gallium/drivers/freedreno/a5xx')
-rw-r--r-- | src/gallium/drivers/freedreno/a5xx/fd5_query.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/gallium/drivers/freedreno/a5xx/fd5_query.c b/src/gallium/drivers/freedreno/a5xx/fd5_query.c index 6cf9e2d6140..ac11dbb86ee 100644 --- a/src/gallium/drivers/freedreno/a5xx/fd5_query.c +++ b/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, @@ -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_ALL, + .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_ALL, + .always = true, .resume = perfcntr_resume, .pause = perfcntr_pause, .result = perfcntr_accumulate_result, |