summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Whitwell <keithw@vmware.com>2010-06-04 16:38:28 +0100
committerKeith Whitwell <keithw@vmware.com>2010-06-07 16:34:55 +0100
commit69faf5b48fde9d89b554c75fba7b431ddcd591da (patch)
tree117d894feab32b5849b9a66e8179a26e19c3cc84
parent81cb6ac042826fe19ce85d60aa2b4087c3d7bdd2 (diff)
tgsi: reject interpolation and semantics on vs inputs
-rw-r--r--src/gallium/auxiliary/tgsi/tgsi_text.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/gallium/auxiliary/tgsi/tgsi_text.c b/src/gallium/auxiliary/tgsi/tgsi_text.c
index 71a0d96331..00e6392f63 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_text.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_text.c
@@ -993,6 +993,7 @@ static boolean parse_declaration( struct translate_ctx *ctx )
uint writemask;
const char *cur;
uint advance;
+ boolean is_vs_input;
assert(Elements(semantic_names) == TGSI_SEMANTIC_COUNT);
assert(Elements(interpolate_names) == TGSI_INTERPOLATE_COUNT);
@@ -1021,9 +1022,12 @@ static boolean parse_declaration( struct translate_ctx *ctx )
decl.Dim.Index2D = brackets[0].first;
}
+ is_vs_input = (file == TGSI_FILE_INPUT &&
+ ctx->processor == TGSI_PROCESSOR_VERTEX);
+
cur = ctx->cur;
eat_opt_white( &cur );
- if (*cur == ',') {
+ if (*cur == ',' && !is_vs_input) {
uint i;
cur++;
@@ -1066,7 +1070,7 @@ static boolean parse_declaration( struct translate_ctx *ctx )
cur = ctx->cur;
eat_opt_white( &cur );
- if (*cur == ',') {
+ if (*cur == ',' && !is_vs_input) {
uint i;
cur++;