[virglrenderer-devel] [PATCH 5/6] add ARB_transform_feedback_overflow_query support
Dave Airlie
airlied at gmail.com
Mon May 21 06:09:36 UTC 2018
From: Dave Airlie <airlied at redhat.com>
handles the new query conversions
---
src/gallium/include/pipe/p_defines.h | 3 ++-
src/virgl_hw.h | 1 +
src/vrend_renderer.c | 10 ++++++++++
3 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/src/gallium/include/pipe/p_defines.h b/src/gallium/include/pipe/p_defines.h
index 71f6649..6bcb338 100644
--- a/src/gallium/include/pipe/p_defines.h
+++ b/src/gallium/include/pipe/p_defines.h
@@ -447,7 +447,8 @@ enum pipe_flush_flags {
#define PIPE_QUERY_GPU_FINISHED 9
#define PIPE_QUERY_PIPELINE_STATISTICS 10
#define PIPE_QUERY_OCCLUSION_PREDICATE_CONSERVATIVE 11
-#define PIPE_QUERY_TYPES 12
+#define PIPE_QUERY_SO_OVERFLOW_ANY_PREDICATE 12
+#define PIPE_QUERY_TYPES 13
/* start of driver queries,
* see pipe_screen::get_driver_query_info */
diff --git a/src/virgl_hw.h b/src/virgl_hw.h
index 102a43a..57cdd4c 100644
--- a/src/virgl_hw.h
+++ b/src/virgl_hw.h
@@ -241,6 +241,7 @@ struct virgl_caps_bool_set1 {
unsigned conditional_render_inverted:1;
unsigned derivative_control:1;
unsigned polygon_offset_clamp:1;
+ unsigned transform_feedback_overflow_query:1;
};
/* endless expansion capabilites - current gallium has 252 formats */
diff --git a/src/vrend_renderer.c b/src/vrend_renderer.c
index 07a20af..14e7aa3 100644
--- a/src/vrend_renderer.c
+++ b/src/vrend_renderer.c
@@ -6428,6 +6428,13 @@ int vrend_create_query(struct vrend_context *ctx, uint32_t handle,
case PIPE_QUERY_OCCLUSION_PREDICATE_CONSERVATIVE:
q->gltype = GL_ANY_SAMPLES_PASSED_CONSERVATIVE;
break;
+ case PIPE_QUERY_SO_OVERFLOW_PREDICATE:
+ q->gltype = GL_TRANSFORM_FEEDBACK_STREAM_OVERFLOW_ARB;
+ break;
+ case PIPE_QUERY_SO_OVERFLOW_ANY_PREDICATE:
+ q->gltype = GL_TRANSFORM_FEEDBACK_OVERFLOW_ARB;
+ break;
+ break;
default:
fprintf(stderr,"unknown query object received %d\n", q->type);
break;
@@ -6978,9 +6985,12 @@ void vrend_renderer_fill_caps(uint32_t set, uint32_t version,
if (gl_ver >= 46) {
caps->v1.bset.polygon_offset_clamp = 1;
+ caps->v1.bset.transform_feedback_overflow_query = 1;
} else {
if (epoxy_has_gl_extension("GL_ARB_polygon_offset_clamp"))
caps->v1.bset.polygon_offset_clamp = 1;
+ if (epoxy_has_gl_extension("GL_ARB_transform_feedback_overflow_query"))
+ caps->v1.bset.transform_feedback_overflow_query = 1;
}
if (epoxy_has_gl_extension("GL_EXT_texture_mirror_clamp") ||
--
2.14.3
More information about the virglrenderer-devel
mailing list