i965: Fix OACONTROL assertion failures on Ironlake.
authorKenneth Graunke <kenneth@whitecape.org>
Wed, 27 Nov 2013 00:32:13 +0000 (16:32 -0800)
committerKenneth Graunke <kenneth@whitecape.org>
Wed, 4 Dec 2013 00:24:49 +0000 (16:24 -0800)
commitda07e1b6837616ef101d1374dbff322694d6a7d9
treedbc2e1535b5efcc2a2a93cedf6f65e95e085b29a
parent4c110994533c67f2e501cd32ee0c2f91060630e0
i965: Fix OACONTROL assertion failures on Ironlake.

I guarded half of the callers to start/stop_oa_counters with generation
checks, but missed the other half (which were added later).  OACONTROL
doesn't exist on Ironlake, so we better not write it.  Also, there's no
need---Ironlake's performance counters are always running.

This patch moves the generation checks into start/stop_oa_counters,
rather than requiring the caller to do them.

Fixes assertion failures in Piglit's AMD_performance_monitor/measure.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
src/mesa/drivers/dri/i965/brw_performance_monitor.c