[Mesa-dev] [PATCH 02/10] i965/vs: Remove dead fields of src_reg.

Eric Anholt eric at anholt.net
Mon Sep 19 13:26:42 PDT 2011


On Fri, 09 Sep 2011 15:28:06 -0700, Kenneth Graunke <kenneth at whitecape.org> wrote:
> On 09/08/2011 11:32 PM, Eric Anholt wrote:
> > These were copy and pasted from the FS, and are never used.
> > ---
> >  src/mesa/drivers/dri/i965/brw_vec4.h |    2 --
> >  1 files changed, 0 insertions(+), 2 deletions(-)
> > 
> > diff --git a/src/mesa/drivers/dri/i965/brw_vec4.h b/src/mesa/drivers/dri/i965/brw_vec4.h
> > index 3f116ee..0f85cdb 100644
> > --- a/src/mesa/drivers/dri/i965/brw_vec4.h
> > +++ b/src/mesa/drivers/dri/i965/brw_vec4.h
> > @@ -83,9 +83,7 @@ public:
> >     int reg_offset;
> >     /** Register type.  BRW_REGISTER_TYPE_* */
> >     int type;
> > -   bool sechalf;
> >     struct brw_reg fixed_hw_reg;
> > -   int smear; /* -1, or a channel of the reg to smear to all channels. */
> >  
> >     /** Value for file == BRW_IMMMEDIATE_FILE */
> >     union {
> 
> You might also want to move the imm union to src_reg instead of the base
> class.  Immediates as dst_regs don't make a lot of sense...
> 
> Either way,
> Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>

At the time of making the base class, I was still trying to figure out
how to share code between FS and VS, at which point immediates in the
base reg made sense.  But that ended up being way more work than it was
worth, so I think it would make sense to move out at this point.

The few cases where an "immediate" value in the destination has been
used, like in control flow instructions, I don't see us ever
representing that in the destination in this IR.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20110919/b12ce4b5/attachment.pgp>


More information about the mesa-dev mailing list