Mesa (master): mesa/glthread: print out syncs when MARSHAL_MAX_CMD_SIZE is exceeded
Timothy Arceri
tarceri at kemper.freedesktop.org
Wed Mar 29 21:25:40 UTC 2017
Module: Mesa
Branch: master
Commit: 1ea73b9c61e576cfeb33dda39847e6dc9d8099c2
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=1ea73b9c61e576cfeb33dda39847e6dc9d8099c2
Author: Timothy Arceri <tarceri at itsqueeze.com>
Date: Wed Mar 29 13:20:36 2017 +1100
mesa/glthread: print out syncs when MARSHAL_MAX_CMD_SIZE is exceeded
Reviewed-by: Nicolai Hähnle <nicolai.haehnle at amd.com>
---
src/mapi/glapi/gen/gl_marshal.py | 1 +
src/mesa/main/marshal.h | 13 +++++++++++++
2 files changed, 14 insertions(+)
diff --git a/src/mapi/glapi/gen/gl_marshal.py b/src/mapi/glapi/gen/gl_marshal.py
index c89d3970c2..9639f9cdb9 100644
--- a/src/mapi/glapi/gen/gl_marshal.py
+++ b/src/mapi/glapi/gen/gl_marshal.py
@@ -91,6 +91,7 @@ class PrintCode(gl_XML.gl_print_base):
def print_sync_dispatch(self, func):
out('_mesa_glthread_finish(ctx);')
+ out('debug_print_sync_fallback("{0}");'.format(func.name))
self.print_sync_call(func)
def print_sync_body(self, func):
diff --git a/src/mesa/main/marshal.h b/src/mesa/main/marshal.h
index 52339aa1db..3d104240af 100644
--- a/src/mesa/main/marshal.h
+++ b/src/mesa/main/marshal.h
@@ -119,6 +119,19 @@ _mesa_glthread_is_non_vbo_draw_elements(const struct gl_context *ctx)
#define DEBUG_MARSHAL_PRINT_CALLS 0
+/**
+ * This is printed when we have fallen back to a sync. This can happen when
+ * MARSHAL_MAX_CMD_SIZE is exceeded.
+ */
+static inline void
+debug_print_sync_fallback(const char *func)
+{
+#if DEBUG_MARSHAL_PRINT_CALLS
+ printf("fallback to sync: %s\n", func);
+#endif
+}
+
+
static inline void
debug_print_sync(const char *func)
{
More information about the mesa-commit
mailing list