On Jun 25, 2016 5:39 AM, "Rob Clark" <robdcl...@gmail.com> wrote: > > From: Rob Clark <robcl...@freedesktop.org> > > Not entirely sure how we didn't hit this before, but dropping the const > initializer on the floor is obviously not correct. > > Signed-off-by: Rob Clark <robcl...@freedesktop.org> > --- > No idea why i965 even still uses this pass, vs nir scalarizing pass. > So might want to drop this. But I figured fixing it first gives > something that can be cherry-picked to release branches, so this > patch should land before deleting the ir pass. > > 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..7c58089 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[i] = entry->var->constant_initializer->value.d[i];
I think you want data.d[0] on the l left hands side. > + } else { > + data.u[i] = entry->var->constant_initializer->value.u[i]; Same here > + } > + 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]); > } > > -- > 2.7.4 > > _______________________________________________ > mesa-dev mailing list > mesa-dev@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/mesa-dev
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev