diff options
Diffstat (limited to 'src/gallium/drivers/freedreno')
-rw-r--r-- | src/gallium/drivers/freedreno/a3xx/fd3_query.c | 8 | ||||
-rw-r--r-- | src/gallium/drivers/freedreno/a4xx/fd4_query.c | 8 | ||||
-rw-r--r-- | src/gallium/drivers/freedreno/a5xx/fd5_query.c | 10 | ||||
-rw-r--r-- | src/gallium/drivers/freedreno/freedreno_query.h | 1 |
4 files changed, 27 insertions, 0 deletions
diff --git a/src/gallium/drivers/freedreno/a3xx/fd3_query.c b/src/gallium/drivers/freedreno/a3xx/fd3_query.c index cde42c37313..97a95b21546 100644 --- a/src/gallium/drivers/freedreno/a3xx/fd3_query.c +++ b/src/gallium/drivers/freedreno/a3xx/fd3_query.c @@ -131,6 +131,13 @@ static const struct fd_hw_sample_provider occlusion_predicate = { .accumulate_result = occlusion_predicate_accumulate_result, }; +static const struct fd_hw_sample_provider occlusion_predicate_conservative = { + .query_type = PIPE_QUERY_OCCLUSION_PREDICATE_CONSERVATIVE, + .active = FD_STAGE_DRAW, + .get_sample = occlusion_get_sample, + .accumulate_result = occlusion_predicate_accumulate_result, +}; + void fd3_query_context_init(struct pipe_context *pctx) { struct fd_context *ctx = fd_context(pctx); @@ -142,4 +149,5 @@ void fd3_query_context_init(struct pipe_context *pctx) fd_hw_query_register_provider(pctx, &occlusion_counter); fd_hw_query_register_provider(pctx, &occlusion_predicate); + fd_hw_query_register_provider(pctx, &occlusion_predicate_conservative); } diff --git a/src/gallium/drivers/freedreno/a4xx/fd4_query.c b/src/gallium/drivers/freedreno/a4xx/fd4_query.c index f7b385d552d..809e7570b48 100644 --- a/src/gallium/drivers/freedreno/a4xx/fd4_query.c +++ b/src/gallium/drivers/freedreno/a4xx/fd4_query.c @@ -251,6 +251,13 @@ static const struct fd_hw_sample_provider occlusion_predicate = { .accumulate_result = occlusion_predicate_accumulate_result, }; +static const struct fd_hw_sample_provider occlusion_predicate = { + .query_type = PIPE_QUERY_OCCLUSION_PREDICATE_CONSERVATIVE, + .active = FD_STAGE_DRAW, + .get_sample = occlusion_get_sample, + .accumulate_result = occlusion_predicate_accumulate_result, +}; + static const struct fd_hw_sample_provider time_elapsed = { .query_type = PIPE_QUERY_TIME_ELAPSED, .active = FD_STAGE_DRAW | FD_STAGE_CLEAR, @@ -284,6 +291,7 @@ void fd4_query_context_init(struct pipe_context *pctx) fd_hw_query_register_provider(pctx, &occlusion_counter); fd_hw_query_register_provider(pctx, &occlusion_predicate); + fd_hw_query_register_provider(pctx, &occlusion_predicate_conservative); fd_hw_query_register_provider(pctx, &time_elapsed); fd_hw_query_register_provider(pctx, ×tamp); } diff --git a/src/gallium/drivers/freedreno/a5xx/fd5_query.c b/src/gallium/drivers/freedreno/a5xx/fd5_query.c index 80b84ce54ba..87417f1f96e 100644 --- a/src/gallium/drivers/freedreno/a5xx/fd5_query.c +++ b/src/gallium/drivers/freedreno/a5xx/fd5_query.c @@ -144,6 +144,15 @@ static const struct fd_acc_sample_provider occlusion_predicate = { .result = occlusion_predicate_result, }; +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, + .result = occlusion_predicate_result, +}; + /* * Timestamp Queries: */ @@ -247,6 +256,7 @@ fd5_query_context_init(struct pipe_context *pctx) fd_acc_query_register_provider(pctx, &occlusion_counter); fd_acc_query_register_provider(pctx, &occlusion_predicate); + fd_acc_query_register_provider(pctx, &occlusion_predicate_conservative); fd_acc_query_register_provider(pctx, &time_elapsed); fd_acc_query_register_provider(pctx, ×tamp); diff --git a/src/gallium/drivers/freedreno/freedreno_query.h b/src/gallium/drivers/freedreno/freedreno_query.h index 49a86803c4d..b8fa0951ded 100644 --- a/src/gallium/drivers/freedreno/freedreno_query.h +++ b/src/gallium/drivers/freedreno/freedreno_query.h @@ -85,6 +85,7 @@ int pidx(unsigned query_type) case PIPE_QUERY_OCCLUSION_COUNTER: return 0; case PIPE_QUERY_OCCLUSION_PREDICATE: + case PIPE_QUERY_OCCLUSION_PREDICATE_CONSERVATIVE: return 1; /* TODO currently queries only emitted in main pass (not in binning pass).. * which is fine for occlusion query, but pretty much not anything else. |