[virglrenderer-devel] [PATCH] Add support for GL_ANY_SAMPLES_PASSED_CONSERVATIVE query method
Gert Wollny
gert.wollny at collabora.com
Wed May 9 14:37:35 UTC 2018
This is needed for fixing CTS:
dEQP-GLES3.functional.occlusion_query.conservative*
Signed-off-by: Gert Wollny <gert.wollny at collabora.com>
---
Another patch adding this constant to mesa/virgl is required. However, with
these two patches applied tests are still likely to fail with the message
"Occlusion query failed to return a result after glFinish()"
Best,
Gert
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;
--
2.16.1
More information about the virglrenderer-devel
mailing list