tgsi: store writes_primid when scanning tgsi
authorTim Rowley <timothy.o.rowley@intel.com>
Thu, 1 Dec 2016 17:06:28 +0000 (11:06 -0600)
committerTim Rowley <timothy.o.rowley@intel.com>
Thu, 1 Dec 2016 17:33:01 +0000 (11:33 -0600)
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/gallium/auxiliary/tgsi/tgsi_scan.c
src/gallium/auxiliary/tgsi/tgsi_scan.h

index 84d64568c4befa62b54255af78a6d32229d33bda..77fe6b3798200b78b65514a88169601588348511 100644 (file)
@@ -548,6 +548,9 @@ scan_declaration(struct tgsi_shader_info *info,
          info->num_outputs = MAX2(info->num_outputs, reg + 1);
 
          switch (semName) {
+         case TGSI_SEMANTIC_PRIMID:
+            info->writes_primid = true;
+            break;
          case TGSI_SEMANTIC_VIEWPORT_INDEX:
             info->writes_viewport_index = true;
             break;
index fe503e8ba366cc9729e2ba3000d5bcbcaf8be6ad..e4f4018318991a37cda89bba0544be88adc92164 100644 (file)
@@ -113,6 +113,7 @@ struct tgsi_shader_info
    boolean writes_position;
    boolean writes_psize;
    boolean writes_clipvertex;
+   boolean writes_primid;
    boolean writes_viewport_index;
    boolean writes_layer;
    boolean writes_memory; /**< contains stores or atomics to buffers or images */