summaryrefslogtreecommitdiff
path: root/src/compiler/glsl/ast_function.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/compiler/glsl/ast_function.cpp')
-rw-r--r--src/compiler/glsl/ast_function.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/compiler/glsl/ast_function.cpp b/src/compiler/glsl/ast_function.cpp
index f74394fe1d..9aea470f71 100644
--- a/src/compiler/glsl/ast_function.cpp
+++ b/src/compiler/glsl/ast_function.cpp
@@ -1708,8 +1708,6 @@ process_record_constructor(exec_list *instructions,
exec_node *node = actual_parameters.head;
for (unsigned i = 0; i < constructor_type->length; i++) {
- ir_rvalue *ir = (ir_rvalue *) node;
-
if (node->is_tail_sentinel()) {
_mesa_glsl_error(loc, state,
"insufficient parameters to constructor for `%s'",
@@ -1717,6 +1715,8 @@ process_record_constructor(exec_list *instructions,
return ir_rvalue::error_value(ctx);
}
+ ir_rvalue *ir = (ir_rvalue *) node;
+
if (apply_implicit_conversion(constructor_type->fields.structure[i].type,
ir, state)) {
node->replace_with(ir);