summaryrefslogtreecommitdiffstats
path: root/src/glsl/ir_hierarchical_visitor.cpp
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2010-06-30 10:47:34 -0700
committerIan Romanick <[email protected]>2010-06-30 14:54:58 -0700
commit16efab1c4dee6e6a827ba5f1c482378159545ae5 (patch)
tree1d911d146ca7811c7e7b36950f454dc96a4db99e /src/glsl/ir_hierarchical_visitor.cpp
parent88c20c46b8f708e89adef28f341c51ea7883b6a0 (diff)
glsl2: Define new ir_discard instruction.
Diffstat (limited to 'src/glsl/ir_hierarchical_visitor.cpp')
-rw-r--r--src/glsl/ir_hierarchical_visitor.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/glsl/ir_hierarchical_visitor.cpp b/src/glsl/ir_hierarchical_visitor.cpp
index 0d520b127f2..9afb12a4a2b 100644
--- a/src/glsl/ir_hierarchical_visitor.cpp
+++ b/src/glsl/ir_hierarchical_visitor.cpp
@@ -243,6 +243,22 @@ ir_hierarchical_visitor::visit_leave(ir_return *ir)
}
ir_visitor_status
+ir_hierarchical_visitor::visit_enter(ir_discard *ir)
+{
+ if (this->callback != NULL)
+ this->callback(ir, this->data);
+
+ return visit_continue;
+}
+
+ir_visitor_status
+ir_hierarchical_visitor::visit_leave(ir_discard *ir)
+{
+ (void) ir;
+ return visit_continue;
+}
+
+ir_visitor_status
ir_hierarchical_visitor::visit_enter(ir_if *ir)
{
if (this->callback != NULL)