mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-03 07:10:15 +01:00
glsl: Convert constant record constructor parameters to ir_constants.
I'm not sure if this is strictly necessary, but it seems wise.
This commit is contained in:
parent
cfe0dd5622
commit
43a6200f3c
1 changed files with 3 additions and 1 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue