aboutsummaryrefslogtreecommitdiffstats
path: root/src/glsl/ir.h
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2013-08-30 00:06:30 -0700
committerKenneth Graunke <[email protected]>2013-09-09 11:52:16 -0700
commit0823a87a7520c79708d6990f761b871c41ebffdf (patch)
tree3166c435d90f5aeb0547caffa124530fe6c9180e /src/glsl/ir.h
parentd403a105735f2b56e24092b1c25e2d3d108e15bc (diff)
glsl: Add a method to tell whether a built-in is available.
We can simply call the stored predicate function. If state is NULL, just report that the function is available. v2: Add a comment (requested by Paul Berry). Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Paul Berry <[email protected]>
Diffstat (limited to 'src/glsl/ir.h')
-rw-r--r--src/glsl/ir.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/glsl/ir.h b/src/glsl/ir.h
index a927e90ca1f..bd1c12cd90a 100644
--- a/src/glsl/ir.h
+++ b/src/glsl/ir.h
@@ -686,6 +686,9 @@ public:
/** Whether or not this function signature is a built-in. */
bool is_builtin() const;
+ /** Whether or not a built-in is available for this shader. */
+ bool is_builtin_available(const _mesa_glsl_parse_state *state) const;
+
/** Body of instructions in the function. */
struct exec_list body;