Mesa (master): softpipe: add support for vertex streams (v2)

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Apr 9 01:21:27 UTC 2019


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

Author: Dave Airlie <airlied at gmail.com>
Date:   Wed May 27 17:41:32 2015 +1000

softpipe: add support for vertex streams (v2)

This enables the ARB_gpu_shader5 vertex streams on softpipe.

v2: only enable when not using llvm.

Reviewed-by: Roland Scheidegger <sroland at vmware.com>
Signed-off-by: Dave Airlie <airlied at redhat.com>

---

 docs/features.txt                        | 2 +-
 src/gallium/drivers/softpipe/sp_screen.c | 6 +++++-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/docs/features.txt b/docs/features.txt
index 201e600adff..fa7a756a1ba 100644
--- a/docs/features.txt
+++ b/docs/features.txt
@@ -123,7 +123,7 @@ GL 4.0, GLSL 4.00 --- all DONE: i965/gen7+, nvc0, r600, radeonsi, virgl
   - Packing/bitfield/conversion functions               DONE (freedreno, softpipe)
   - Enhanced textureGather                              DONE (freedreno, softpipe)
   - Geometry shader instancing                          DONE (llvmpipe, softpipe)
-  - Geometry shader multiple streams                    DONE ()
+  - Geometry shader multiple streams                    DONE (softpipe)
   - Enhanced per-sample shading                         DONE ()
   - Interpolation functions                             DONE ()
   - New overload resolution rules                       DONE
diff --git a/src/gallium/drivers/softpipe/sp_screen.c b/src/gallium/drivers/softpipe/sp_screen.c
index 37ee9b82a12..e8f6733d0ed 100644
--- a/src/gallium/drivers/softpipe/sp_screen.c
+++ b/src/gallium/drivers/softpipe/sp_screen.c
@@ -65,6 +65,7 @@ softpipe_get_name(struct pipe_screen *screen)
 static int
 softpipe_get_param(struct pipe_screen *screen, enum pipe_cap param)
 {
+   struct softpipe_screen *sp_screen = softpipe_screen(screen);
    switch (param) {
    case PIPE_CAP_NPOT_TEXTURES:
    case PIPE_CAP_MIXED_FRAMEBUFFER_SIZES:
@@ -122,7 +123,10 @@ softpipe_get_param(struct pipe_screen *screen, enum pipe_cap param)
    case PIPE_CAP_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS:
       return 1024;
    case PIPE_CAP_MAX_VERTEX_STREAMS:
-      return 1;
+      if (sp_screen->use_llvm)
+         return 1;
+      else
+         return PIPE_MAX_VERTEX_STREAMS;
    case PIPE_CAP_MAX_VERTEX_ATTRIB_STRIDE:
       return 2048;
    case PIPE_CAP_PRIMITIVE_RESTART:




More information about the mesa-commit mailing list