gallium/tgsi: add prim id to tgsi_get_gl_varying_semantic()
authorTimothy Arceri <tarceri@itsqueeze.com>
Mon, 13 Nov 2017 01:12:21 +0000 (12:12 +1100)
committerTimothy Arceri <tarceri@itsqueeze.com>
Tue, 14 Nov 2017 21:26:34 +0000 (08:26 +1100)
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
src/gallium/auxiliary/tgsi/tgsi_from_mesa.c

index b7a21f29bad1943552ad8066a236be8521db8831..31be7d946b7125adb7c3f529f517caeb6a2aac09 100644 (file)
@@ -62,6 +62,10 @@ tgsi_get_gl_varying_semantic(gl_varying_slot attr,
                              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;