[Mesa-dev] [PATCH 5/5] st/mesa: handle layer and primitive id output and point size input

Dave Airlie airlied at gmail.com
Tue Oct 15 10:38:41 CEST 2013


This fixes a number of piglit crashes when running on a hacked up llvmpipe.

Signed-off-by: Dave Airlie <airlied at redhat.com>
---
 src/mesa/state_tracker/st_program.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/src/mesa/state_tracker/st_program.c b/src/mesa/state_tracker/st_program.c
index 5efd614..f010e18 100644
--- a/src/mesa/state_tracker/st_program.c
+++ b/src/mesa/state_tracker/st_program.c
@@ -923,6 +923,10 @@ st_translate_geometry_program(struct st_context *st,
             stgp->input_semantic_name[slot] = TGSI_SEMANTIC_CLIPDIST;
             stgp->input_semantic_index[slot] = 1;
             break;
+         case VARYING_SLOT_PSIZ:
+            stgp->input_semantic_name[slot] = TGSI_SEMANTIC_PSIZE;
+            stgp->input_semantic_index[slot] = 0;
+            break;
          case VARYING_SLOT_TEX0:
          case VARYING_SLOT_TEX1:
          case VARYING_SLOT_TEX2:
@@ -1007,6 +1011,14 @@ st_translate_geometry_program(struct st_context *st,
             gs_output_semantic_name[slot] = TGSI_SEMANTIC_CLIPDIST;
             gs_output_semantic_index[slot] = 1;
             break;
+         case VARYING_SLOT_LAYER:
+            gs_output_semantic_name[slot] = TGSI_SEMANTIC_LAYER;
+            gs_output_semantic_index[slot] = 0;
+            break;
+         case VARYING_SLOT_PRIMITIVE_ID:
+            gs_output_semantic_name[slot] = TGSI_SEMANTIC_PRIMID;
+            gs_output_semantic_index[slot] = 0;
+            break;
          case VARYING_SLOT_TEX0:
          case VARYING_SLOT_TEX1:
          case VARYING_SLOT_TEX2:
-- 
1.8.3.1



More information about the mesa-dev mailing list