i965/fs: Fix and document component().
authorFrancisco Jerez <currojerez@riseup.net>
Wed, 11 May 2016 19:54:26 +0000 (12:54 -0700)
committerSamuel Iglesias Gonsálvez <siglesias@igalia.com>
Mon, 16 May 2016 07:55:33 +0000 (09:55 +0200)
commit71fd4942d10128afde9f0a7f33b587c29cd9011c
treebb5d7a173690eb55a99a439fe2927bdfcae55fc9
parente209134f717078fb6c1d4a6d048b4aba22c87993
i965/fs: Fix and document component().

This fixes a number of bugs of component() by reimplementing it in
terms of horiz_offset(): Handling of base registers starting at a
non-zero subreg_offset, handling of strided registers and overflow of
subreg_offset into reg_offset.

Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/i965/brw_ir_fs.h