diff options
author | Timothy Arceri <[email protected]> | 2013-08-26 16:39:46 +1000 |
---|---|---|
committer | Brian Paul <[email protected]> | 2013-09-04 07:47:48 -0600 |
commit | 77d38fd3fb5a915911f81bca538c0f0b9d8ad64f (patch) | |
tree | beee6e6534f924b43d9b678d50355a44bfcc5660 /src | |
parent | 644fbbd3ebe58ee2237395904f83e085f221d52d (diff) |
mesa: Add some constants and state variables for KHR_debug functions
Signed-off-by: Timothy Arceri <[email protected]>
Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/main/config.h | 7 | ||||
-rw-r--r-- | src/mesa/main/errors.c | 4 | ||||
-rw-r--r-- | src/mesa/main/mtypes.h | 15 |
3 files changed, 20 insertions, 6 deletions
diff --git a/src/mesa/main/config.h b/src/mesa/main/config.h index 1d2ab4dc016..0bcf27c345b 100644 --- a/src/mesa/main/config.h +++ b/src/mesa/main/config.h @@ -249,12 +249,17 @@ #define MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS 1024 /*@}*/ -/** For GL_ARB_debug_output */ +/** For GL_ARB_debug_output and GL_KHR_debug */ /*@{*/ #define MAX_DEBUG_LOGGED_MESSAGES 10 #define MAX_DEBUG_MESSAGE_LENGTH 4096 /*@}*/ +/** For GL_KHR_debug */ +/*@{*/ +#define MAX_LABEL_LENGTH 256 +#define MAX_DEBUG_GROUP_STACK_DEPTH 64 +/*@}*/ /* * Color channel component order diff --git a/src/mesa/main/errors.c b/src/mesa/main/errors.c index cc93d3bd603..eea72910b3b 100644 --- a/src/mesa/main/errors.c +++ b/src/mesa/main/errors.c @@ -66,12 +66,16 @@ static const GLenum debug_type_enums[] = { GL_DEBUG_TYPE_PORTABILITY, GL_DEBUG_TYPE_PERFORMANCE, GL_DEBUG_TYPE_OTHER, + GL_DEBUG_TYPE_MARKER, + GL_DEBUG_TYPE_PUSH_GROUP, + GL_DEBUG_TYPE_POP_GROUP, }; static const GLenum debug_severity_enums[] = { GL_DEBUG_SEVERITY_LOW, GL_DEBUG_SEVERITY_MEDIUM, GL_DEBUG_SEVERITY_HIGH, + GL_DEBUG_SEVERITY_NOTIFICATION, }; static enum mesa_debug_source diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index 7d5632209d9..5fafaa6cd73 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -3316,8 +3316,8 @@ struct gl_dlist_state /** @{ * - * These are a mapping of the GL_ARB_debug_output enums to small enums - * suitable for use as an array index. + * These are a mapping of the GL_ARB_debug_output/GL_KHR_debug enums + * to small enums suitable for use as an array index. */ enum mesa_debug_source { @@ -3337,6 +3337,9 @@ enum mesa_debug_type { MESA_DEBUG_TYPE_PORTABILITY, MESA_DEBUG_TYPE_PERFORMANCE, MESA_DEBUG_TYPE_OTHER, + MESA_DEBUG_TYPE_MARKER, + MESA_DEBUG_TYPE_PUSH_GROUP, + MESA_DEBUG_TYPE_POP_GROUP, MESA_DEBUG_TYPE_COUNT }; @@ -3344,6 +3347,7 @@ enum mesa_debug_severity { MESA_DEBUG_SEVERITY_LOW, MESA_DEBUG_SEVERITY_MEDIUM, MESA_DEBUG_SEVERITY_HIGH, + MESA_DEBUG_SEVERITY_NOTIFICATION, MESA_DEBUG_SEVERITY_COUNT }; @@ -3351,7 +3355,7 @@ enum mesa_debug_severity { /** * An error, warning, or other piece of debug information for an application - * to consume via GL_ARB_debug_output. + * to consume via GL_ARB_debug_output/GL_KHR_debug. */ struct gl_debug_msg { @@ -3373,12 +3377,13 @@ struct gl_debug_namespace struct gl_debug_state { - GLDEBUGPROCARB Callback; + GLDEBUGPROC Callback; const void *CallbackData; GLboolean SyncOutput; GLboolean Defaults[MESA_DEBUG_SEVERITY_COUNT][MESA_DEBUG_SOURCE_COUNT][MESA_DEBUG_TYPE_COUNT]; struct gl_debug_namespace Namespaces[MESA_DEBUG_SOURCE_COUNT][MESA_DEBUG_TYPE_COUNT]; struct gl_debug_msg Log[MAX_DEBUG_LOGGED_MESSAGES]; + GLint GroupStackDepth; GLint NumMessages; GLint NextMsg; GLint NextMsgLength; /* redundant, but copied here from Log[NextMsg].length @@ -3625,7 +3630,7 @@ struct gl_context const char *ErrorDebugFmtString; GLuint ErrorDebugCount; - /* GL_ARB_debug_output */ + /* GL_ARB_debug_output/GL_KHR_debug */ struct gl_debug_state Debug; GLenum RenderMode; /**< either GL_RENDER, GL_SELECT, GL_FEEDBACK */ |