i965: Separate uploading push constant data from the pointer packets.
authorKenneth Graunke <kenneth@whitecape.org>
Tue, 29 Nov 2016 09:06:50 +0000 (01:06 -0800)
committerKenneth Graunke <kenneth@whitecape.org>
Fri, 14 Jul 2017 02:56:49 +0000 (19:56 -0700)
commit29603ae208fb0031a6746110d448a91ea4071dea
tree58d39ad2849b3915967122a850a66c5a3486163d
parenta18ab92d3c21b47efe376ea1efdbc4128b26316c
i965: Separate uploading push constant data from the pointer packets.

I hope to upload UBO via 3DSTATE_CONSTANT_XS packets, in addition to
normal uniforms.  In order to do that, I'll need to re-emit the packets
when UBOs change.  But I don't want to re-copy the regular uniform data
to the batchbuffer every time.

This patch separates out the data uploading from the packet submission.
We're running low on dirty bits, so I made the new atom happen on every
draw call, and added a flag to stage_state indicating that we want the
packet for that stage emitted.

I would have preferred to do this outside the atom system, but it has
to happen between the uploading of push constant data and the binding
table upload.

Reviewed-by: Matt Turner <mattst88@gmail.com>
src/mesa/drivers/dri/i965/brw_context.h
src/mesa/drivers/dri/i965/gen6_constant_state.c
src/mesa/drivers/dri/i965/genX_state_upload.c