diff options
author | Kyle Brenneman <kbrenneman@nvidia.com> | 2016-09-12 17:50:40 -0400 |
---|---|---|
committer | Adam Jackson <ajax@redhat.com> | 2016-10-05 11:40:51 -0400 |
commit | 6a5545d3ba60a19a3bce8f62141e0991a595eeaf (patch) | |
tree | 2c2f43ea6fc78b565162a4801e89be79341d3927 /src/egl/main/eglglobals.h | |
parent | f8b861a8673ca49eb6e4fbcdc1cf7f6be884afe1 (diff) | |
download | external_mesa3d-6a5545d3ba60a19a3bce8f62141e0991a595eeaf.zip external_mesa3d-6a5545d3ba60a19a3bce8f62141e0991a595eeaf.tar.gz external_mesa3d-6a5545d3ba60a19a3bce8f62141e0991a595eeaf.tar.bz2 |
egl: Track EGL_KHR_debug state when going through EGL API calls (v3)
This decorates every EGL entrypoint with _EGL_FUNC_START, which records
the function name and primary dispatch object label in the current
thread state. It also adds debug report functions and calls them when
appropriate.
This would be useful enough for debugging on its own, if the user set a
breakpoint when the report function was called. We will also need this
state tracked in order to expose EGL_KHR_debug.
v2:
- Clear the object label in more cases in _eglSetFuncName
- Pass draw surface (if any) to _EGL_FUNC_START in eglSwapInterval
v3:
- Set dummy thread's CurrentAPI to EGL_OPENGL_ES_API not zero
- Less ?: in _eglSetFuncName
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Emil Velikov <emil.veliko@collabora.com>
Diffstat (limited to 'src/egl/main/eglglobals.h')
-rw-r--r-- | src/egl/main/eglglobals.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/egl/main/eglglobals.h b/src/egl/main/eglglobals.h index dfa3577..ec4f3d0 100644 --- a/src/egl/main/eglglobals.h +++ b/src/egl/main/eglglobals.h @@ -70,5 +70,10 @@ extern struct _egl_global _eglGlobal; extern void _eglAddAtExitCall(void (*func)(void)); +static inline unsigned int DebugBitFromType(EGLenum type) +{ + assert(type >= EGL_DEBUG_MSG_CRITICAL_KHR && type <= EGL_DEBUG_MSG_INFO_KHR); + return (1 << (type - EGL_DEBUG_MSG_CRITICAL_KHR)); +} #endif /* EGLGLOBALS_INCLUDED */ |