i965/gen6-7/sol: Keep independent counters for the current and previous begin/end...
authorFrancisco Jerez <currojerez@riseup.net>
Thu, 16 Nov 2017 22:27:41 +0000 (14:27 -0800)
committerFrancisco Jerez <currojerez@riseup.net>
Wed, 17 Jan 2018 00:03:48 +0000 (16:03 -0800)
commitf476b3f6e7b9f61c5bd93cf463005fd88aacaeba
treecc15c86c47c5d17609697a9db5f1f70f57b9e168
parentb0c8d61281d5e09cd216e1ff3f2c441f7c550a47
i965/gen6-7/sol: Keep independent counters for the current and previous begin/end block.

This allows us to aggregate the primitive counts of a completed
transform feedback begin/end block lazily, which in the most typical
case (where glDrawTransformFeedback is not used) will allow us to
avoid aggregating the primitive counters on the CPU altogether,
preventing a stall on previous rendering during
glBeginTransformFeedback(), which dramatically improves performance of
applications that rely heavily on transform feedback.

Improves performance of SynMark2 OglGSCloth by 65.52% ±0.25% (data
gathered on VLV).

Tested-By: Eero Tamminen <eero.t.tamminen@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
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