i965/gen6: Reduce updates of transform feedback offsets with HW contexts.
authorEric Anholt <eric@anholt.net>
Tue, 9 Apr 2013 20:34:08 +0000 (13:34 -0700)
committerEric Anholt <eric@anholt.net>
Wed, 10 Apr 2013 16:45:21 +0000 (09:45 -0700)
commit007a88ed24e783d38839e69ae07aa19ceabb6c93
treea2a6295e00d9eb97439b8f7f0eb8c1180b7551f2
parent62a18da34153dd0e167a2944fc00812c1471c0fb
i965/gen6: Reduce updates of transform feedback offsets with HW contexts.

The software-tracked transform feedback offsets (svbi_0_starting_index)
are incorrect in the presence of primitive restart, so we were actually
updating it with a bogus value if the batch wrapped and we emitted the
packet again during a single transform feedback.  By reducing state
emission, we avoid the bug.

Fixes piglit OpenGL 3.1/primitive-restart-xfb flush
Reviewed-by: Paul Berry <stereotype441@gmail.com>
NOTE: This is a candidate for the 9.1 branch.
src/mesa/drivers/dri/i965/gen6_sol.c