[Mesa-dev] [PATCH 1/4] gallium/tgsi: add prim id to tgsi_get_gl_varying_semantic()

Timothy Arceri tarceri at itsqueeze.com
Mon Nov 13 01:56:28 UTC 2017


---
 src/gallium/auxiliary/tgsi/tgsi_from_mesa.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/gallium/auxiliary/tgsi/tgsi_from_mesa.c b/src/gallium/auxiliary/tgsi/tgsi_from_mesa.c
index b7a21f29ba..31be7d946b 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_from_mesa.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_from_mesa.c
@@ -55,20 +55,24 @@ tgsi_get_generic_gl_varying_index(gl_varying_slot attr,
 /**
  * Determine the semantic name and index used for the given varying.
  */
 void
 tgsi_get_gl_varying_semantic(gl_varying_slot attr,
                              bool needs_texcoord_semantic,
                              unsigned *semantic_name,
                              unsigned *semantic_index)
 {
    switch (attr) {
+   case VARYING_SLOT_PRIMITIVE_ID:
+      *semantic_name = TGSI_SEMANTIC_PRIMID;
+      *semantic_index = 0;
+      break;
    case VARYING_SLOT_POS:
       *semantic_name = TGSI_SEMANTIC_POSITION;
       *semantic_index = 0;
       break;
    case VARYING_SLOT_COL0:
       *semantic_name = TGSI_SEMANTIC_COLOR;
       *semantic_index = 0;
       break;
    case VARYING_SLOT_COL1:
       *semantic_name = TGSI_SEMANTIC_COLOR;
-- 
2.14.3



More information about the mesa-dev mailing list