add ARB_transform_feedback_overflow_query support

handles the new query conversions

Reviewed-by: Elie Tournier <elie.tournier@collabora.com>
macos/master
Dave Airlie 7 years ago
parent be265410c3
commit efc093d0ec
  1. 3
      src/gallium/include/pipe/p_defines.h
  2. 1
      src/virgl_hw.h
  3. 10
      src/vrend_renderer.c

@ -447,7 +447,8 @@ enum pipe_flush_flags {
#define PIPE_QUERY_GPU_FINISHED 9 #define PIPE_QUERY_GPU_FINISHED 9
#define PIPE_QUERY_PIPELINE_STATISTICS 10 #define PIPE_QUERY_PIPELINE_STATISTICS 10
#define PIPE_QUERY_OCCLUSION_PREDICATE_CONSERVATIVE 11 #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, /* start of driver queries,
* see pipe_screen::get_driver_query_info */ * see pipe_screen::get_driver_query_info */

@ -241,6 +241,7 @@ struct virgl_caps_bool_set1 {
unsigned conditional_render_inverted:1; unsigned conditional_render_inverted:1;
unsigned derivative_control:1; unsigned derivative_control:1;
unsigned polygon_offset_clamp:1; unsigned polygon_offset_clamp:1;
unsigned transform_feedback_overflow_query:1;
}; };
/* endless expansion capabilites - current gallium has 252 formats */ /* endless expansion capabilites - current gallium has 252 formats */

@ -6425,6 +6425,13 @@ int vrend_create_query(struct vrend_context *ctx, uint32_t handle,
case PIPE_QUERY_OCCLUSION_PREDICATE_CONSERVATIVE: case PIPE_QUERY_OCCLUSION_PREDICATE_CONSERVATIVE:
q->gltype = GL_ANY_SAMPLES_PASSED_CONSERVATIVE; q->gltype = GL_ANY_SAMPLES_PASSED_CONSERVATIVE;
break; 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: default:
fprintf(stderr,"unknown query object received %d\n", q->type); fprintf(stderr,"unknown query object received %d\n", q->type);
break; break;
@ -6975,9 +6982,12 @@ void vrend_renderer_fill_caps(uint32_t set, uint32_t version,
if (gl_ver >= 46) { if (gl_ver >= 46) {
caps->v1.bset.polygon_offset_clamp = 1; caps->v1.bset.polygon_offset_clamp = 1;
caps->v1.bset.transform_feedback_overflow_query = 1;
} else { } else {
if (epoxy_has_gl_extension("GL_ARB_polygon_offset_clamp")) if (epoxy_has_gl_extension("GL_ARB_polygon_offset_clamp"))
caps->v1.bset.polygon_offset_clamp = 1; 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") || if (epoxy_has_gl_extension("GL_EXT_texture_mirror_clamp") ||

Loading…
Cancel
Save