i965: Only flush the batchbuffer if we need to zero the SO offsets
authorChris Wilson <chris@chris-wilson.co.uk>
Tue, 10 Jan 2017 21:23:26 +0000 (21:23 +0000)
committerKenneth Graunke <kenneth@whitecape.org>
Thu, 2 Mar 2017 08:30:41 +0000 (00:30 -0800)
commit92281b2c7f61d6fb8f7cc43eac15bb487f1e9848
treed55135b8de48b3a374ad575b11d5d51f65d65772
parent7ad692d8e2bf619f5855552e3d56aafa9f5f21af
i965: Only flush the batchbuffer if we need to zero the SO offsets

If we don't have pipelined register access (e.g. Haswell before kernel
v4.2), then we can only implement EXT_transform_feedback by reseting the
SO offsets *between* batches. However, if we do have pipelined access to
the SO registers on gen7, we can simply emit an inline reset of the SO
registers without a full batch flush.

v2 [by Ken]: Simplify after recent kernel feature detection changes.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/i965/gen7_sol_state.c