diff options
author | Timothy Arceri <[email protected]> | 2017-07-27 16:49:55 +1000 |
---|---|---|
committer | Timothy Arceri <[email protected]> | 2017-07-27 22:14:37 +1000 |
commit | 6ee3323d7db26720b60a7a7fbd0fe669e86e4dc2 (patch) | |
tree | 304a76d08603ed15148b6bad7ab4798789593991 | |
parent | c4652a0a5b5eef32f31baa1187ecd2612ac1009d (diff) |
glsl: small builtin inline tidy up
Reviewed-by: Samuel Pitoiset <[email protected]>
-rw-r--r-- | src/compiler/glsl/ast_function.cpp | 8 |
1 files 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", |