i965: Make brw_upload_sampler_state_table handle Gen7+ as well.
authorKenneth Graunke <kenneth@whitecape.org>
Sat, 26 Jul 2014 18:36:33 +0000 (11:36 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Sat, 2 Aug 2014 12:14:42 +0000 (05:14 -0700)
commitc2f231e18104e3300d9fab86600e7e0f6c77d1fb
treec3c39022135b9412f363cfa7fd2a466488d7360c
parent8fbc96ca74012d3f94564d88692e170bc4ef7937
i965: Make brw_upload_sampler_state_table handle Gen7+ as well.

This copies a few changes from gen7_upload_sampler_state_table; the next
patch will delete that function.

Gen7+ has per-stage sampler state pointer update packets, so we emit
them as soon as we emit a new table for a stage.  On Gen6 and earlier,
we have a single packet, so we delay until we've changed everything
that's going to be changed.

v2: Split 3DSTATE_SAMPLER_STATE_POINTERS_XS packet emission into a
    helper function (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
src/mesa/drivers/dri/i965/brw_state.h
src/mesa/drivers/dri/i965/gen7_sampler_state.c