i965: Add support for GL_AMD_performance_monitor on Ironlake.
authorKenneth Graunke <kenneth@whitecape.org>
Thu, 11 Apr 2013 20:22:29 +0000 (13:22 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Thu, 26 Sep 2013 23:55:18 +0000 (16:55 -0700)
commit0f2da773070c06b6d20ad264d3abb19c4dfd9761
treea8000bf054ee72091b11d3b4a6a0a7dc253a7301
parentb2e327e08f8519da131dd382adcc99240d433404
i965: Add support for GL_AMD_performance_monitor on Ironlake.

Ironlake's counters are always enabled; userspace can simply send a
MI_REPORT_PERF_COUNT packet to take a snapshot of them.  This makes it
easy to implement.

The counters are documented in the source code for the intel-gpu-tools
intel_perf_counters utility.

v2: Adjust for core data structure changes.  Add a table mapping buffer
    object offsets to exposed counters (which changes each generation).
    Finally, add report ID assertions to sanity check the BO layout
    (thanks to Carl Worth).

v3: Update for core BeginPerfMonitor hook changes (requested by Brian).

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
src/mesa/drivers/dri/i965/Makefile.sources
src/mesa/drivers/dri/i965/brw_context.c
src/mesa/drivers/dri/i965/brw_context.h
src/mesa/drivers/dri/i965/brw_defines.h
src/mesa/drivers/dri/i965/brw_performance_monitor.c [new file with mode: 0644]
src/mesa/drivers/dri/i965/intel_extensions.c