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 <jordan.l.justen@intel.com>
This commit is contained in:
@@ -927,12 +927,18 @@ void
|
|||||||
_mesa_error( struct gl_context *ctx, GLenum error, const char *fmtString, ... )
|
_mesa_error( struct gl_context *ctx, GLenum error, const char *fmtString, ... )
|
||||||
{
|
{
|
||||||
GLboolean do_output, do_log;
|
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_output = should_output(ctx, error, fmtString);
|
||||||
do_log = should_log(ctx,
|
do_log = should_log(ctx,
|
||||||
MESA_DEBUG_SOURCE_API,
|
MESA_DEBUG_SOURCE_API,
|
||||||
MESA_DEBUG_TYPE_ERROR,
|
MESA_DEBUG_TYPE_ERROR,
|
||||||
API_ERROR_UNKNOWN,
|
error_msg_id,
|
||||||
MESA_DEBUG_SEVERITY_HIGH);
|
MESA_DEBUG_SEVERITY_HIGH);
|
||||||
|
|
||||||
if (do_output || do_log) {
|
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_log_msg(ctx,
|
||||||
MESA_DEBUG_SOURCE_API,
|
MESA_DEBUG_SOURCE_API,
|
||||||
MESA_DEBUG_TYPE_ERROR,
|
MESA_DEBUG_TYPE_ERROR,
|
||||||
API_ERROR_UNKNOWN,
|
error_msg_id,
|
||||||
MESA_DEBUG_SEVERITY_HIGH, len, s2);
|
MESA_DEBUG_SEVERITY_HIGH, len, s2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -3417,10 +3417,6 @@ struct gl_debug_msg
|
|||||||
GLcharARB *message;
|
GLcharARB *message;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef enum {
|
|
||||||
API_ERROR_UNKNOWN,
|
|
||||||
} gl_api_error;
|
|
||||||
|
|
||||||
struct gl_debug_namespace
|
struct gl_debug_namespace
|
||||||
{
|
{
|
||||||
struct _mesa_HashTable *IDs;
|
struct _mesa_HashTable *IDs;
|
||||||
|
Reference in New Issue
Block a user