From 6ee3323d7db26720b60a7a7fbd0fe669e86e4dc2 Mon Sep 17 00:00:00 2001 From: Timothy Arceri Date: Thu, 27 Jul 2017 16:49:55 +1000 Subject: [PATCH] glsl: small builtin inline tidy up Reviewed-by: Samuel Pitoiset --- src/compiler/glsl/ast_function.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/compiler/glsl/ast_function.cpp b/src/compiler/glsl/ast_function.cpp index 2d156ae1da1..f7e90fba5b6 100644 --- a/src/compiler/glsl/ast_function.cpp +++ b/src/compiler/glsl/ast_function.cpp @@ -433,8 +433,7 @@ generate_call(exec_list *instructions, ir_function_signature *sig, exec_list *actual_parameters, ir_variable *sub_var, ir_rvalue *array_idx, - struct _mesa_glsl_parse_state *state, - bool inline_immediately) + struct _mesa_glsl_parse_state *state) { void *ctx = state; exec_list post_call_conversions; @@ -546,7 +545,8 @@ generate_call(exec_list *instructions, ir_function_signature *sig, ir_call *call = new(ctx) ir_call(sig, deref, actual_parameters, sub_var, array_idx); instructions->push_tail(call); - if (inline_immediately) { + if (sig->is_builtin()) { + /* inline immediately */ call->generate_inline(call); call->remove(); } @@ -2331,7 +2331,7 @@ ast_function_expression::hir(exec_list *instructions, } value = generate_call(instructions, sig, &actual_parameters, sub_var, - array_idx, state, sig->is_builtin()); + array_idx, state); if (!value) { ir_variable *const tmp = new(ctx) ir_variable(glsl_type::void_type, "void_var", -- 2.30.2