summaryrefslogtreecommitdiffstats
path: root/src/glsl/ir_hv_accept.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_hv_accept.cpp
parent88c20c46b8f708e89adef28f341c51ea7883b6a0 (diff)
glsl2: Define new ir_discard instruction.
Diffstat (limited to 'src/glsl/ir_hv_accept.cpp')
-rw-r--r--src/glsl/ir_hv_accept.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/glsl/ir_hv_accept.cpp b/src/glsl/ir_hv_accept.cpp
index f936b3500eb..7b5cc5234c5 100644
--- a/src/glsl/ir_hv_accept.cpp
+++ b/src/glsl/ir_hv_accept.cpp
@@ -322,6 +322,23 @@ ir_return::accept(ir_hierarchical_visitor *v)
ir_visitor_status
+ir_discard::accept(ir_hierarchical_visitor *v)
+{
+ ir_visitor_status s = v->visit_enter(this);
+ if (s != visit_continue)
+ return (s == visit_continue_with_parent) ? visit_continue : s;
+
+ if (this->condition != NULL) {
+ s = this->condition->accept(v);
+ if (s != visit_continue)
+ return (s == visit_continue_with_parent) ? visit_continue : s;
+ }
+
+ return v->visit_leave(this);
+}
+
+
+ir_visitor_status
ir_if::accept(ir_hierarchical_visitor *v)
{
ir_visitor_status s = v->visit_enter(this);