projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a82592d
)
glsl: Add a virtual as_discard() method.
author
Kenneth Graunke
<kenneth@whitecape.org>
Thu, 25 Nov 2010 05:33:07 +0000
(21:33 -0800)
committer
Kenneth Graunke
<kenneth@whitecape.org>
Thu, 25 Nov 2010 11:26:55 +0000
(
03:26
-0800)
NOTE: This is candidate for the 7.9 branch.
src/glsl/ir.h
patch
|
blob
|
history
diff --git
a/src/glsl/ir.h
b/src/glsl/ir.h
index 850033b185fca229165b89afb8abdab9e83bb904..62bb0fd70964aba751e12ba6bad6fd2e9691a7ea 100644
(file)
--- 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;
};
/*@}*/