gallium: add TGSI_SEMANTIC_VERTEXID
authorChristoph Bumiller <e0425955@student.tuwien.ac.at>
Mon, 14 Nov 2011 17:12:46 +0000 (18:12 +0100)
committerChristoph Bumiller <e0425955@student.tuwien.ac.at>
Mon, 14 Nov 2011 17:12:46 +0000 (18:12 +0100)
src/gallium/auxiliary/tgsi/tgsi_dump.c
src/gallium/auxiliary/tgsi/tgsi_scan.c
src/gallium/auxiliary/tgsi/tgsi_scan.h
src/gallium/auxiliary/tgsi/tgsi_text.c
src/gallium/include/pipe/p_shader_tokens.h

index 64927ed6e028e08bb5ceb5877661d67b96abdb6e..91bc1245223f1db465a5d3e4846b2afce0ed6dca 100644 (file)
@@ -128,6 +128,7 @@ static const char *semantic_names[] =
    "EDGEFLAG",
    "PRIM_ID",
    "INSTANCEID",
+   "VERTEXID",
    "STENCIL"
 };
 
index 60de80d0918ee8965ef66548cef5d82b4876ff0b..97d74e4a9f917440f234eb943b285a8dfeee580c 100644 (file)
@@ -182,6 +182,9 @@ tgsi_scan_shader(const struct tgsi_token *tokens,
                   if (fulldecl->Semantic.Name == TGSI_SEMANTIC_INSTANCEID) {
                      info->uses_instanceid = TRUE;
                   }
+                  else if (fulldecl->Semantic.Name == TGSI_SEMANTIC_VERTEXID) {
+                     info->uses_vertexid = TRUE;
+                  }
                }
                else if (file == TGSI_FILE_OUTPUT) {
                   info->output_semantic_name[reg] = (ubyte)fulldecl->Semantic.Name;
index 30834b4d0003ccef7df6925a0ba1f606bfb5927a..482c106ae7942da9451489755a9b9fd10cc7dea6 100644 (file)
@@ -70,6 +70,7 @@ struct tgsi_shader_info
    boolean writes_edgeflag; /**< vertex shader outputs edgeflag */
    boolean uses_kill;  /**< KIL or KILP instruction used? */
    boolean uses_instanceid;
+   boolean uses_vertexid;
    boolean origin_lower_left;
    boolean pixel_center_integer;
    boolean color0_writes_all_cbufs;
index 6b97803711f2aec3e5e928e572f6d2170f9aed0c..eb9190ccb578bcfe15a68b50ddaf37c9b090a548 100644 (file)
@@ -1023,6 +1023,7 @@ static const char *semantic_names[TGSI_SEMANTIC_COUNT] =
    "EDGEFLAG",
    "PRIM_ID",
    "INSTANCEID",
+   "VERTEXID",
    "STENCIL"
 };
 
index 7236c9220df6d2da38d4d2f749ce790a5e06cc03..b04e26d308e3cd844c75a9a842566c8122e83b29 100644 (file)
@@ -144,8 +144,9 @@ struct tgsi_declaration_dimension
 #define TGSI_SEMANTIC_EDGEFLAG   8
 #define TGSI_SEMANTIC_PRIMID     9
 #define TGSI_SEMANTIC_INSTANCEID 10
-#define TGSI_SEMANTIC_STENCIL    11
-#define TGSI_SEMANTIC_COUNT      12 /**< number of semantic values */
+#define TGSI_SEMANTIC_VERTEXID   11
+#define TGSI_SEMANTIC_STENCIL    12
+#define TGSI_SEMANTIC_COUNT      13 /**< number of semantic values */
 
 struct tgsi_declaration_semantic
 {