i965: Move loop over texture units into brw_populate_sampler_prog_key.
authorKenneth Graunke <kenneth@whitecape.org>
Sat, 16 Jun 2012 20:50:03 +0000 (13:50 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Thu, 12 Jul 2012 21:17:44 +0000 (14:17 -0700)
commitfe911c1d433c6fddc8f1e1226286b26d635d6ad4
treee0480dd097cec6d1e4142cab93877c7b126d9b4c
parent86e401b771ce4a6f9a728f76c5061c339f012d0a
i965: Move loop over texture units into brw_populate_sampler_prog_key.

The whole reason I avoided this was because it might operate on a
brw_vertex_program or a brw_fragment_program.  However, that isn't a
problem: all we need is the gl_program base type.

This avoids awkwardly passing the loop counter 'i' as a parameter,
simplifies both callers, and also plumbs prog in place for future use.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/i965/brw_program.h
src/mesa/drivers/dri/i965/brw_vs.c
src/mesa/drivers/dri/i965/brw_wm.c