#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
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
/** @{
*
- * 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 {
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
};
MESA_DEBUG_SEVERITY_LOW,
MESA_DEBUG_SEVERITY_MEDIUM,
MESA_DEBUG_SEVERITY_HIGH,
+ MESA_DEBUG_SEVERITY_NOTIFICATION,
MESA_DEBUG_SEVERITY_COUNT
};
/**
* 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
{
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
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 */