i965/fs: Handle fixed HW GRF subnr in reg_offset().

This will be useful later on when we start using reg_offset() on fixed
hardware registers.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
This commit is contained in:
Francisco Jerez 2016-09-07 13:41:08 -07:00
parent 1a4b7fdd88
commit 937373eb25

View file

@ -187,7 +187,8 @@ static inline unsigned
reg_offset(const fs_reg &r)
{
return (r.file == VGRF || r.file == IMM ? 0 : r.nr) *
(r.file == UNIFORM ? 4 : REG_SIZE) + r.offset;
(r.file == UNIFORM ? 4 : REG_SIZE) + r.offset +
(r.file == ARF || r.file == FIXED_GRF ? r.subnr : 0);
}
/**