diff options
author | Kenneth Graunke <[email protected]> | 2013-08-30 16:12:55 -0700 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2013-09-09 11:46:51 -0700 |
commit | 4b0bac0dce31ab6c5c36fc35347e6e0e3b2ecc2a (patch) | |
tree | 7f7fb4f8f21f577ce3bf4d887fcfdadd22d2e93f /src/glsl/ir.cpp | |
parent | ca321d07fda7d4c550eec985c79bbafb3dfbf570 (diff) |
glsl: Convert ir_function_signature::is_builtin to a method.
A signature is a built-in if and only if builtin_info != NULL, so we
don't actually need a separate flag bit. Making a boolean-valued
method allows existing code to ask the same question while not worrying
about the internal representation.
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.cpp')
-rw-r--r-- | src/glsl/ir.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/glsl/ir.cpp b/src/glsl/ir.cpp index ea018eb2d9e..d9fb808c4b1 100644 --- a/src/glsl/ir.cpp +++ b/src/glsl/ir.cpp @@ -1585,11 +1585,17 @@ ir_function_signature::ir_function_signature(const glsl_type *return_type, _function(NULL) { this->ir_type = ir_type_function_signature; - this->is_builtin = builtin_info != NULL; this->origin = NULL; } +bool +ir_function_signature::is_builtin() const +{ + return builtin_info != NULL; +} + + static bool modes_match(unsigned a, unsigned b) { @@ -1661,7 +1667,7 @@ ir_function::has_user_signature() { foreach_list(n, &this->signatures) { ir_function_signature *const sig = (ir_function_signature *) n; - if (!sig->is_builtin) + if (!sig->is_builtin()) return true; } return false; |