i965: Expose pipeline statistics registers via performance monitors.
authorKenneth Graunke <kenneth@whitecape.org>
Thu, 31 Oct 2013 23:27:01 +0000 (16:27 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Thu, 21 Nov 2013 23:01:14 +0000 (15:01 -0800)
commit9f41585eb5a42a680cdd167181eebda26a2bff8b
treefa24972c67f575f6ef8f909a75ae595a344c188e
parent91950d1aeae6f1c6b0d859e588e59ae52840d4d8
i965: Expose pipeline statistics registers via performance monitors.

This is fairly simple:
- At BeginPerfMonitor time, take an opening snapshot.
- At EndPerfMonitor time, take a closing snapshot.
- The first time the application asks for results, subtract the two and
  store that value.  Then free the BO containing the snapshots.
- On subsequent requests for the results, just return the saved value.
- On reset, throw away the results.

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