diff options
author | Nicolai Hähnle <[email protected]> | 2017-09-12 18:46:46 +0200 |
---|---|---|
committer | Nicolai Hähnle <[email protected]> | 2017-09-18 11:25:18 +0200 |
commit | 3f6b3d9db72c45e648c8c5943ef949273b110005 (patch) | |
tree | 42a40a28274ee27bc0878a7414aaa6670ba56ee6 /src/mesa/state_tracker | |
parent | 94736d31c364635a76a11e0bd4f046a42d2221d5 (diff) |
gallium: add PIPE_QUERY_OCCLUSION_PREDICATE_CONSERVATIVE
To be able to properly distinguish between GL_ANY_SAMPLES_PASSED
and GL_ANY_SAMPLES_PASSED_CONSERVATIVE.
This patch goes through all drivers, having them treat the two
query types identically, except:
1. radeon incorrectly enabled conservative mode on
PIPE_QUERY_OCCLUSION_PREDICATE. We now do it correctly, only
on PIPE_QUERY_OCCLUSION_PREDICATE_CONSERVATIVE.
2. st/mesa uses the new query type.
Fixes dEQP-GLES31.functional.fbo.no_attachments.*
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker')
-rw-r--r-- | src/mesa/state_tracker/st_cb_queryobj.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mesa/state_tracker/st_cb_queryobj.c b/src/mesa/state_tracker/st_cb_queryobj.c index 4c25724b5dc..a470ff6b8b5 100644 --- a/src/mesa/state_tracker/st_cb_queryobj.c +++ b/src/mesa/state_tracker/st_cb_queryobj.c @@ -102,9 +102,11 @@ st_BeginQuery(struct gl_context *ctx, struct gl_query_object *q) /* convert GL query type to Gallium query type */ switch (q->Target) { case GL_ANY_SAMPLES_PASSED: - case GL_ANY_SAMPLES_PASSED_CONSERVATIVE: type = PIPE_QUERY_OCCLUSION_PREDICATE; break; + case GL_ANY_SAMPLES_PASSED_CONSERVATIVE: + type = PIPE_QUERY_OCCLUSION_PREDICATE_CONSERVATIVE; + break; case GL_SAMPLES_PASSED_ARB: type = PIPE_QUERY_OCCLUSION_COUNTER; break; @@ -260,6 +262,7 @@ get_query_result(struct pipe_context *pipe, default: switch (stq->type) { case PIPE_QUERY_OCCLUSION_PREDICATE: + case PIPE_QUERY_OCCLUSION_PREDICATE_CONSERVATIVE: case PIPE_QUERY_SO_OVERFLOW_PREDICATE: case PIPE_QUERY_SO_OVERFLOW_ANY_PREDICATE: stq->base.Result = !!data.b; |