mesa/glthread: print out syncs when MARSHAL_MAX_CMD_SIZE is exceeded
authorTimothy Arceri <tarceri@itsqueeze.com>
Wed, 29 Mar 2017 02:20:36 +0000 (13:20 +1100)
committerTimothy Arceri <tarceri@itsqueeze.com>
Wed, 29 Mar 2017 21:19:07 +0000 (08:19 +1100)
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
src/mapi/glapi/gen/gl_marshal.py
src/mesa/main/marshal.h

index c89d3970c20ee830881c93bb41fee5bbc11b1edc..9639f9cdb9eeab3199d974c605b29414c46c7a9d 100644 (file)
@@ -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):
index 52339aa1db2e0986ff0416e0f7c5e77b1bbdbf98..3d104240afe5d5795cbe2352c67f8409a424c245 100644 (file)
@@ -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)
 {