From 704c619785e5e2cbd92e26c97e9e6726de0addba Mon Sep 17 00:00:00 2001 From: Gert Wollny Date: Wed, 9 May 2018 16:37:35 +0200 Subject: [PATCH] Add support for GL_ANY_SAMPLES_PASSED_CONSERVATIVE query method This is needed for fixing CTS: dEQP-GLES3.functional.occlusion_query.conservative* Reviewed-by: Dave Airlie Signed-off-by: Gert Wollny --- src/gallium/include/pipe/p_defines.h | 3 ++- src/vrend_renderer.c | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/gallium/include/pipe/p_defines.h b/src/gallium/include/pipe/p_defines.h index ed5eef1..71f6649 100644 --- a/src/gallium/include/pipe/p_defines.h +++ b/src/gallium/include/pipe/p_defines.h @@ -446,7 +446,8 @@ enum pipe_flush_flags { #define PIPE_QUERY_SO_OVERFLOW_PREDICATE 8 #define PIPE_QUERY_GPU_FINISHED 9 #define PIPE_QUERY_PIPELINE_STATISTICS 10 -#define PIPE_QUERY_TYPES 11 +#define PIPE_QUERY_OCCLUSION_PREDICATE_CONSERVATIVE 11 +#define PIPE_QUERY_TYPES 12 /* start of driver queries, * see pipe_screen::get_driver_query_info */ diff --git a/src/vrend_renderer.c b/src/vrend_renderer.c index 26bf639..7b3345c 100644 --- a/src/vrend_renderer.c +++ b/src/vrend_renderer.c @@ -6343,6 +6343,9 @@ int vrend_create_query(struct vrend_context *ctx, uint32_t handle, case PIPE_QUERY_PRIMITIVES_EMITTED: q->gltype = GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN; break; + case PIPE_QUERY_OCCLUSION_PREDICATE_CONSERVATIVE: + q->gltype = GL_ANY_SAMPLES_PASSED_CONSERVATIVE; + break; default: fprintf(stderr,"unknown query object received %d\n", q->type); break;