[Mesa-dev] [PATCH 1/5] i965/fs: Set force_writemask_all on shader_time instructions.

Kenneth Graunke kenneth at whitecape.org
Sun Mar 8 13:59:02 PDT 2015


On Sunday, March 08, 2015 01:32:33 PM Matt Turner wrote:
> On Sun, Mar 8, 2015 at 1:08 AM, Kenneth Graunke <kenneth at whitecape.org> wrote:
> > These computations don't have anything to do with the currently
> > executing channels, so they should use force_writemask_all.
> >
> > This fixes assert failures.
> >
> > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=86974
> > Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
> > Cc: mesa-stable at lists.freedesktop.org
> > ---
> >  src/mesa/drivers/dri/i965/brw_fs.cpp | 9 +++++++--
> >  1 file changed, 7 insertions(+), 2 deletions(-)
> >
> > diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp
> > index d6acc23..45a5793 100644
> > --- a/src/mesa/drivers/dri/i965/brw_fs.cpp
> > +++ b/src/mesa/drivers/dri/i965/brw_fs.cpp
> > @@ -759,18 +759,23 @@ fs_visitor::emit_shader_time_end()
> >     reset.set_smear(2);
> >     fs_inst *test = emit(AND(reg_null_d, reset, fs_reg(1u)));
> >     test->conditional_mod = BRW_CONDITIONAL_Z;
> > +   test->force_writemask_all = true;
> >     emit(IF(BRW_PREDICATE_NORMAL));
> >
> >     fs_reg start = shader_start_time;
> >     start.negate = true;
> >     fs_reg diff = fs_reg(GRF, alloc.allocate(1), BRW_REGISTER_TYPE_UD, 1);
> > -   emit(ADD(diff, start, shader_end_time));
> > +   fs_inst *add = ADD(diff, start, shader_end_time);
> > +   add->force_writemask_all = true;
> > +   emit(add);
> 
> Emit returns a pointer to the instruction it emitted, so you can cut
> one line by wrapping the ADD with emit().
> 
> Either way's fine.

Yeah, I didn't bother because patch 5 changes it to:

   end->insert_before(add)

and that doesn't return a pointer to the inserted instruction.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20150308/1d1d0b28/attachment.sig>


More information about the mesa-dev mailing list