i965: Shorten sampler loops in precompile key setup.
authorKenneth Graunke <kenneth@whitecape.org>
Thu, 15 Aug 2013 01:55:15 +0000 (18:55 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Tue, 20 Aug 2013 08:09:52 +0000 (01:09 -0700)
commita4ff1fd388369dbf80d324c84502b28b5f9d3da4
tree28f06f17c7059adfbd9d28af547d8d2cc10677d5
parentce87c51e9ad131670fd8e4dcc0d023d0b057612b
i965: Shorten sampler loops in precompile key setup.

Now that we have the number of samplers available, we don't need to
iterate over all 16.  This should be particularly helpful for vertex
shaders.

v2: Use the correct shader program (caught by Paul Berry).

This needs to initialize the exact same set of sampler swizzles as
the actual key setup, or else we end up doing recompiles due to some
being XYZW and others being 0.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
src/mesa/drivers/dri/i965/brw_fs.cpp
src/mesa/drivers/dri/i965/brw_vs.c