summaryrefslogtreecommitdiff
path: root/src/glsl/ir.h
diff options
context:
space:
mode:
authorKenneth Graunke <kenneth@whitecape.org>2010-06-30 10:47:34 -0700
committerIan Romanick <ian.d.romanick@intel.com>2010-06-30 14:54:58 -0700
commit16efab1c4dee6e6a827ba5f1c482378159545ae5 (patch)
tree1d911d146ca7811c7e7b36950f454dc96a4db99e /src/glsl/ir.h
parent88c20c46b8f708e89adef28f341c51ea7883b6a0 (diff)
glsl2: Define new ir_discard instruction.
Diffstat (limited to 'src/glsl/ir.h')
-rw-r--r--src/glsl/ir.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/glsl/ir.h b/src/glsl/ir.h
index 65026ef1f5..00b0076c17 100644
--- a/src/glsl/ir.h
+++ b/src/glsl/ir.h
@@ -793,6 +793,33 @@ private:
/** Loop containing this break instruction. */
ir_loop *loop;
};
+
+/**
+ * IR instruction representing discard statements.
+ */
+class ir_discard : public ir_jump {
+public:
+ ir_discard()
+ {
+ this->condition = NULL;
+ }
+
+ ir_discard(ir_rvalue *cond)
+ {
+ this->condition = cond;
+ }
+
+ virtual ir_instruction *clone(struct hash_table *ht) const;
+
+ virtual void accept(ir_visitor *v)
+ {
+ v->visit(this);
+ }
+
+ virtual ir_visitor_status accept(ir_hierarchical_visitor *);
+
+ ir_rvalue *condition;
+};
/*@}*/