diff options
Diffstat (limited to 'mesalib/src/glsl/ir_reader.cpp')
-rw-r--r-- | mesalib/src/glsl/ir_reader.cpp | 28 |
1 files changed, 24 insertions, 4 deletions
diff --git a/mesalib/src/glsl/ir_reader.cpp b/mesalib/src/glsl/ir_reader.cpp index 28923f3b8..a178c82b5 100644 --- a/mesalib/src/glsl/ir_reader.cpp +++ b/mesalib/src/glsl/ir_reader.cpp @@ -437,6 +437,12 @@ ir_reader::read_declaration(s_expression *expr) var->data.mode = ir_var_function_inout; } else if (strcmp(qualifier->value(), "temporary") == 0) { var->data.mode = ir_var_temporary; + } else if (strcmp(qualifier->value(), "stream1") == 0) { + var->data.stream = 1; + } else if (strcmp(qualifier->value(), "stream2") == 0) { + var->data.stream = 2; + } else if (strcmp(qualifier->value(), "stream3") == 0) { + var->data.stream = 3; } else if (strcmp(qualifier->value(), "smooth") == 0) { var->data.interpolation = INTERP_QUALIFIER_SMOOTH; } else if (strcmp(qualifier->value(), "flat") == 0) { @@ -1109,10 +1115,17 @@ ir_reader::read_texture(s_expression *expr) ir_emit_vertex * ir_reader::read_emit_vertex(s_expression *expr) { - s_pattern pat[] = { "emit-vertex" }; + s_expression *s_stream = NULL; + + s_pattern pat[] = { "emit-vertex", s_stream }; if (MATCH(expr, pat)) { - return new(mem_ctx) ir_emit_vertex(); + ir_rvalue *stream = read_dereference(s_stream); + if (stream == NULL) { + ir_read_error(NULL, "when reading stream info in emit-vertex"); + return NULL; + } + return new(mem_ctx) ir_emit_vertex(stream); } ir_read_error(NULL, "when reading emit-vertex"); return NULL; @@ -1121,10 +1134,17 @@ ir_reader::read_emit_vertex(s_expression *expr) ir_end_primitive * ir_reader::read_end_primitive(s_expression *expr) { - s_pattern pat[] = { "end-primitive" }; + s_expression *s_stream = NULL; + + s_pattern pat[] = { "end-primitive", s_stream }; if (MATCH(expr, pat)) { - return new(mem_ctx) ir_end_primitive(); + ir_rvalue *stream = read_dereference(s_stream); + if (stream == NULL) { + ir_read_error(NULL, "when reading stream info in end-primitive"); + return NULL; + } + return new(mem_ctx) ir_end_primitive(stream); } ir_read_error(NULL, "when reading end-primitive"); return NULL; |