<div dir="ltr">No, that's the same experiment I would have run. I was hoping the original authors could chime in, but it sounds like you have more insight via AoA work. <div><br></div><div>I'll resubmit with your change, thanks!</div>
<div><br></div><div>-C<br><div><br></div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Jul 9, 2014 at 5:36 PM, Timothy Arceri <span dir="ltr"><<a href="mailto:t_arceri@yahoo.com.au" target="_blank">t_arceri@yahoo.com.au</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On Wed, 2014-07-02 at 22:16 +1000, Timothy Arceri wrote:<br>
> On Tue, 2014-07-01 at 14:45 -0700, Kenneth Graunke wrote:<br>
> > From: Cody Northrop <<a href="mailto:cody@lunarg.com">cody@lunarg.com</a>><br>
> ><br>
> > Vectors are falling in to the ir_dereference_array() path.<br>
> ><br>
> > Without this change, the following glsl aborts the debug driver,<br>
> > or gets the wrong answer in release:<br>
> ><br>
> > mat2x2 a = mat2( vec2( 1.0, vertex.x ), vec2( 0.0, 1.0 ) );<br>
> ><br>
> > Also submitting piglit tests, will reference in bug.<br>
> ><br>
> > v2: Rebase on Mesa master.<br>
> ><br>
> > Signed-off-by: Cody Northrop <<a href="mailto:cody@lunarg.com">cody@lunarg.com</a>><br>
> > Reviewed-by: Courtney Goeltzenleuchter <<a href="mailto:courtney@lunarg.com">courtney@lunarg.com</a>><br>
> > Reviewed-by: Kenneth Graunke <<a href="mailto:kenneth@whitecape.org">kenneth@whitecape.org</a>><br>
> > Bugzilla: <a href="https://bugs.freedesktop.org/show_bug.cgi?id=79373" target="_blank">https://bugs.freedesktop.org/show_bug.cgi?id=79373</a><br>
> > ---<br>
> > src/glsl/ast_function.cpp | 16 +++++++++++++---<br>
> > 1 file changed, 13 insertions(+), 3 deletions(-)<br>
> ><br>
> > Hi Cody,<br>
> ><br>
> > Your patch didn't apply to master due to Matt's foreach_list changes;<br>
> > I did the obvious rebase. Otherwise, it looks great. Thanks for fixing<br>
> > this and improving our tests!<br>
> ><br>
> > I'll plan to commit this tomorrow unless anyone else has objections.<br>
> ><br>
> > --Ken<br>
> ><br>
> > diff --git a/src/glsl/ast_function.cpp b/src/glsl/ast_function.cpp<br>
> > index cdb34cc..98288d2 100644<br>
> > --- a/src/glsl/ast_function.cpp<br>
> > +++ b/src/glsl/ast_function.cpp<br>
> > @@ -743,10 +743,20 @@ process_vec_mat_constructor(exec_list *instructions,<br>
> ><br>
> > int i = 0;<br>
> > foreach_in_list(ir_rvalue, rhs, &actual_parameters) {<br>
> > - ir_rvalue *lhs = new(ctx) ir_dereference_array(var,<br>
> > - new(ctx) ir_constant(i));<br>
> > + ir_instruction *assignment = NULL;<br>
> > +<br>
> > + if (var->type->is_array() || var->type->is_matrix()) {<br>
><br>
> Is this ever actually an array???<br>
<br>
</div></div>I didn't mean for my question to hold this up for so long. But I cant<br>
see where this would ever be an array, if my understanding is correct<br>
process_array_constructor() should process any arrays. When removing<br>
var->type->is_array() all arb_shading_language_420pack piglit tests<br>
(including the new ones) continue to pass. So I don't think the<br>
is_array() condition is needed.<br>
<br>
If I'm wrong could you please give an example of when this would be an<br>
array as it might affect my arrays of arrays work.<br>
<div class="HOEnZb"><div class="h5"><br>
<br>
><br>
> > + ir_rvalue *lhs = new(ctx) ir_dereference_array(var,<br>
> > + new(ctx) ir_constant(i));<br>
> > + assignment = new(ctx) ir_assignment(lhs, rhs, NULL);<br>
> > + } else {<br>
> > + /* use writemask rather than index for vector */<br>
> > + assert(var->type->is_vector());<br>
> > + assert(i < 4);<br>
> > + ir_dereference *lhs = new(ctx) ir_dereference_variable(var);<br>
> > + assignment = new(ctx) ir_assignment(lhs, rhs, NULL, (unsigned)(1 << i));<br>
> > + }<br>
> ><br>
> > - ir_instruction *assignment = new(ctx) ir_assignment(lhs, rhs, NULL);<br>
> > instructions->push_tail(assignment);<br>
> ><br>
> > i++;<br>
><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="http://lists.freedesktop.org/mailman/listinfo/mesa-dev" target="_blank">http://lists.freedesktop.org/mailman/listinfo/mesa-dev</a><br>
<br>
<br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr"><div><font color="#999999"><font face="trebuchet ms, sans-serif"> Cody Northrop<br> Graphics Software Engineer<br> LunarG, Inc.- 3D Driver Innovations</font><font face="trebuchet ms, sans-serif" style="font-size:small"><br>
Email: <a href="mailto:cody@lunarg.com" target="_blank">cody@lunarg.com</a><br> Website: <a href="http://www.lunarg.com/" target="_blank">http://www.lunarg.com</a></font></font></div></div>
</div>