aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/target-helpers
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/auxiliary/target-helpers')
-rw-r--r--src/gallium/auxiliary/target-helpers/inline_debug_helper.h26
1 files changed, 26 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
index 85563769408..2443bf21468 100644
--- a/src/gallium/auxiliary/target-helpers/inline_debug_helper.h
+++ b/src/gallium/auxiliary/target-helpers/inline_debug_helper.h
@@ -11,18 +11,44 @@
* one or more debug driver: rbug, trace.
*/
+#ifdef GALLIUM_DDEBUG
#include "ddebug/dd_public.h"
+#endif
+
+#ifdef GALLIUM_TRACE
#include "trace/tr_public.h"
+#endif
+
+#ifdef GALLIUM_RBUG
#include "rbug/rbug_public.h"
+#endif
+
+#ifdef GALLIUM_NOOP
#include "noop/noop_public.h"
+#endif
+/*
+ * TODO: Audit the following *screen_create() - all of
+ * them should return the original screen on failuire.
+ */
static inline struct pipe_screen *
debug_screen_wrap(struct pipe_screen *screen)
{
+#if defined(GALLIUM_DDEBUG)
screen = ddebug_screen_create(screen);
+#endif
+
+#if defined(GALLIUM_RBUG)
screen = rbug_screen_create(screen);
+#endif
+
+#if defined(GALLIUM_TRACE)
screen = trace_screen_create(screen);
+#endif
+
+#if defined(GALLIUM_NOOP)
screen = noop_screen_create(screen);
+#endif
if (debug_get_bool_option("GALLIUM_TESTS", FALSE))
util_run_tests(screen);