<p dir="ltr"><br>
On Jun 19, 2015 5:09 AM, "Iago Toral" <<a href="mailto:itoral@igalia.com">itoral@igalia.com</a>> wrote:<br>
><br>
> On Thu, 2015-06-18 at 17:50 -0700, Jason Ekstrand wrote:<br>
> > Soon we will start using the builder to explicitly set all the execution<br>
> > sizes.  We could make a 32-wide builder, but the builder asserts that we<br>
> > never grow it which is usually a reasonable assumption.  Sinc this one<br>
> > instruction is a bit of an odd-ball, we just set the exec_size explicitly.<br>
><br>
> So if I understand it right, the only point of this change is making<br>
> explicit that this instruction has a different execution size to ensure<br>
> that we notice it when we rewrite the code to set explicit execution<br>
> sizes with the new builder, right?</p>
<p dir="ltr">No, it's more that there is no good way to set it to SIMD32 with the builder because changing dispatch width in the builder can only go down and not up.  In retrospect, I should have explicitly created the fs_inst rather than using the builder to emit it 16-wide and changing it later.</p>
<p dir="ltr">The reason this patch can stand on it's own is because, at this point in the series, the builder still uses the exec size guessing based on register widths.</p>
<p dir="ltr">> > ---<br>
> >  src/mesa/drivers/dri/i965/brw_fs_visitor.cpp | 9 +++++----<br>
> >  1 file changed, 5 insertions(+), 4 deletions(-)<br>
> ><br>
> > diff --git a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp<br>
> > index 4770838..b00825e 100644<br>
> > --- a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp<br>
> > +++ b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp<br>
> > @@ -1357,10 +1357,11 @@ fs_visitor::emit_interpolation_setup_gen6()<br>
> >         */<br>
> >        fs_reg int_pixel_xy(GRF, alloc.allocate(dispatch_width / 8),<br>
> >                            BRW_REGISTER_TYPE_UW, dispatch_width * 2);<br>
> > -      abld.exec_all()<br>
> > -          .ADD(int_pixel_xy,<br>
> > -               fs_reg(stride(suboffset(g1_uw, 4), 1, 4, 0)),<br>
> > -               fs_reg(brw_imm_v(0x11001010)));<br>
> > +      fs_inst *add = abld.exec_all()<br>
> > +                         .ADD(int_pixel_xy,<br>
> > +                              fs_reg(stride(suboffset(g1_uw, 4), 1, 4, 0)),<br>
> > +                              fs_reg(brw_imm_v(0x11001010)));<br>
> > +      add->exec_size = dispatch_width * 2;<br>
> ><br>
> >        this->pixel_x = vgrf(glsl_type::float_type);<br>
> >        this->pixel_y = vgrf(glsl_type::float_type);<br>
><br>
><br>
</p>