summaryrefslogtreecommitdiffstats
path: root/src/glsl/ir_clone.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_clone.cpp
parent88c20c46b8f708e89adef28f341c51ea7883b6a0 (diff)
glsl2: Define new ir_discard instruction.
Diffstat (limited to 'src/glsl/ir_clone.cpp')
-rw-r--r--src/glsl/ir_clone.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/glsl/ir_clone.cpp b/src/glsl/ir_clone.cpp
index 01a1ce3a6d4..74cc858bda4 100644
--- a/src/glsl/ir_clone.cpp
+++ b/src/glsl/ir_clone.cpp
@@ -75,6 +75,18 @@ ir_return::clone(struct hash_table *ht) const
}
ir_instruction *
+ir_discard::clone(struct hash_table *ht) const
+{
+ void *ctx = talloc_parent(this);
+ ir_rvalue *new_condition = NULL;
+
+ if (this->condition != NULL)
+ new_condition = (ir_rvalue *) this->condition->clone(ht);
+
+ return new(ctx) ir_discard(new_condition);
+}
+
+ir_instruction *
ir_loop_jump::clone(struct hash_table *ht) const
{
void *ctx = talloc_parent(this);