mesa/src/mapi
Kenneth Graunke b2e327e08f mesa: Add core support for the GL_AMD_performance_monitor extension.
This provides an interface for applications (and OpenGL-based tools) to
access GPU performance counters.  Since the exact performance counters
available vary between vendors and hardware generations, the extension
provides an API the application can use to get the names, types, and
minimum/maximum values of all available counters.  Counters are also
organized into groups.

Applications create "performance monitor" objects, select the counters
they want to track, and Begin/End monitoring, much like OpenGL's query
API.  Multiple monitors can be in flight simultaneously.

v2: Pass ctx to all driver hooks (suggested by Christoph), and attempt
    to fix overallocation of bitsets (caught by Christoph).  Incomplete.

v3: Significantly rework core data structures.  Store counters in groups
    rather than in a global list.  Use their array index in the group's
    counter list as the ID rather than trying to store a globally unique
    counter ID.  Use bitsets for active counters within a group, and
    also track which groups are active so that's easy to query.

v4: Remove _mesa_ prefix on static functions; detect out of memory
    conditions in new_performance_monitor(); make BeginPerfMonitor hook
    return a boolean rather than setting m->Active or raising an error.
    Switch to GLuint/unsigned for NumGroups, NumCounters, and
    MaxActiveCounters (which also means switching a bunch of temporary
    variable types).  All suggested by Brian Paul.  Also, remove
    commented out code at the bottom of the block.  Finally, fix the
    dispatch sanity test (noticed by Ian Romanick).

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Brian Paul <brianp@vmware.com> [v3]
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2013-09-26 16:55:18 -07:00
..
es1api build: Move src/mapi/mapi/* to src/mapi/ 2013-04-15 12:04:25 -07:00
es2api build: Move src/mapi/mapi/* to src/mapi/ 2013-04-15 12:04:25 -07:00
glapi mesa: Add core support for the GL_AMD_performance_monitor extension. 2013-09-26 16:55:18 -07:00
shared-glapi build: Add tests directories to SUBDIRS 2013-07-22 10:48:45 -07:00
vgapi build: Move src/mapi/mapi/* to src/mapi/ 2013-04-15 12:04:25 -07:00
Android.mk build: Move src/mapi/mapi/* to src/mapi/ 2013-04-15 12:04:25 -07:00
entry.c mesa: remove outdated version lines in comments 2013-06-05 08:54:27 -06:00
entry.h mesa: remove outdated version lines in comments 2013-06-05 08:54:27 -06:00
entry_x86-64_tls.h mesa: remove outdated version lines in comments 2013-06-05 08:54:27 -06:00
entry_x86_tls.h mesa: remove outdated version lines in comments 2013-06-05 08:54:27 -06:00
entry_x86_tsd.h mesa: remove outdated version lines in comments 2013-06-05 08:54:27 -06:00
Makefile.am build: Get rid of CORE_DIRS 2013-04-15 12:04:25 -07:00
Makefile.sources build: Move src/mapi/mapi/* to src/mapi/ 2013-04-15 12:04:25 -07:00
mapi.c mesa: remove outdated version lines in comments 2013-06-05 08:54:27 -06:00
mapi.h mesa: remove outdated version lines in comments 2013-06-05 08:54:27 -06:00
mapi_abi.py mesa: Fix build with older gcc since update of glext.h 2013-06-28 08:49:06 -07:00
mapi_glapi.c mesa: remove outdated version lines in comments 2013-06-05 08:54:27 -06:00
mapi_tmp.h mesa: remove outdated version lines in comments 2013-06-05 08:54:27 -06:00
stub.c mesa: remove outdated version lines in comments 2013-06-05 08:54:27 -06:00
stub.h mesa: remove outdated version lines in comments 2013-06-05 08:54:27 -06:00
table.c mesa: remove outdated version lines in comments 2013-06-05 08:54:27 -06:00
table.h mesa: remove outdated version lines in comments 2013-06-05 08:54:27 -06:00
u_compiler.h build: Move src/mapi/mapi/* to src/mapi/ 2013-04-15 12:04:25 -07:00
u_current.c mesa: remove outdated version lines in comments 2013-06-05 08:54:27 -06:00
u_current.h build: Move src/mapi/mapi/* to src/mapi/ 2013-04-15 12:04:25 -07:00
u_execmem.c mesa: remove outdated version lines in comments 2013-06-05 08:54:27 -06:00
u_execmem.h build: Move src/mapi/mapi/* to src/mapi/ 2013-04-15 12:04:25 -07:00
u_macros.h build: Move src/mapi/mapi/* to src/mapi/ 2013-04-15 12:04:25 -07:00
u_thread.h mesa: remove outdated version lines in comments 2013-06-05 08:54:27 -06:00