summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/tgsi
diff options
context:
space:
mode:
authorChristoph Bumiller <[email protected]>2011-11-14 18:12:46 +0100
committerChristoph Bumiller <[email protected]>2011-11-14 18:12:46 +0100
commite7ccd703a28e14431b90f29540cec0bf67be1e0f (patch)
tree14a48c035778fa8f2aa1015a32e88f1f7cd38ac4 /src/gallium/auxiliary/tgsi
parenta2bcaba1cdc4c06868d95c613a28584743471361 (diff)
gallium: add TGSI_SEMANTIC_VERTEXID
Diffstat (limited to 'src/gallium/auxiliary/tgsi')
-rw-r--r--src/gallium/auxiliary/tgsi/tgsi_dump.c1
-rw-r--r--src/gallium/auxiliary/tgsi/tgsi_scan.c3
-rw-r--r--src/gallium/auxiliary/tgsi/tgsi_scan.h1
-rw-r--r--src/gallium/auxiliary/tgsi/tgsi_text.c1
4 files changed, 6 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/tgsi/tgsi_dump.c b/src/gallium/auxiliary/tgsi/tgsi_dump.c
index 64927ed6e02..91bc1245223 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_dump.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_dump.c
@@ -128,6 +128,7 @@ static const char *semantic_names[] =
"EDGEFLAG",
"PRIM_ID",
"INSTANCEID",
+ "VERTEXID",
"STENCIL"
};
diff --git a/src/gallium/auxiliary/tgsi/tgsi_scan.c b/src/gallium/auxiliary/tgsi/tgsi_scan.c
index 60de80d0918..97d74e4a9f9 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_scan.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_scan.c
@@ -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;
diff --git a/src/gallium/auxiliary/tgsi/tgsi_scan.h b/src/gallium/auxiliary/tgsi/tgsi_scan.h
index 30834b4d000..482c106ae79 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_scan.h
+++ b/src/gallium/auxiliary/tgsi/tgsi_scan.h
@@ -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;
diff --git a/src/gallium/auxiliary/tgsi/tgsi_text.c b/src/gallium/auxiliary/tgsi/tgsi_text.c
index 6b97803711f..eb9190ccb57 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_text.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_text.c
@@ -1023,6 +1023,7 @@ static const char *semantic_names[TGSI_SEMANTIC_COUNT] =
"EDGEFLAG",
"PRIM_ID",
"INSTANCEID",
+ "VERTEXID",
"STENCIL"
};