--- src/glsl/ir_print_visitor.cpp | 8 ++++---- src/glsl/ir_reader.cpp | 18 ++++++++++++++---- 2 files changed, 18 insertions(+), 8 deletions(-)
diff --git a/src/glsl/ir_print_visitor.cpp b/src/glsl/ir_print_visitor.cpp index c4a6f9c..23960e0 100644 --- a/src/glsl/ir_print_visitor.cpp +++ b/src/glsl/ir_print_visitor.cpp @@ -560,13 +560,13 @@ ir_print_visitor::visit(ir_loop_jump *ir) } void -ir_print_visitor::visit(ir_emit_vertex *) +ir_print_visitor::visit(ir_emit_vertex *e) { - fprintf(f, "(emit-vertex)"); + fprintf(f, "(emit-vertex %d)", e->stream); } void -ir_print_visitor::visit(ir_end_primitive *) +ir_print_visitor::visit(ir_end_primitive *e) { - fprintf(f, "(end-primitive)"); + fprintf(f, "(end-primitive %d)", e->stream); } diff --git a/src/glsl/ir_reader.cpp b/src/glsl/ir_reader.cpp index 28923f3..e1982f2 100644 --- a/src/glsl/ir_reader.cpp +++ b/src/glsl/ir_reader.cpp @@ -1109,10 +1109,15 @@ ir_reader::read_texture(s_expression *expr) ir_emit_vertex * ir_reader::read_emit_vertex(s_expression *expr) { - s_pattern pat[] = { "emit-vertex" }; + s_int *s_stream = NULL; + + s_pattern pat[] = { "emit-vertex", s_stream }; + s_pattern pat_no_stream[] = { "emit-vertex" }; if (MATCH(expr, pat)) { - return new(mem_ctx) ir_emit_vertex(); + return new(mem_ctx) ir_emit_vertex(s_stream->value()); + } else if (MATCH(expr, pat_no_stream)) { + return new(mem_ctx) ir_emit_vertex(0); } ir_read_error(NULL, "when reading emit-vertex"); return NULL; @@ -1121,10 +1126,15 @@ 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_int *s_stream = NULL; + + s_pattern pat[] = { "end-primitive", s_stream }; + s_pattern pat_no_stream[] = { "end-primitive" }; if (MATCH(expr, pat)) { - return new(mem_ctx) ir_end_primitive(); + return new(mem_ctx) ir_end_primitive(s_stream->value()); + } else if (MATCH(expr, pat_no_stream)) { + return new(mem_ctx) ir_end_primitive(0); } ir_read_error(NULL, "when reading end-primitive"); return NULL; -- 1.9.1 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev