Mesa (gallium-drm-driver-descriptor): gallium: Add debug target helper

Jakob Bornecrantz wallbraker at kemper.freedesktop.org
Wed Jun 23 17:20:41 PDT 2010


Module: Mesa
Branch: gallium-drm-driver-descriptor
Commit: ea1786ec5b1385fe26927e206ca81d87ca70ca6a
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=ea1786ec5b1385fe26927e206ca81d87ca70ca6a

Author: Jakob Bornecrantz <jakob at vmware.com>
Date:   Thu Jun 24 00:50:08 2010 +0200

gallium: Add debug target helper

---

 .../auxiliary/target-helpers/inline_debug_helper.h |   36 ++++++++++++++++++++
 1 files changed, 36 insertions(+), 0 deletions(-)

diff --git a/src/gallium/auxiliary/target-helpers/inline_debug_helper.h b/src/gallium/auxiliary/target-helpers/inline_debug_helper.h
new file mode 100644
index 0000000..1bc329c
--- /dev/null
+++ b/src/gallium/auxiliary/target-helpers/inline_debug_helper.h
@@ -0,0 +1,36 @@
+
+#ifndef INLINE_DEBUG_HELPER_H
+#define INLINE_DEBUG_HELPER_H
+
+#include "pipe/p_compiler.h"
+#include "util/u_debug.h"
+
+
+/* Helper function to wrap a screen with
+ * one or more debug driver: rbug, trace.
+ */
+
+#ifdef GALLIUM_TRACE
+#include "trace/tr_public.h"
+#endif
+
+#ifdef GALLIUM_RBUG
+#include "rbug/rbug_public.h"
+#endif
+
+static INLINE struct pipe_screen *
+debug_screen_wrap(struct pipe_screen *screen)
+{
+
+#if defined(GALLIUM_RBUG)
+   screen = rbug_screen_create(screen);
+#endif
+
+#if defined(GALLIUM_TRACE)
+   screen = trace_screen_create(screen);
+#endif
+
+   return screen;
+}
+
+#endif



More information about the mesa-commit mailing list