[Mesa-dev] [PATCH v2 03/15] i965/fs_cse: Factor out code to create copy instructions

Pohjolainen, Topi topi.pohjolainen at intel.com
Thu May 7 07:32:30 PDT 2015


On Thu, May 07, 2015 at 07:26:12AM -0700, Jason Ekstrand wrote:
> On Thu, May 7, 2015 at 5:52 AM, Pohjolainen, Topi
> <topi.pohjolainen at intel.com> wrote:
> > On Tue, May 05, 2015 at 06:28:06PM -0700, Jason Ekstrand wrote:
> >> v2: Get rid of the block parameter and make src a const reference
> >>
> >> Reviewed-by: Topi Pohjolainen <topi.pohjolainen at intel.com>
> >> Reviewed-by: Matt Turner <mattst88 at gmail.com>
> >> Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
> >> ---
> >>  src/mesa/drivers/dri/i965/brw_fs_cse.cpp | 75 ++++++++++++++++----------------
> >>  1 file changed, 38 insertions(+), 37 deletions(-)
> >>
> >> diff --git a/src/mesa/drivers/dri/i965/brw_fs_cse.cpp b/src/mesa/drivers/dri/i965/brw_fs_cse.cpp
> >> index 43370cb..9c4ed0b 100644
> >> --- a/src/mesa/drivers/dri/i965/brw_fs_cse.cpp
> >> +++ b/src/mesa/drivers/dri/i965/brw_fs_cse.cpp
> >> @@ -185,6 +185,29 @@ instructions_match(fs_inst *a, fs_inst *b, bool *negate)
> >>            operands_match(a, b, negate);
> >>  }
> >>
> >> +static fs_inst *
> >> +create_copy_instr(fs_visitor *v, fs_inst *inst, fs_reg src, bool negate)
> >
> > Did you mean 'src' to be constant reference? It is only used for reading
> > so it could be - you claim this in the commit message yourself :)
> 
> Oops...  I think what happened is that I tried to do it for
> is_copy_payload not create_copy_instr.  But then is_copy_payload does
> actually change it so I put it back and somehow my brain leaked it
> into the commit message.  Unfortunately, it's already pushed so I
> can't change it now.  However, I could make a fixup if you'd like.
> --Jason

No big deal really, I'm sure compiler handles that for us anyway.


More information about the mesa-dev mailing list