i965: Use the upload BO for push constants on Gen7.5-Gen8.
authorKenneth Graunke <kenneth@whitecape.org>
Fri, 12 May 2017 05:23:14 +0000 (22:23 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Sat, 20 May 2017 07:23:10 +0000 (00:23 -0700)
commite781b9e640c7760cb6b255b90ca6d429732f0183
tree460f456a890b485fb0254e8b0442dba563624c5a
parent494593e6b2b989c2c17c52c989dde625d301a494
i965: Use the upload BO for push constants on Gen7.5-Gen8.

We can easily use the upload BO for push constants on Gen7.5/Gen8 too,
at the cost of a relocation when emitting 3DSTATE_CONSTANT_XS.  We can
simply switch to using constant buffer pointer 2 instead of pointer 0,
like we do on Gen9+.

Ivybridge and Baytrail can't do this trick because they require the
constant buffers to be enabled in order, starting with 0.  We'd have
to set the INSTPM bit to make the constant buffer pointer not relative
to dynamic state base address, which would need kernel command parser
support.

Improves performance in GLBenchmark 2.7/TRex Offscreen by:
- Broadwell GT2: 0.305608% +/- 0.19877% (n = 68)
- Braswell: No difference proven (n = 742)
- Haswell GT3e: 0.180755% +/- 0.0237505% (n = 30)

Reviewed-by: Chris Forbes <chrisforbes@google.com>
src/mesa/drivers/dri/i965/gen6_constant_state.c
src/mesa/drivers/dri/i965/genX_state_upload.c