glsl: Add a method to tell whether a built-in is available.
authorKenneth Graunke <kenneth@whitecape.org>
Fri, 30 Aug 2013 07:06:30 +0000 (00:06 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Mon, 9 Sep 2013 18:52:16 +0000 (11:52 -0700)
commit0823a87a7520c79708d6990f761b871c41ebffdf
tree3166c435d90f5aeb0547caffa124530fe6c9180e
parentd403a105735f2b56e24092b1c25e2d3d108e15bc
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 <kenneth@whitecape.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
src/glsl/ir.cpp
src/glsl/ir.h