diff options
author | Ilia Mirkin <[email protected]> | 2016-02-04 21:51:58 -0500 |
---|---|---|
committer | Ilia Mirkin <[email protected]> | 2016-02-09 11:59:35 -0500 |
commit | 7aca4bb9b130450574b42fd84667f645a0749226 (patch) | |
tree | d964989432a443a62fb581aedb9894b67241c46d /src | |
parent | 50235ab3ab9f22565aed596e5a915831d099314d (diff) |
st/mesa: make use of the occlusion predicate query
Signed-off-by: Ilia Mirkin <[email protected]>
Reviewed-by: Marek Olšák <[email protected]>
Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/state_tracker/st_cb_queryobj.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/mesa/state_tracker/st_cb_queryobj.c b/src/mesa/state_tracker/st_cb_queryobj.c index fc239bc778c..cdb9efc762b 100644 --- a/src/mesa/state_tracker/st_cb_queryobj.c +++ b/src/mesa/state_tracker/st_cb_queryobj.c @@ -96,7 +96,8 @@ st_BeginQuery(struct gl_context *ctx, struct gl_query_object *q) switch (q->Target) { case GL_ANY_SAMPLES_PASSED: case GL_ANY_SAMPLES_PASSED_CONSERVATIVE: - /* fall-through */ + type = PIPE_QUERY_OCCLUSION_PREDICATE; + break; case GL_SAMPLES_PASSED_ARB: type = PIPE_QUERY_OCCLUSION_COUNTER; break; @@ -240,7 +241,14 @@ get_query_result(struct pipe_context *pipe, stq->base.Result = data.pipeline_statistics.c_primitives; break; default: - stq->base.Result = data.u64; + switch (stq->type) { + case PIPE_QUERY_OCCLUSION_PREDICATE: + stq->base.Result = !!data.b; + break; + default: + stq->base.Result = data.u64; + break; + } break; } |