i965/vs: Simplify fs_visitor's ATTR file.
authorKenneth Graunke <kenneth@whitecape.org>
Fri, 14 Aug 2015 23:01:33 +0000 (16:01 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Mon, 12 Oct 2015 21:33:26 +0000 (14:33 -0700)
commitbd198b9f0a292a9ff4ffffec3a29bad23d62caba
tree2f9dd5581ddc6c1f5de3a40757b6cf0712a92199
parentbf97f8d467ad1d485c2327da3f4fe1f9e1dc7379
i965/vs: Simplify fs_visitor's ATTR file.

Previously, ATTR was indexed by VERT_ATTRIB_* slots; at the end of
compilation, assign_vs_urb_setup() translated those into GRF units,
and converted ATTR to HW_REGs.

This patch moves the transslation earlier, making ATTR work in terms of
GRF units from the beginning.  assign_vs_urb_setup() simply has to add
the number of payload registers and push constants to obtain the final
hardware GRF number.  (We can't do this earlier as those values aren't
known.)

ATTR still supports reg_offset; however, it's simply added to reg.
It's not clear whether this is valuable or not.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
src/mesa/drivers/dri/i965/brw_fs.cpp
src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
src/mesa/drivers/dri/i965/brw_nir.c