mesa: add GREMEDY_string_marker
[mesa.git] / src / mesa / main / errors.h
index b388138e84d611c69a317a9010710fe32660c701..92df2ac868a08b429c81fa1705b7bed5063c2eb2 100644 (file)
 #define ERRORS_H
 
 
+#include <stdio.h>
+#include <stdarg.h>
 #include "compiler.h"
 #include "glheader.h"
+#include "mtypes.h"
 
 
 #ifdef __cplusplus
 extern "C" {
 #endif
 
-#include "mtypes.h"
-
 struct _glapi_table;
 
 extern void
@@ -69,17 +70,34 @@ _mesa_error_no_memory(const char *caller);
 extern void
 _mesa_debug( const struct gl_context *ctx, const char *fmtString, ... ) PRINTFLIKE(2, 3);
 
+extern void
+_mesa_log(const char *fmtString, ...) PRINTFLIKE(1, 2);
+
+extern FILE *
+_mesa_get_log_file(void);
+
+extern void
+_mesa_gl_vdebug(struct gl_context *ctx,
+                GLuint *id,
+                enum mesa_debug_source source,
+                enum mesa_debug_type type,
+                enum mesa_debug_severity severity,
+                const char *fmtString,
+                va_list args);
+
 extern void
 _mesa_gl_debug(struct gl_context *ctx,
                GLuint *id,
+               enum mesa_debug_source source,
                enum mesa_debug_type type,
                enum mesa_debug_severity severity,
-               const char *fmtString, ...) PRINTFLIKE(5, 6);
+               const char *fmtString, ...) PRINTFLIKE(6, 7);
 
 #define _mesa_perf_debug(ctx, sev, ...) do {                              \
    static GLuint msg_id = 0;                                              \
    if (unlikely(ctx->Const.ContextFlags & GL_CONTEXT_FLAG_DEBUG_BIT)) {   \
       _mesa_gl_debug(ctx, &msg_id,                                        \
+                     MESA_DEBUG_SOURCE_API,                               \
                      MESA_DEBUG_TYPE_PERFORMANCE,                         \
                      sev,                                                 \
                      __VA_ARGS__);                                        \
@@ -97,7 +115,7 @@ _mesa_get_debug_state_ptr(struct gl_context *ctx, GLenum pname);
 
 extern void
 _mesa_shader_debug(struct gl_context *ctx, GLenum type, GLuint *id,
-                   const char *msg, int len);
+                   const char *msg);
 
 void GLAPIENTRY
 _mesa_DebugMessageInsert(GLenum source, GLenum type, GLuint id,
@@ -120,6 +138,9 @@ _mesa_PushDebugGroup(GLenum source, GLuint id, GLsizei length,
 void GLAPIENTRY
 _mesa_PopDebugGroup(void);
 
+void GLAPIENTRY
+_mesa_StringMarkerGREMEDY(GLsizei len, const GLvoid *string);
+
 #ifdef __cplusplus
 }
 #endif