diff options
author | Eric Anholt <[email protected]> | 2013-02-22 16:09:19 -0800 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2013-03-05 14:25:01 -0800 |
commit | 65afa11dc632ae83c58781201f1c8c75a1b89eb0 (patch) | |
tree | 8ffd30e826a1c21cb0321907be8ddb0805e1bd3c /src/mesa | |
parent | d9249935db113e1244510de0165dc96a0766bba9 (diff) |
mesa: Remove the special enum for _mesa_error debug output.
Now all the per-message enums from mtypes are gone. Now we can extend
unique message IDs into all generators of debug output without having to
update mtypes.h for each one.
Reviewed-by: Jordan Justen <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/main/errors.c | 10 | ||||
-rw-r--r-- | src/mesa/main/mtypes.h | 4 |
2 files changed, 8 insertions, 6 deletions
diff --git a/src/mesa/main/errors.c b/src/mesa/main/errors.c index 405ee824829..97f1b8a0389 100644 --- a/src/mesa/main/errors.c +++ b/src/mesa/main/errors.c @@ -927,12 +927,18 @@ void _mesa_error( struct gl_context *ctx, GLenum error, const char *fmtString, ... ) { GLboolean do_output, do_log; + /* Ideally this would be set up by the caller, so that we had proper IDs + * per different message. + */ + static GLuint error_msg_id = 0; + + debug_get_id(&error_msg_id); do_output = should_output(ctx, error, fmtString); do_log = should_log(ctx, MESA_DEBUG_SOURCE_API, MESA_DEBUG_TYPE_ERROR, - API_ERROR_UNKNOWN, + error_msg_id, MESA_DEBUG_SEVERITY_HIGH); if (do_output || do_log) { @@ -969,7 +975,7 @@ _mesa_error( struct gl_context *ctx, GLenum error, const char *fmtString, ... ) _mesa_log_msg(ctx, MESA_DEBUG_SOURCE_API, MESA_DEBUG_TYPE_ERROR, - API_ERROR_UNKNOWN, + error_msg_id, MESA_DEBUG_SEVERITY_HIGH, len, s2); } } diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index 0f1b321b02e..4f09513397c 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -3417,10 +3417,6 @@ struct gl_debug_msg GLcharARB *message; }; -typedef enum { - API_ERROR_UNKNOWN, -} gl_api_error; - struct gl_debug_namespace { struct _mesa_HashTable *IDs; |