mesa: Add a source parameter to _mesa_gl_debug.
authorMatt Turner <mattst88@gmail.com>
Fri, 14 Nov 2014 01:35:58 +0000 (17:35 -0800)
committerMatt Turner <mattst88@gmail.com>
Sat, 6 Dec 2014 00:43:31 +0000 (16:43 -0800)
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
src/mesa/drivers/dri/i915/intel_context.h
src/mesa/drivers/dri/i915/intel_fbo.c
src/mesa/drivers/dri/i965/intel_debug.h
src/mesa/drivers/dri/i965/intel_fbo.c
src/mesa/main/errors.c
src/mesa/main/errors.h
src/mesa/main/fbobject.c

index c3145948d2db177dd6932ae28ab9a4e2efdc855d..f0773c8b668c4c50e068290b6d49ec6e15cc2c01 100644 (file)
@@ -367,6 +367,7 @@ extern int INTEL_DEBUG;
       dbg_printf(__VA_ARGS__);                                  \
    if (intel->perf_debug)                                       \
       _mesa_gl_debug(&intel->ctx, &msg_id,                      \
+                     MESA_DEBUG_SOURCE_API,                     \
                      MESA_DEBUG_TYPE_PERFORMANCE,               \
                      MESA_DEBUG_SEVERITY_MEDIUM,                \
                      __VA_ARGS__);                              \
@@ -382,6 +383,7 @@ extern int INTEL_DEBUG;
          _warned = true;                                        \
                                                                 \
          _mesa_gl_debug(ctx, &msg_id,                           \
+                        MESA_DEBUG_SOURCE_API,                  \
                         MESA_DEBUG_TYPE_OTHER,                  \
                         MESA_DEBUG_SEVERITY_HIGH, fmt);         \
       }                                                         \
index b260d16ad496ac8a294ca06fc8df725b1f57bf95..e138b854e3325bab242c85d2542a36df21e396ef 100644 (file)
@@ -546,6 +546,7 @@ intel_finish_render_texture(struct gl_context * ctx, struct gl_renderbuffer *rb)
       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_OTHER,                                \
                         MESA_DEBUG_SEVERITY_MEDIUM,                           \
                         __VA_ARGS__);                                         \
index e859be1084c8ec9804286c98eb5ce6a616c9c7b4..e693e9c600d1d44386073f60bda370282bab0186 100644 (file)
@@ -86,6 +86,7 @@ extern uint64_t INTEL_DEBUG;
       dbg_printf(__VA_ARGS__);                                  \
    if (brw->perf_debug)                                         \
       _mesa_gl_debug(&brw->ctx, &msg_id,                        \
+                     MESA_DEBUG_SOURCE_API,                     \
                      MESA_DEBUG_TYPE_PERFORMANCE,               \
                      MESA_DEBUG_SEVERITY_MEDIUM,                \
                      __VA_ARGS__);                              \
@@ -101,6 +102,7 @@ extern uint64_t INTEL_DEBUG;
          _warned = true;                                        \
                                                                 \
          _mesa_gl_debug(ctx, &msg_id,                           \
+                        MESA_DEBUG_SOURCE_API,                  \
                         MESA_DEBUG_TYPE_OTHER,                  \
                         MESA_DEBUG_SEVERITY_HIGH, fmt);         \
       }                                                         \
index 4a03b572997afdad289d43ed101709d8753050ab..d56fc5bcefd3af1080a551a951b952097f6c2a5c 100644 (file)
@@ -638,6 +638,7 @@ intel_render_texture(struct gl_context * ctx,
       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_OTHER,                                \
                         MESA_DEBUG_SEVERITY_MEDIUM,                           \
                         __VA_ARGS__);                                         \
index 7d622bb16cf2f6f09e04e00ae6818936e779c5d9..4e7853b9066209ca3ecf3c53bf16fb340b8c8492 100644 (file)
@@ -1395,6 +1395,7 @@ should_output(struct gl_context *ctx, GLenum error, const char *fmtString)
 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, ...)
@@ -1409,7 +1410,7 @@ _mesa_gl_debug(struct gl_context *ctx,
    len = _mesa_vsnprintf(s, MAX_DEBUG_MESSAGE_LENGTH, fmtString, args);
    va_end(args);
 
-   log_msg(ctx, MESA_DEBUG_SOURCE_API, type, *id, severity, len, s);
+   log_msg(ctx, source, type, *id, severity, len, s);
 }
 
 
index b388138e84d611c69a317a9010710fe32660c701..89d4d58b0dabaf2ded10d4bff78b6a5c095d5633 100644 (file)
@@ -72,14 +72,16 @@ _mesa_debug( const struct gl_context *ctx, const char *fmtString, ... ) PRINTFLI
 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__);                                        \
index 8283373a4e47c3e3b92e1e785afddd2e770e6ba1..02b76339049f7e4342be51f26d17fab34f37443f 100644 (file)
@@ -599,6 +599,7 @@ fbo_incomplete(struct gl_context *ctx, const char *msg, int index)
    static GLuint msg_id;
 
    _mesa_gl_debug(ctx, &msg_id,
+                  MESA_DEBUG_SOURCE_API,
                   MESA_DEBUG_TYPE_OTHER,
                   MESA_DEBUG_SEVERITY_MEDIUM,
                   "FBO incomplete: %s [%d]\n", msg, index);