Mesa (master): glsl: small builtin inline tidy up
Timothy Arceri
tarceri at kemper.freedesktop.org
Thu Jul 27 12:14:46 UTC 2017
Module: Mesa
Branch: master
Commit: 6ee3323d7db26720b60a7a7fbd0fe669e86e4dc2
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=6ee3323d7db26720b60a7a7fbd0fe669e86e4dc2
Author: Timothy Arceri <tarceri at itsqueeze.com>
Date: Thu Jul 27 16:49:55 2017 +1000
glsl: small builtin inline tidy up
Reviewed-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
---
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 2d156ae1da..f7e90fba5b 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",
More information about the mesa-commit
mailing list