[Mesa-dev] [PATCH] i965/cs: Use dispatch width of 8 for cs terminate

Jason Ekstrand jason at jlekstrand.net
Thu Jul 16 14:37:59 PDT 2015


On Jul 16, 2015 4:35 PM, "Jordan Justen" <jordan.l.justen at intel.com> wrote:
>
> On 2015-07-16 13:59:45, Jason Ekstrand wrote:
> >    On Jul 16, 2015 2:00 PM, "Jordan Justen" <jordan.l.justen at intel.com>
> >    wrote:
> >    >
> >    > This prevents an assertion failure in brw_fs_live_variables.cpp,
> >    > fs_live_variables::setup_one_write: Assertion `var < num_vars'
failed.
> >
> >    Best guess is that you should just fix regs_read to return the right
value
> >    (1 in this case).  Most other send instructions use mlen but that
may not
> >    be needed tour CS_TERMINATE.
>
> I think regs_read will fix a similar assert in setup_one_read. The MOV
> will still hit the setup_one_write assert. Should I be generating the
> MOV differently?
>
> For example
>
>    bld.group(8, 0).exec_all().MOV(payload, g0);

Yes, that's how we need to do the MOV.

Out of curiosity, why are you emitting a MOV at all and not just calling
CS_TERMINATE with g0 directly?
--Jason

> works in combo with an update to regs_read.
>
> -Jordan
>
> >    > Signed-off-by: Jordan Justen <jordan.l.justen at intel.com>
> >    > Cc: Jason Ekstrand <jason at jlekstrand.net>
> >    > ---
> >    >  src/mesa/drivers/dri/i965/brw_fs_visitor.cpp | 7 ++++---
> >    >  1 file changed, 4 insertions(+), 3 deletions(-)
> >    >
> >    > diff --git a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
> >    b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
> >    > index 94d6a58..62dfb9a 100644
> >    > --- a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
> >    > +++ b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
> >    > @@ -1960,11 +1960,12 @@ fs_visitor::emit_cs_terminate()
> >    >      */
> >    >     struct brw_reg g0 = retype(brw_vec8_grf(0, 0),
> >    BRW_REGISTER_TYPE_UD);
> >    >     fs_reg payload = fs_reg(GRF, alloc.allocate(1),
> >    BRW_REGISTER_TYPE_UD);
> >    > -   bld.exec_all().MOV(payload, g0);
> >    > +   const fs_builder bld8 = bld.group(8, 0);
> >    > +   bld8.exec_all().MOV(payload, g0);
> >    >
> >    >     /* Send a message to the thread spawner to terminate the
thread. */
> >    > -   fs_inst *inst = bld.exec_all()
> >    > -                      .emit(CS_OPCODE_CS_TERMINATE, reg_undef,
> >    payload);
> >    > +   fs_inst *inst = bld8.exec_all()
> >    > +                       .emit(CS_OPCODE_CS_TERMINATE, reg_undef,
> >    payload);
> >    >     inst->eot = true;
> >    >  }
> >    >
> >    > --
> >    > 2.1.4
> >    >
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20150716/ea609a36/attachment.html>


More information about the mesa-dev mailing list