From 8639effefeb8c06beedbfcc294694b6bb72db882 Mon Sep 17 00:00:00 2001 From: Iago Toral Quiroga Date: Fri, 20 Jun 2014 10:26:29 +0200 Subject: glsl: Modify ir_emit_vertex to have a stream. This will be necessary to implement EmitStreamVertex(). EmitVertex() will produce an ir_emit_vertex with the default stream 0. Reviewed-by: Chris Forbes --- src/glsl/ir_rvalue_visitor.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'src/glsl/ir_rvalue_visitor.cpp') diff --git a/src/glsl/ir_rvalue_visitor.cpp b/src/glsl/ir_rvalue_visitor.cpp index fcbe9448d9c..eb6691ea1d9 100644 --- a/src/glsl/ir_rvalue_visitor.cpp +++ b/src/glsl/ir_rvalue_visitor.cpp @@ -149,6 +149,12 @@ ir_rvalue_base_visitor::rvalue_visit(ir_if *ir) return visit_continue; } +ir_visitor_status +ir_rvalue_base_visitor::rvalue_visit(ir_emit_vertex *ir) +{ + handle_rvalue(&ir->stream); + return visit_continue; +} ir_visitor_status ir_rvalue_visitor::visit_leave(ir_expression *ir) @@ -204,6 +210,12 @@ ir_rvalue_visitor::visit_leave(ir_if *ir) return rvalue_visit(ir); } +ir_visitor_status +ir_rvalue_visitor::visit_leave(ir_emit_vertex *ir) +{ + return rvalue_visit(ir); +} + ir_visitor_status ir_rvalue_enter_visitor::visit_enter(ir_expression *ir) { @@ -257,3 +269,9 @@ ir_rvalue_enter_visitor::visit_enter(ir_if *ir) { return rvalue_visit(ir); } + +ir_visitor_status +ir_rvalue_enter_visitor::visit_enter(ir_emit_vertex *ir) +{ + return rvalue_visit(ir); +} -- cgit v1.2.3