From 3f6b3d9db72c45e648c8c5943ef949273b110005 Mon Sep 17 00:00:00 2001 From: Nicolai Hähnle Date: Tue, 12 Sep 2017 18:46:46 +0200 Subject: gallium: add PIPE_QUERY_OCCLUSION_PREDICATE_CONSERVATIVE MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- src/gallium/drivers/llvmpipe/lp_rast.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/gallium/drivers/llvmpipe/lp_rast.c') diff --git a/src/gallium/drivers/llvmpipe/lp_rast.c b/src/gallium/drivers/llvmpipe/lp_rast.c index b25ade3d2ec..0050655d9e3 100644 --- a/src/gallium/drivers/llvmpipe/lp_rast.c +++ b/src/gallium/drivers/llvmpipe/lp_rast.c @@ -486,6 +486,7 @@ lp_rast_begin_query(struct lp_rasterizer_task *task, switch (pq->type) { case PIPE_QUERY_OCCLUSION_COUNTER: case PIPE_QUERY_OCCLUSION_PREDICATE: + case PIPE_QUERY_OCCLUSION_PREDICATE_CONSERVATIVE: pq->start[task->thread_index] = task->thread_data.vis_counter; break; case PIPE_QUERY_PIPELINE_STATISTICS: @@ -512,6 +513,7 @@ lp_rast_end_query(struct lp_rasterizer_task *task, switch (pq->type) { case PIPE_QUERY_OCCLUSION_COUNTER: case PIPE_QUERY_OCCLUSION_PREDICATE: + case PIPE_QUERY_OCCLUSION_PREDICATE_CONSERVATIVE: pq->end[task->thread_index] += task->thread_data.vis_counter - pq->start[task->thread_index]; pq->start[task->thread_index] = 0; -- cgit v1.2.3