Mesa (master): mesa: add message-toggle booleans for GL_ARB_debug_output
Marek Olšák
mareko at kemper.freedesktop.org
Sat Mar 10 12:58:31 PST 2012
Module: Mesa
Branch: master
Commit: 76414cded8dcfc274fe47f347c64986680e8b95a
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=76414cded8dcfc274fe47f347c64986680e8b95a
Author: nobled <nobled at dreamwidth.org>
Date: Mon May 2 17:43:38 2011 +0000
mesa: add message-toggle booleans for GL_ARB_debug_output
---
src/mesa/main/errors.c | 2 +-
src/mesa/main/mtypes.h | 28 +++++++++++++++++++++++++++-
2 files changed, 28 insertions(+), 2 deletions(-)
diff --git a/src/mesa/main/errors.c b/src/mesa/main/errors.c
index e43b31f..ed94841 100644
--- a/src/mesa/main/errors.c
+++ b/src/mesa/main/errors.c
@@ -88,7 +88,7 @@ _mesa_log_msg(struct gl_context *ctx, GLenum source, GLenum type,
emptySlot->length = strlen(out_of_memory)+1;
emptySlot->source = GL_DEBUG_SOURCE_OTHER_ARB;
emptySlot->type = GL_DEBUG_TYPE_ERROR_ARB;
- emptySlot->id = 1; /* TODO: proper id namespace */
+ emptySlot->id = OTHER_ERROR_OUT_OF_MEMORY;
emptySlot->severity = GL_DEBUG_SEVERITY_HIGH_ARB;
}
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index 03ec303..5354442 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -3200,12 +3200,38 @@ struct gl_debug_msg
GLcharARB *message;
};
-/* GL_ARB_debug_output */
+typedef enum {
+ API_ERROR_UNKNOWN,
+ API_ERROR_COUNT
+} gl_api_error;
+
+typedef enum {
+ WINSYS_ERROR_UNKNOWN,
+ WINSYS_ERROR_COUNT
+} gl_winsys_error;
+
+typedef enum {
+ SHADER_ERROR_UNKNOWN,
+ SHADER_ERROR_COUNT
+} gl_shader_error;
+
+typedef enum {
+ OTHER_ERROR_UNKNOWN,
+ OTHER_ERROR_OUT_OF_MEMORY,
+ OTHER_ERROR_COUNT
+} gl_other_error;
+
struct gl_debug_state
{
GLDEBUGPROCARB Callback;
GLvoid *CallbackData;
GLboolean SyncOutput;
+ GLboolean ApiErrors[API_ERROR_COUNT];
+ GLboolean WinsysErrors[WINSYS_ERROR_COUNT];
+ GLboolean ShaderErrors[SHADER_ERROR_COUNT];
+ GLboolean OtherErrors[OTHER_ERROR_COUNT];
+ /* TODO: Add an object here that tracks the state of client-provided IDs
+ in the APPLICATION and THIRD_PARTY namespaces. */
struct gl_debug_msg Log[MAX_DEBUG_LOGGED_MESSAGES];
GLint NumMessages;
GLint NextMsg;
More information about the mesa-commit
mailing list