i965: Make convert_attr_sources_to_hw_regs handle stride == 0.
authorKenneth Graunke <kenneth@whitecape.org>
Thu, 12 Nov 2015 06:37:53 +0000 (22:37 -0800)
committerKenneth Graunke <kenneth@whitecape.org>
Fri, 13 Nov 2015 23:17:58 +0000 (15:17 -0800)
commitf88c175a29bb287d41ef90343eb6670525475a06
tree87989442ae58fafef467d46ddf97506f114b404a
parent26f9469a46585f64b24fb1037aaae7c757a5e6e1
i965: Make convert_attr_sources_to_hw_regs handle stride == 0.

This makes expressions like component(fs_reg(ATTR, n), 7) get a proper
<0,1,0> region instead of the invalid <0,8,0>.

Nobody uses this today, but I plan to.

v2: Rebase on Matt's changes; simplify.

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