1b8e80941Smrg/*
2b8e80941Smrg * Mesa 3-D graphics library
3b8e80941Smrg *
4b8e80941Smrg * Copyright (C) 1999-2016  Brian Paul, et al   All Rights Reserved.
5b8e80941Smrg *
6b8e80941Smrg * Permission is hereby granted, free of charge, to any person obtaining a
7b8e80941Smrg * copy of this software and associated documentation files (the "Software"),
8b8e80941Smrg * to deal in the Software without restriction, including without limitation
9b8e80941Smrg * the rights to use, copy, modify, merge, publish, distribute, sublicense,
10b8e80941Smrg * and/or sell copies of the Software, and to permit persons to whom the
11b8e80941Smrg * Software is furnished to do so, subject to the following conditions:
12b8e80941Smrg *
13b8e80941Smrg * The above copyright notice and this permission notice shall be included
14b8e80941Smrg * in all copies or substantial portions of the Software.
15b8e80941Smrg *
16b8e80941Smrg * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
17b8e80941Smrg * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18b8e80941Smrg * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
19b8e80941Smrg * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
20b8e80941Smrg * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
21b8e80941Smrg * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
22b8e80941Smrg * OTHER DEALINGS IN THE SOFTWARE.
23b8e80941Smrg */
24b8e80941Smrg
25b8e80941Smrg
26b8e80941Smrg#ifndef DEBUG_OUTPUT_H
27b8e80941Smrg#define DEBUG_OUTPUT_H
28b8e80941Smrg
29b8e80941Smrg
30b8e80941Smrg#include <stdio.h>
31b8e80941Smrg#include <stdarg.h>
32b8e80941Smrg#include "glheader.h"
33b8e80941Smrg#include "menums.h"
34b8e80941Smrg
35b8e80941Smrg
36b8e80941Smrg#ifdef __cplusplus
37b8e80941Smrgextern "C" {
38b8e80941Smrg#endif
39b8e80941Smrg
40b8e80941Smrgstruct gl_context;
41b8e80941Smrg
42b8e80941Smrgvoid
43b8e80941Smrg_mesa_init_debug_output(struct gl_context *ctx);
44b8e80941Smrg
45b8e80941Smrgvoid
46b8e80941Smrg_mesa_free_errors_data(struct gl_context *ctx);
47b8e80941Smrg
48b8e80941Smrgvoid
49b8e80941Smrg_mesa_debug_get_id(GLuint *id);
50b8e80941Smrg
51b8e80941Smrgbool
52b8e80941Smrg_mesa_set_debug_state_int(struct gl_context *ctx, GLenum pname, GLint val);
53b8e80941Smrg
54b8e80941SmrgGLint
55b8e80941Smrg_mesa_get_debug_state_int(struct gl_context *ctx, GLenum pname);
56b8e80941Smrg
57b8e80941Smrgvoid *
58b8e80941Smrg_mesa_get_debug_state_ptr(struct gl_context *ctx, GLenum pname);
59b8e80941Smrg
60b8e80941Smrgvoid
61b8e80941Smrg_mesa_log_msg(struct gl_context *ctx, enum mesa_debug_source source,
62b8e80941Smrg              enum mesa_debug_type type, GLuint id,
63b8e80941Smrg              enum mesa_debug_severity severity, GLint len, const char *buf);
64b8e80941Smrg
65b8e80941Smrgbool
66b8e80941Smrg_mesa_debug_is_message_enabled(const struct gl_debug_state *debug,
67b8e80941Smrg                               enum mesa_debug_source source,
68b8e80941Smrg                               enum mesa_debug_type type,
69b8e80941Smrg                               GLuint id,
70b8e80941Smrg                               enum mesa_debug_severity severity);
71b8e80941Smrg
72b8e80941Smrgvoid GLAPIENTRY
73b8e80941Smrg_mesa_DebugMessageInsert(GLenum source, GLenum type, GLuint id,
74b8e80941Smrg                         GLenum severity, GLint length,
75b8e80941Smrg                         const GLchar* buf);
76b8e80941Smrg
77b8e80941SmrgGLuint GLAPIENTRY
78b8e80941Smrg_mesa_GetDebugMessageLog(GLuint count, GLsizei logSize, GLenum* sources,
79b8e80941Smrg                         GLenum* types, GLenum* ids, GLenum* severities,
80b8e80941Smrg                         GLsizei* lengths, GLchar* messageLog);
81b8e80941Smrg
82b8e80941Smrgvoid GLAPIENTRY
83b8e80941Smrg_mesa_DebugMessageControl(GLenum source, GLenum type, GLenum severity,
84b8e80941Smrg                          GLsizei count, const GLuint *ids,
85b8e80941Smrg                          GLboolean enabled);
86b8e80941Smrg
87b8e80941Smrgvoid GLAPIENTRY
88b8e80941Smrg_mesa_DebugMessageCallback(GLDEBUGPROC callback,
89b8e80941Smrg                           const void *userParam);
90b8e80941Smrg
91b8e80941Smrgvoid GLAPIENTRY
92b8e80941Smrg_mesa_PushDebugGroup(GLenum source, GLuint id, GLsizei length,
93b8e80941Smrg                     const GLchar *message);
94b8e80941Smrg
95b8e80941Smrgvoid GLAPIENTRY
96b8e80941Smrg_mesa_PopDebugGroup(void);
97b8e80941Smrg
98b8e80941Smrgvoid GLAPIENTRY
99b8e80941Smrg_mesa_StringMarkerGREMEDY(GLsizei len, const GLvoid *string);
100b8e80941Smrg
101b8e80941Smrg
102b8e80941Smrg#ifdef __cplusplus
103b8e80941Smrg}
104b8e80941Smrg#endif
105b8e80941Smrg
106b8e80941Smrg
107b8e80941Smrg#endif /* DEBUG_OUTPUT_H */
108