[Mesa-dev] [PATCH 2/8] glsl: Make ir_rvalue_visitor visit ir_discard::condition.
Kenneth Graunke
kenneth at whitecape.org
Tue Feb 24 02:19:39 PST 2015
This was forgotten.
I omitted the NULL check since we don't check ir_assignment::condition
either.
Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
---
src/glsl/ir_rvalue_visitor.cpp | 19 +++++++++++++++++++
src/glsl/ir_rvalue_visitor.h | 3 +++
2 files changed, 22 insertions(+)
diff --git a/src/glsl/ir_rvalue_visitor.cpp b/src/glsl/ir_rvalue_visitor.cpp
index 34cdb1c..2eee3da 100644
--- a/src/glsl/ir_rvalue_visitor.cpp
+++ b/src/glsl/ir_rvalue_visitor.cpp
@@ -135,6 +135,13 @@ ir_rvalue_base_visitor::rvalue_visit(ir_call *ir)
}
ir_visitor_status
+ir_rvalue_base_visitor::rvalue_visit(ir_discard *ir)
+{
+ handle_rvalue(&ir->condition);
+ return visit_continue;
+}
+
+ir_visitor_status
ir_rvalue_base_visitor::rvalue_visit(ir_return *ir)
{
handle_rvalue(&ir->value);;
@@ -205,6 +212,12 @@ ir_rvalue_visitor::visit_leave(ir_call *ir)
}
ir_visitor_status
+ir_rvalue_visitor::visit_leave(ir_discard *ir)
+{
+ return rvalue_visit(ir);
+}
+
+ir_visitor_status
ir_rvalue_visitor::visit_leave(ir_return *ir)
{
return rvalue_visit(ir);
@@ -271,6 +284,12 @@ ir_rvalue_enter_visitor::visit_enter(ir_call *ir)
}
ir_visitor_status
+ir_rvalue_enter_visitor::visit_enter(ir_discard *ir)
+{
+ return rvalue_visit(ir);
+}
+
+ir_visitor_status
ir_rvalue_enter_visitor::visit_enter(ir_return *ir)
{
return rvalue_visit(ir);
diff --git a/src/glsl/ir_rvalue_visitor.h b/src/glsl/ir_rvalue_visitor.h
index 04ec0fa..185c72a 100644
--- a/src/glsl/ir_rvalue_visitor.h
+++ b/src/glsl/ir_rvalue_visitor.h
@@ -36,6 +36,7 @@ public:
ir_visitor_status rvalue_visit(ir_call *);
ir_visitor_status rvalue_visit(ir_dereference_array *);
ir_visitor_status rvalue_visit(ir_dereference_record *);
+ ir_visitor_status rvalue_visit(ir_discard *);
ir_visitor_status rvalue_visit(ir_expression *);
ir_visitor_status rvalue_visit(ir_if *);
ir_visitor_status rvalue_visit(ir_return *);
@@ -54,6 +55,7 @@ public:
virtual ir_visitor_status visit_leave(ir_call *);
virtual ir_visitor_status visit_leave(ir_dereference_array *);
virtual ir_visitor_status visit_leave(ir_dereference_record *);
+ virtual ir_visitor_status visit_leave(ir_discard *);
virtual ir_visitor_status visit_leave(ir_expression *);
virtual ir_visitor_status visit_leave(ir_if *);
virtual ir_visitor_status visit_leave(ir_return *);
@@ -70,6 +72,7 @@ public:
virtual ir_visitor_status visit_enter(ir_call *);
virtual ir_visitor_status visit_enter(ir_dereference_array *);
virtual ir_visitor_status visit_enter(ir_dereference_record *);
+ virtual ir_visitor_status visit_enter(ir_discard *);
virtual ir_visitor_status visit_enter(ir_expression *);
virtual ir_visitor_status visit_enter(ir_if *);
virtual ir_visitor_status visit_enter(ir_return *);
--
2.2.2
More information about the mesa-dev
mailing list