mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 02:48:06 +02:00
i965: don't drop const initializers in vector splitting
Signed-off-by: Rob Clark <robclark@freedesktop.org> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
parent
f78a6b1ce3
commit
01ccb0d91e
1 changed files with 12 additions and 0 deletions
|
|
@ -372,6 +372,18 @@ brw_do_vector_splitting(exec_list *instructions)
|
|||
|
||||
ralloc_free(name);
|
||||
|
||||
if (entry->var->constant_initializer) {
|
||||
ir_constant_data data = {0};
|
||||
assert(entry->var->data.has_initializer);
|
||||
if (entry->var->type->is_double()) {
|
||||
data.d[0] = entry->var->constant_initializer->value.d[i];
|
||||
} else {
|
||||
data.u[0] = entry->var->constant_initializer->value.u[i];
|
||||
}
|
||||
entry->components[i]->data.has_initializer = true;
|
||||
entry->components[i]->constant_initializer = new(entry->components[i]) ir_constant(type, &data);
|
||||
}
|
||||
|
||||
entry->var->insert_before(entry->components[i]);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue