vrend,feature: Add a caps flag for transform feedback 3

The piglits and KHR tests that use TF3 (i.e. multiple output
streams) tend to hang, and since the GLES host doesn't support
this but we lie about the GLSL version it is better to signal
the guest correctly that this is not supported.

v2: Set flag only on caps v2 code path, otherwise we might read
    from uninitialized memory
v3: Increment feature check version to indicate that the TF3
    feature flag is valid.

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
macos/master
Gert Wollny 6 years ago
parent 584039fdf2
commit f5c3aa7c44
  1. 1
      src/virgl_hw.h
  2. 4
      src/vrend_renderer.c

@ -244,6 +244,7 @@ enum virgl_formats {
#define VIRGL_CAP_BIND_COMMAND_ARGS (1 << 20)
#define VIRGL_CAP_MULTI_DRAW_INDIRECT (1 << 21)
#define VIRGL_CAP_INDIRECT_PARAMS (1 << 22)
#define VIRGL_CAP_TRANSFORM_FEEDBACK3 (1 << 23)
/* virgl bind flags - these are compatible with mesa 10.5 gallium.
* but are fixed, no other should be passed to virgl either.

@ -8558,7 +8558,7 @@ static void vrend_renderer_fill_caps_v2(int gl_ver, int gles_ver, union virgl_c
* the guest that was set unconditionally before. Then check that flag and
* this value to avoid regressions when a guest with a new mesa version is
* run on an old virgl host */
caps->v2.host_feature_check_version = 1;
caps->v2.host_feature_check_version = 2;
glGetFloatv(GL_ALIASED_POINT_SIZE_RANGE, range);
caps->v2.min_aliased_point_size = range[0];
@ -8740,6 +8740,8 @@ static void vrend_renderer_fill_caps_v2(int gl_ver, int gles_ver, union virgl_c
if (has_feature(feat_srgb_write_control))
caps->v2.capability_bits |= VIRGL_CAP_SRGB_WRITE_CONTROL;
if (has_feature(feat_transform_feedback3))
caps->v2.capability_bits |= VIRGL_CAP_TRANSFORM_FEEDBACK3;
/* Enable feature use just now otherwise we just get a lot noise because
* of the caps setting */
if (vrend_debug(NULL, dbg_features))

Loading…
Cancel
Save