Mesa (master): virgl: enable vertex streams when glsl level is high enough.

Dave Airlie airlied at kemper.freedesktop.org
Tue May 15 04:57:12 UTC 2018


Module: Mesa
Branch: master
Commit: 9585e702065d9c2db57ab32f53a42d1ceafdb4a3
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=9585e702065d9c2db57ab32f53a42d1ceafdb4a3

Author: Dave Airlie <airlied at redhat.com>
Date:   Mon Dec 21 16:59:58 2015 +1000

virgl: enable vertex streams when glsl level is high enough.

This enabled the vertex streams out when the host supports
GL4.0.

---

 src/gallium/drivers/virgl/virgl_encode.c | 2 +-
 src/gallium/drivers/virgl/virgl_screen.c | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/gallium/drivers/virgl/virgl_encode.c b/src/gallium/drivers/virgl/virgl_encode.c
index a6f6d13f85..f3cbd1ca4b 100644
--- a/src/gallium/drivers/virgl/virgl_encode.c
+++ b/src/gallium/drivers/virgl/virgl_encode.c
@@ -232,7 +232,7 @@ static void virgl_emit_shader_streamout(struct virgl_context *ctx,
            VIRGL_OBJ_SHADER_SO_OUTPUT_BUFFER(so_info->output[i].output_buffer) |
            VIRGL_OBJ_SHADER_SO_OUTPUT_DST_OFFSET(so_info->output[i].dst_offset);
          virgl_encoder_write_dword(ctx->cbuf, tmp);
-         virgl_encoder_write_dword(ctx->cbuf, 0);
+         virgl_encoder_write_dword(ctx->cbuf, so_info->output[i].stream);
       }
    }
 }
diff --git a/src/gallium/drivers/virgl/virgl_screen.c b/src/gallium/drivers/virgl/virgl_screen.c
index ab35b1fe2c..1ca9e85de7 100644
--- a/src/gallium/drivers/virgl/virgl_screen.c
+++ b/src/gallium/drivers/virgl/virgl_screen.c
@@ -198,12 +198,13 @@ virgl_get_param(struct pipe_screen *screen, enum pipe_cap param)
       return vscreen->caps.caps.v1.bset.has_sample_shading;
    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;
    case PIPE_CAP_TEXTURE_GATHER_SM5:
    case PIPE_CAP_BUFFER_MAP_PERSISTENT_COHERENT:
    case PIPE_CAP_FAKE_SW_MSAA:
    case PIPE_CAP_TEXTURE_GATHER_OFFSETS:
    case PIPE_CAP_TGSI_VS_WINDOW_SPACE_POSITION:
-   case PIPE_CAP_MAX_VERTEX_STREAMS:
    case PIPE_CAP_MULTI_DRAW_INDIRECT:
    case PIPE_CAP_MULTI_DRAW_INDIRECT_PARAMS:
    case PIPE_CAP_TGSI_FS_FINE_DERIVATIVE:




More information about the mesa-commit mailing list