summaryrefslogtreecommitdiffstats
path: root/src/glsl
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2010-11-24 21:33:07 -0800
committerKenneth Graunke <[email protected]>2010-11-25 03:26:55 -0800
commit1eb7a81f2e43842acd59929ce65db2142b69134d (patch)
treea30bc4310bb5dd7b1a03484684ac81e0d3d84149 /src/glsl
parenta82592de9219e7d8c344275066ec5870a1c0ba45 (diff)
glsl: Add a virtual as_discard() method.
NOTE: This is candidate for the 7.9 branch.
Diffstat (limited to 'src/glsl')
-rw-r--r--src/glsl/ir.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/glsl/ir.h b/src/glsl/ir.h
index 850033b185f..62bb0fd7096 100644
--- a/src/glsl/ir.h
+++ b/src/glsl/ir.h
@@ -122,6 +122,7 @@ public:
virtual class ir_if * as_if() { return NULL; }
virtual class ir_swizzle * as_swizzle() { return NULL; }
virtual class ir_constant * as_constant() { return NULL; }
+ virtual class ir_discard * as_discard() { return NULL; }
/*@}*/
protected:
@@ -1122,6 +1123,11 @@ public:
virtual ir_visitor_status accept(ir_hierarchical_visitor *);
+ virtual ir_discard *as_discard()
+ {
+ return this;
+ }
+
ir_rvalue *condition;
};
/*@}*/