summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2010-09-01 19:54:27 -0700
committerKenneth Graunke <[email protected]>2010-09-01 20:39:09 -0700
commit43a6200f3c3fb29d2e9654a293b2328cd6c0f64f (patch)
tree12523555b2bba3ed2f862ff63605a13aac63d85c
parentcfe0dd5622a9b26e6df18801413ad8dc336f0c56 (diff)
glsl: Convert constant record constructor parameters to ir_constants.
I'm not sure if this is strictly necessary, but it seems wise.
-rw-r--r--src/glsl/ast_function.cpp4
1 files changed, 3 insertions, 1 deletions
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);