summaryrefslogtreecommitdiffstats
path: root/src/glsl/ir.h
diff options
context:
space:
mode:
authorPaul Berry <[email protected]>2013-04-22 13:59:17 -0700
committerPaul Berry <[email protected]>2013-04-24 09:57:37 -0700
commit70ca263623bdeba6a8ff3b306d4206927cf8c33f (patch)
treee18c8730262589b064d732c59032a20090ba1fbe /src/glsl/ir.h
parentf64058803ad43e360ffaa5f14763485f4cac0158 (diff)
glsl: Add virtual function ir_instruction::as_jump()
Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/glsl/ir.h')
-rw-r--r--src/glsl/ir.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/glsl/ir.h b/src/glsl/ir.h
index 3018e0fbb16..878a94611a7 100644
--- a/src/glsl/ir.h
+++ b/src/glsl/ir.h
@@ -131,6 +131,7 @@ public:
virtual class ir_swizzle * as_swizzle() { return NULL; }
virtual class ir_constant * as_constant() { return NULL; }
virtual class ir_discard * as_discard() { return NULL; }
+ virtual class ir_jump * as_jump() { return NULL; }
/*@}*/
protected:
@@ -1298,6 +1299,12 @@ protected:
{
ir_type = ir_type_unset;
}
+
+public:
+ virtual ir_jump *as_jump()
+ {
+ return this;
+ }
};
class ir_return : public ir_jump {