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/gallium/drivers/r300 | |
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/gallium/drivers/r300')
-rw-r--r-- | src/gallium/drivers/r300/r300_query.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/gallium/drivers/r300/r300_query.c b/src/gallium/drivers/r300/r300_query.c index d2dc7b73c05..a84c941768f 100644 --- a/src/gallium/drivers/r300/r300_query.c +++ b/src/gallium/drivers/r300/r300_query.c @@ -39,6 +39,7 @@ static struct pipe_query *r300_create_query(struct pipe_context *pipe, if (query_type != PIPE_QUERY_OCCLUSION_COUNTER && query_type != PIPE_QUERY_OCCLUSION_PREDICATE && + query_type != PIPE_QUERY_OCCLUSION_PREDICATE_CONSERVATIVE && query_type != PIPE_QUERY_GPU_FINISHED) { return NULL; } @@ -171,7 +172,8 @@ static boolean r300_get_query_result(struct pipe_context* pipe, map++; } - if (q->type == PIPE_QUERY_OCCLUSION_PREDICATE) { + if (q->type == PIPE_QUERY_OCCLUSION_PREDICATE || + q->type == PIPE_QUERY_OCCLUSION_PREDICATE_CONSERVATIVE) { vresult->b = temp != 0; } else { vresult->u64 = temp; @@ -195,7 +197,8 @@ static void r300_render_condition(struct pipe_context *pipe, mode == PIPE_RENDER_COND_BY_REGION_WAIT; if (r300_get_query_result(pipe, query, wait, &result)) { - if (r300_query(query)->type == PIPE_QUERY_OCCLUSION_PREDICATE) { + if (r300_query(query)->type == PIPE_QUERY_OCCLUSION_PREDICATE || + r300_query(query)->type == PIPE_QUERY_OCCLUSION_PREDICATE_CONSERVATIVE) { r300->skip_rendering = condition == result.b; } else { r300->skip_rendering = condition == !!result.u64; |