i965: Rework Sandybridge 3DSTATE_VIEWPORT_STATE_POINTERS.
authorKenneth Graunke <kenneth@whitecape.org>
Thu, 11 May 2017 02:39:36 +0000 (19:39 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Tue, 30 May 2017 04:46:33 +0000 (21:46 -0700)
commit4ce103e01a8959d604d1de9b99e627b95ffaec45
treed93cbbad3942c03e2a253fda3b25d5263c7a6743
parent7f4645e89cb61d856f386d148566002652d2d4fd
i965: Rework Sandybridge 3DSTATE_VIEWPORT_STATE_POINTERS.

On Gen7+ we emit 3DSTATE_VIEWPORT_STATE_POINTERS_{SF_CL,CC} when
emitting a new viewport.

This patch makes us take the same approach on Sandybridge - but because
we have a combined command, we just set the appropriate "change" bits.
This eliminates an atom, some dirty flagging, and some brw->*.vp_offset
writes.  It does mean we'll emit two 3DSTATE_VIEWPORT_STATE_POINTERS
instead of one if both change, but that's probably fine.

Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
src/mesa/drivers/dri/i965/genX_state_upload.c