i965: implement indirect drawing for Gen7
authorChris Forbes <chrisf@ijw.co.nz>
Mon, 30 Sep 2013 07:57:18 +0000 (20:57 +1300)
committerChris Forbes <chrisf@ijw.co.nz>
Mon, 25 Nov 2013 09:01:35 +0000 (22:01 +1300)
commit02f9757ab5942ad6ad3b14f50459240f3dc2d897
tree0cf8369c3181a2a8bf56945a77f007e0c4172550
parent1a00317169d317c1bbc040e0e7e4b1744e10313e
i965: implement indirect drawing for Gen7

Just prior to emitting the 3DPRIMITIVE command, we load each of the
indirect registers. The values loaded are either from offsets into the
current indirect BO, or constant zero if the parameter is not used for
this draw.

Enabling use of the indirect registers is done by turning on a bit in
the first dword of the 3DPRIMITIVE command itself.

V3: - Deduplicate the common part of both indexed and nonindexed indirect
setup.
    - Just refer to the indirect bo out of the context directly.

V4: - Fix bo reference to specify the range we care about.

Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
src/mesa/drivers/dri/i965/brw_draw.c