summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/tgsi/tgsi_text.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/auxiliary/tgsi/tgsi_text.c')
-rw-r--r--src/gallium/auxiliary/tgsi/tgsi_text.c48
1 files changed, 48 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/tgsi/tgsi_text.c b/src/gallium/auxiliary/tgsi/tgsi_text.c
index be808425199..1b4f5940460 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_text.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_text.c
@@ -1546,6 +1546,54 @@ static boolean parse_declaration( struct translate_ctx *ctx )
cur = ctx->cur;
eat_opt_white( &cur );
+ if (*cur == ',' &&
+ file == TGSI_FILE_OUTPUT && ctx->processor == PIPE_SHADER_GEOMETRY) {
+ cur++;
+ eat_opt_white(&cur);
+ if (str_match_nocase_whole(&cur, "STREAM")) {
+ uint stream[4];
+
+ eat_opt_white(&cur);
+ if (*cur != '(') {
+ report_error(ctx, "Expected '('");
+ return FALSE;
+ }
+ cur++;
+
+ for (int i = 0; i < 4; ++i) {
+ eat_opt_white(&cur);
+ if (!parse_uint(&cur, &stream[i])) {
+ report_error(ctx, "Expected literal integer");
+ return FALSE;
+ }
+
+ eat_opt_white(&cur);
+ if (i < 3) {
+ if (*cur != ',') {
+ report_error(ctx, "Expected ','");
+ return FALSE;
+ }
+ cur++;
+ }
+ }
+
+ if (*cur != ')') {
+ report_error(ctx, "Expected ')'");
+ return FALSE;
+ }
+ cur++;
+
+ decl.Semantic.StreamX = stream[0];
+ decl.Semantic.StreamY = stream[1];
+ decl.Semantic.StreamZ = stream[2];
+ decl.Semantic.StreamW = stream[3];
+
+ ctx->cur = cur;
+ }
+ }
+
+ cur = ctx->cur;
+ eat_opt_white( &cur );
if (*cur == ',' && !is_vs_input) {
uint i;