Skip to content
Snippets Groups Projects
Commit 01ccb0d9 authored by Rob Clark's avatar Rob Clark :speech_balloon: Committed by Rob Clark
Browse files

i965: don't drop const initializers in vector splitting


Signed-off-by: default avatarRob Clark <robclark@freedesktop.org>
Reviewed-by: Kenneth Graunke's avatarKenneth Graunke <kenneth@whitecape.org>
parent f78a6b1c
No related branches found
No related tags found
No related merge requests found
......@@ -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]);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment