i965: Implement Pause/ResumeTransformfeedback driver hooks on Gen7+.
authorKenneth Graunke <kenneth@whitecape.org>
Mon, 27 May 2013 00:53:14 +0000 (17:53 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Thu, 31 Oct 2013 18:04:37 +0000 (11:04 -0700)
commit684958d1e7415267e8276654390ea610eefaa95f
tree52179b8b2e38689c03413ee66ead4dea00743af1
parent0d7033c3940aa6aef7ab72dc31ab154b2e614b1b
i965: Implement Pause/ResumeTransformfeedback driver hooks on Gen7+.

The ARB_transform_feedback2 extension introduces the ability to pause
and resume transform feedback sessions.  Although only one can be active
at a time, it's possible to switch between multiple transform feedback
objects while paused.

In order to facilitate this, we need to save/restore the SO_WRITE_OFFSET
registers so that after resuming, the GPU continues writing where it
left off.

This functionality also exists in ES 3.0, but somehow we completely
forgot to implement it.

v2: Reduce alignment from 4096 to 64 (it seemed excessive).
v3: Use I915_GEM_DOMAIN_INSTRUCTION instead of RENDER, for consistency
    with other writes.  It shouldn't matter on IVB+.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
src/mesa/drivers/dri/i965/brw_context.c
src/mesa/drivers/dri/i965/brw_context.h
src/mesa/drivers/dri/i965/gen6_sol.c
src/mesa/drivers/dri/i965/gen7_sol_state.c