summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/errors.h
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2013-04-12 20:16:41 -0700
committerEric Anholt <eric@anholt.net>2013-04-21 12:28:03 -0700
commite86170c2b88f9970a124479bbf47b5a7cd43d628 (patch)
treeaaa4b5f59d4bc184bbb52234eabc42c7b5867681 /src/mesa/main/errors.h
parentcbe8b75b586b22006783af0ed1ebba87b00ce61a (diff)
downloadexternal_mesa3d-e86170c2b88f9970a124479bbf47b5a7cd43d628.zip
external_mesa3d-e86170c2b88f9970a124479bbf47b5a7cd43d628.tar.gz
external_mesa3d-e86170c2b88f9970a124479bbf47b5a7cd43d628.tar.bz2
mesa: Add performance debug for meta code.
I noticed a fallback in regnum through sysprof, and wanted a nicer way to get information about it. Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Diffstat (limited to 'src/mesa/main/errors.h')
-rw-r--r--src/mesa/main/errors.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/mesa/main/errors.h b/src/mesa/main/errors.h
index 7d8be5a..1677971 100644
--- a/src/mesa/main/errors.h
+++ b/src/mesa/main/errors.h
@@ -73,6 +73,16 @@ _mesa_gl_debug(struct gl_context *ctx,
enum mesa_debug_severity severity,
const char *fmtString, ...) PRINTFLIKE(5, 6);
+#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_TYPE_PERFORMANCE, \
+ sev, \
+ __VA_ARGS__); \
+ } \
+} while (0)
+
extern void
_mesa_shader_debug(struct gl_context *ctx, GLenum type, GLuint *id,
const char *msg, int len);