i965/vec4: don't do horizontal stride on some register file types
horiz_offset() shouldn't be doing anything for scalar registers, because all channels of any SIMD instructions will end up reading or writing the same component of the register, so shifting the register offset would be wrong. Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com> [ Francisco Jerez: Re-implement in terms of is_uniform() for simplicity. Pass argument by const reference. Clarify commit message. ] Reviewed-by: Francisco Jerez <currojerez@riseup.net>
This commit is contained in:

committed by
Francisco Jerez

parent
21e8e3a848
commit
c1fc8fad47
@@ -192,8 +192,11 @@ offset(dst_reg reg, unsigned width, unsigned delta)
|
||||
}
|
||||
|
||||
static inline dst_reg
|
||||
horiz_offset(dst_reg reg, unsigned delta)
|
||||
horiz_offset(const dst_reg ®, unsigned delta)
|
||||
{
|
||||
if (is_uniform(src_reg(reg)))
|
||||
return reg;
|
||||
else
|
||||
return byte_offset(reg, delta * type_sz(reg.type));
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user