diff options
author | Petri Latvala <petri.latvala@intel.com> | 2014-04-23 11:08:52 +0300 |
---|---|---|
committer | Ian Romanick <ian.d.romanick@intel.com> | 2014-05-02 10:07:04 -0700 |
commit | dac82ceac5d726ff8851051f671396cfbd1abc63 (patch) | |
tree | bdc4d8190e5fbe5d82990a5fa06ead42838c6ea4 /src/mesa/main/performance_monitor.h | |
parent | 6ccb98e88c3589dd8f09737ea0c47682bb19e4d3 (diff) | |
download | external_mesa3d-dac82ceac5d726ff8851051f671396cfbd1abc63.zip external_mesa3d-dac82ceac5d726ff8851051f671396cfbd1abc63.tar.gz external_mesa3d-dac82ceac5d726ff8851051f671396cfbd1abc63.tar.bz2 |
mesa: Add core support for the GL_INTEL_performance_query extension.
Like AMD_performance_monitor, this extension 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.
Applications create performance queries based on available query
types, and begin/end measurement collection. Multiple queries can be
measuring simultaneously.
v2: Whitespace changes
v3: src/mapi/glapi/gen/gl_API.xml: Also expose the functions to GLES2.
v4: Whitespace changes, static_dispatch="false" for all functions, fix
dispatch_sanity test for GLES2 functions
Signed-off-by: Petri Latvala <petri.latvala@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Diffstat (limited to 'src/mesa/main/performance_monitor.h')
-rw-r--r-- | src/mesa/main/performance_monitor.h | 43 |
1 files changed, 42 insertions, 1 deletions
diff --git a/src/mesa/main/performance_monitor.h b/src/mesa/main/performance_monitor.h index 76234e5..7b311e4 100644 --- a/src/mesa/main/performance_monitor.h +++ b/src/mesa/main/performance_monitor.h @@ -23,7 +23,8 @@ /** * \file performance_monitor.h - * Core Mesa support for the AMD_performance_monitor extension. + * Core Mesa support for the AMD_performance_monitor extension and the + * INTEL_performance_query extension. */ #pragma once @@ -85,4 +86,44 @@ _mesa_GetPerfMonitorCounterDataAMD(GLuint monitor, GLenum pname, unsigned _mesa_perf_monitor_counter_size(const struct gl_perf_monitor_counter *); + +extern void GLAPIENTRY +_mesa_GetFirstPerfQueryIdINTEL(GLuint *queryId); + +extern void GLAPIENTRY +_mesa_GetNextPerfQueryIdINTEL(GLuint queryId, GLuint *nextQueryId); + +extern void GLAPIENTRY +_mesa_GetPerfQueryIdByNameINTEL(char *queryName, GLuint *queryId); + +extern void GLAPIENTRY +_mesa_GetPerfQueryInfoINTEL(GLuint queryId, + GLuint queryNameLength, char *queryName, + GLuint *dataSize, GLuint *noCounters, + GLuint *noActiveInstances, + GLuint *capsMask); + +extern void GLAPIENTRY +_mesa_GetPerfCounterInfoINTEL(GLuint queryId, GLuint counterId, + GLuint counterNameLength, char *counterName, + GLuint counterDescLength, char *counterDesc, + GLuint *counterOffset, GLuint *counterDataSize, GLuint *counterTypeEnum, + GLuint *counterDataTypeEnum, GLuint64 *rawCounterMaxValue); + +extern void GLAPIENTRY +_mesa_CreatePerfQueryINTEL(GLuint queryId, GLuint *queryHandle); + +extern void GLAPIENTRY +_mesa_DeletePerfQueryINTEL(GLuint queryHandle); + +extern void GLAPIENTRY +_mesa_BeginPerfQueryINTEL(GLuint queryHandle); + +extern void GLAPIENTRY +_mesa_EndPerfQueryINTEL(GLuint queryHandle); + +extern void GLAPIENTRY +_mesa_GetPerfQueryDataINTEL(GLuint queryHandle, GLuint flags, + GLsizei dataSize, void *data, GLuint *bytesWritten); + #endif |