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

Kenneth Graunke kenneth at whitecape.org
Mon Sep 19 15:09:51 PDT 2011


On 09/19/2011 01:26 PM, Eric Anholt wrote:
> 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.

Oh...right!  I completely forgot about jump distances being stored in 
the dst reg on some platforms.  But yeah, that's probably best kept at 
the lower level brw_instruction/eu_emit level.


More information about the mesa-dev mailing list