i965: Make brw_update_sampler_state() use brw_emit_sampler_state().
authorKenneth Graunke <kenneth@whitecape.org>
Sat, 26 Jul 2014 10:04:12 +0000 (03:04 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Sat, 2 Aug 2014 12:16:40 +0000 (05:16 -0700)
commita50b640dfe3580049e07bfdafb2e69410844359d
tree6ba8b391b8b7aa9a35d1e61aa26b14fda57b0875
parent05f0796eb68fe1be3e55b7c78c7660dccf44e0a1
i965: Make brw_update_sampler_state() use brw_emit_sampler_state().

Instead of stuffing bits directly into the brw_sampler_state structure,
we now store them in local variables, then use brw_emit_sampler_state()
to assemble the packet.  This separates the decision about what values
to use from the actual packet emission, which makes the code more
reusable across generations.

v2: Put const on a bunch of local variables and move declarations,
    as suggested by Topi Pohjolainen.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
src/mesa/drivers/dri/i965/brw_sampler_state.c