diff options
author | Ilia Mirkin <[email protected]> | 2016-02-04 12:47:42 -0500 |
---|---|---|
committer | Ilia Mirkin <[email protected]> | 2016-02-09 11:59:27 -0500 |
commit | 0d04ec2fd23f8b1baf62ea0ab8c7a86f23ada619 (patch) | |
tree | 6bad300a7cda14524878ba585fff02fc76fe38e1 /src/gallium/drivers/ilo/ilo_query.c | |
parent | c260175677c20ed4f11a6679c45391783d07aaeb (diff) |
ilo: add PIPE_QUERY_OCCLUSION_PREDICATE support
Signed-off-by: Ilia Mirkin <[email protected]>
Reviewed-by: Chia-I Wu <[email protected]>
Diffstat (limited to 'src/gallium/drivers/ilo/ilo_query.c')
-rw-r--r-- | src/gallium/drivers/ilo/ilo_query.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/gallium/drivers/ilo/ilo_query.c b/src/gallium/drivers/ilo/ilo_query.c index 27d08128ab0..106bd42a335 100644 --- a/src/gallium/drivers/ilo/ilo_query.c +++ b/src/gallium/drivers/ilo/ilo_query.c @@ -47,7 +47,7 @@ static const struct { #define INFOX(prefix) { NULL, NULL, NULL, NULL, } [PIPE_QUERY_OCCLUSION_COUNTER] = INFO(draw), - [PIPE_QUERY_OCCLUSION_PREDICATE] = INFOX(draw), + [PIPE_QUERY_OCCLUSION_PREDICATE] = INFO(draw), [PIPE_QUERY_TIMESTAMP] = INFO(draw), [PIPE_QUERY_TIMESTAMP_DISJOINT] = INFOX(draw), [PIPE_QUERY_TIME_ELAPSED] = INFO(draw), @@ -75,6 +75,7 @@ ilo_create_query(struct pipe_context *pipe, unsigned query_type, unsigned index) switch (query_type) { case PIPE_QUERY_OCCLUSION_COUNTER: + case PIPE_QUERY_OCCLUSION_PREDICATE: case PIPE_QUERY_TIMESTAMP: case PIPE_QUERY_TIME_ELAPSED: case PIPE_QUERY_PRIMITIVES_GENERATED: @@ -163,6 +164,12 @@ query_serialize(const struct ilo_query *q, void *buf) dst[0] = q->result.u64; } break; + case PIPE_QUERY_OCCLUSION_PREDICATE: + { + uint64_t *dst = buf; + dst[0] = !!q->result.u64; + } + break; case PIPE_QUERY_PIPELINE_STATISTICS: { const struct pipe_query_data_pipeline_statistics *stats = |