aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/virgl/virgl_screen.c
diff options
context:
space:
mode:
authorGert Wollny <[email protected]>2019-03-13 18:50:52 +0100
committerGert Wollny <[email protected]>2019-04-02 11:28:09 +0000
commit1e5381f93458dbc4fd6011ff8ad89f71d575332e (patch)
tree98f6b5de3ab32e473fd73add1ada04a55f382342 /src/gallium/drivers/virgl/virgl_screen.c
parent33d9b9436c3c9026229f7cb33ad6f5f1c65e6900 (diff)
virgl: define MAX_VERTEX_STREAMS based on availability of TF3
Since with gles hosts we lie about the GLSL feature level it is better to set the number of streams based on actual hosts capabilities. v2: Make use of feature check level to avoid regressions. Signed-off-by: Gert Wollny <[email protected]> Reviewed-By: Reviewed-by: Gurchetan Singh <[email protected]>
Diffstat (limited to 'src/gallium/drivers/virgl/virgl_screen.c')
-rw-r--r--src/gallium/drivers/virgl/virgl_screen.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gallium/drivers/virgl/virgl_screen.c b/src/gallium/drivers/virgl/virgl_screen.c
index 651b73b0eb0..5dd7f559948 100644
--- a/src/gallium/drivers/virgl/virgl_screen.c
+++ b/src/gallium/drivers/virgl/virgl_screen.c
@@ -217,7 +217,8 @@ virgl_get_param(struct pipe_screen *screen, enum pipe_cap param)
case PIPE_CAP_CULL_DISTANCE:
return vscreen->caps.caps.v1.bset.has_cull;
case PIPE_CAP_MAX_VERTEX_STREAMS:
- return vscreen->caps.caps.v1.glsl_level >= 400 ? 4 : 1;
+ return ((vscreen->caps.caps.v2.capability_bits & VIRGL_CAP_TRANSFORM_FEEDBACK3) ||
+ (vscreen->caps.caps.v2.host_feature_check_version < 2)) ? 4 : 1;
case PIPE_CAP_CONDITIONAL_RENDER_INVERTED:
return vscreen->caps.caps.v1.bset.conditional_render_inverted;
case PIPE_CAP_TGSI_FS_FINE_DERIVATIVE: