i965/nir: Refactor input/output lowering setup into helpers.
authorKenneth Graunke <kenneth@whitecape.org>
Wed, 26 Aug 2015 10:07:29 +0000 (03:07 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Thu, 1 Oct 2015 17:58:30 +0000 (10:58 -0700)
commit193d29516ddb76f469fea17119493e2b685bc6b7
treec668a8c83cc3c5a4c92bfb18de67f704683976db
parent39a1d36a67974dd9fc3c0d834d6a117cdfed8f33
i965/nir: Refactor input/output lowering setup into helpers.

The code for input lowering is going to get significantly more
complicated shortly, so I wanted to pull it out.  Vertex shader inputs
are handled nearly identically regardless of vec4/scalar mode, so I
opted to not split that.

I thought about having each function actually do the lowering, but one
pass through nir_lower_io that handles all types (which weren't handled
earlier) is probably more efficient.

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