<p dir="ltr"><br>
On Jun 25, 2016 5:39 AM, "Rob Clark" <<a href="mailto:robdclark@gmail.com">robdclark@gmail.com</a>> wrote:<br>
><br>
> From: Rob Clark <<a href="mailto:robclark@freedesktop.org">robclark@freedesktop.org</a>><br>
><br>
> Not entirely sure how we didn't hit this before, but dropping the const<br>
> initializer on the floor is obviously not correct.<br>
><br>
> Signed-off-by: Rob Clark <<a href="mailto:robclark@freedesktop.org">robclark@freedesktop.org</a>><br>
> ---<br>
> No idea why i965 even still uses this pass, vs nir scalarizing pass.<br>
> So might want to drop this. But I figured fixing it first gives<br>
> something that can be cherry-picked to release branches, so this<br>
> patch should land before deleting the ir pass.<br>
><br>
> src/mesa/drivers/dri/i965/brw_fs_vector_splitting.cpp | 12 ++++++++++++<br>
> 1 file changed, 12 insertions(+)<br>
><br>
> diff --git a/src/mesa/drivers/dri/i965/brw_fs_vector_splitting.cpp b/src/mesa/drivers/dri/i965/brw_fs_vector_splitting.cpp<br>
> index 5fe24de..7c58089 100644<br>
> --- a/src/mesa/drivers/dri/i965/brw_fs_vector_splitting.cpp<br>
> +++ b/src/mesa/drivers/dri/i965/brw_fs_vector_splitting.cpp<br>
> @@ -372,6 +372,18 @@ brw_do_vector_splitting(exec_list *instructions)<br>
><br>
> ralloc_free(name);<br>
><br>
> + if (entry->var->constant_initializer) {<br>
> + ir_constant_data data = {0};<br>
> + assert(entry->var->data.has_initializer);<br>
> + if (entry->var->type->is_double()) {<br>
> + data.d[i] = entry->var->constant_initializer->value.d[i];</p>
<p dir="ltr">I think you want data.d[0] on the l left hands side.</p>
<p dir="ltr">> + } else {<br>
> + data.u[i] = entry->var->constant_initializer->value.u[i];</p>
<p dir="ltr">Same here</p>
<p dir="ltr">> + }<br>
> + entry->components[i]->data.has_initializer = true;<br>
> + entry->components[i]->constant_initializer = new(entry->components[i]) ir_constant(type, &data);<br>
> + }<br>
> +<br>
> entry->var->insert_before(entry->components[i]);<br>
> }<br>
><br>
> --<br>
> 2.7.4<br>
><br>
> _______________________________________________<br>
> mesa-dev mailing list<br>
> <a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a><br>
> <a href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev">https://lists.freedesktop.org/mailman/listinfo/mesa-dev</a><br>
</p>