summaryrefslogtreecommitdiffstats
path: root/src/glsl/ir_constant_folding.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_constant_folding.cpp
parent88c20c46b8f708e89adef28f341c51ea7883b6a0 (diff)
glsl2: Define new ir_discard instruction.
Diffstat (limited to 'src/glsl/ir_constant_folding.cpp')
-rw-r--r--src/glsl/ir_constant_folding.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/glsl/ir_constant_folding.cpp b/src/glsl/ir_constant_folding.cpp
index 342d027bbe8..2daa6fde38d 100644
--- a/src/glsl/ir_constant_folding.cpp
+++ b/src/glsl/ir_constant_folding.cpp
@@ -68,6 +68,7 @@ public:
virtual void visit(ir_constant *);
virtual void visit(ir_call *);
virtual void visit(ir_return *);
+ virtual void visit(ir_discard *);
virtual void visit(ir_if *);
virtual void visit(ir_loop *);
virtual void visit(ir_loop_jump *);
@@ -191,6 +192,13 @@ ir_constant_folding_visitor::visit(ir_return *ir)
void
+ir_constant_folding_visitor::visit(ir_discard *ir)
+{
+ (void) ir;
+}
+
+
+void
ir_constant_folding_visitor::visit(ir_if *ir)
{
ir_constant *const_val = ir->condition->constant_expression_value();