Module: Mesa Branch: master Commit: 01ccb0d91e6f976716eb79cdb0fb11ad4d0b4fcf URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=01ccb0d91e6f976716eb79cdb0fb11ad4d0b4fcf
Author: Rob Clark <robcl...@freedesktop.org> Date: Fri Jun 24 20:03:37 2016 -0400 i965: don't drop const initializers in vector splitting Signed-off-by: Rob Clark <robcl...@freedesktop.org> Reviewed-by: Kenneth Graunke <kenn...@whitecape.org> --- src/mesa/drivers/dri/i965/brw_fs_vector_splitting.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/mesa/drivers/dri/i965/brw_fs_vector_splitting.cpp b/src/mesa/drivers/dri/i965/brw_fs_vector_splitting.cpp index 5fe24de..5c05586 100644 --- a/src/mesa/drivers/dri/i965/brw_fs_vector_splitting.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs_vector_splitting.cpp @@ -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]); } _______________________________________________ mesa-commit mailing list mesa-commit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-commit