From 43a6200f3c3fb29d2e9654a293b2328cd6c0f64f Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Wed, 1 Sep 2010 19:54:27 -0700 Subject: [PATCH] glsl: Convert constant record constructor parameters to ir_constants. I'm not sure if this is strictly necessary, but it seems wise. --- src/glsl/ast_function.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/glsl/ast_function.cpp b/src/glsl/ast_function.cpp index c3b4441435f..1a5a193ad50 100644 --- a/src/glsl/ast_function.cpp +++ b/src/glsl/ast_function.cpp @@ -432,8 +432,10 @@ constant_record_constructor(const glsl_type *constructor_type, exec_list *parameters, void *mem_ctx) { foreach_list(node, parameters) { - if (((ir_instruction *) node)->as_constant() == NULL) + ir_constant *constant = ((ir_instruction *) node)->as_constant(); + if (constant == NULL) return NULL; + node->replace_with(constant); } return new(mem_ctx) ir_constant(constructor_type, parameters); -- 2.30.2