i965/gen7: Make primitives_written counting work.
authorEric Anholt <eric@anholt.net>
Thu, 22 Dec 2011 18:50:21 +0000 (10:50 -0800)
committerEric Anholt <eric@anholt.net>
Sat, 24 Dec 2011 06:02:09 +0000 (22:02 -0800)
commit43e0d775973446e84621fdb56af85f0027ed579c
tree58e14151ea591f95739472568290029cb19bed2a
parentbf2a93db4dfaae0d03a2d6e08c907f6c1c0071ca
i965/gen7: Make primitives_written counting work.

The code was relying on gs.prog_data's copy of the
number-of-verts-per-prim, which segfaulted on gen7 since it doesn't
make a GS program.  We can easily calculate that value right here.

v2: Fix svbi_0_starting_index regression.

Reviewed-by: Paul Berry <stereotype441@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/i965/brw_draw.c