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 <kenneth@whitecape.org> Reviewed-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Paul Berry <stereotype441@gmail.com>
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user