gallium: build ddebug, noop, rbug, trace as part of auxiliary
[mesa.git] / src / gallium / auxiliary / target-helpers / inline_debug_helper.h
1
2 #ifndef INLINE_DEBUG_HELPER_H
3 #define INLINE_DEBUG_HELPER_H
4
5 #include "pipe/p_compiler.h"
6 #include "util/u_debug.h"
7 #include "util/u_tests.h"
8
9
10 /* Helper function to wrap a screen with
11 * one or more debug driver: rbug, trace.
12 */
13
14 #include "ddebug/dd_public.h"
15 #include "trace/tr_public.h"
16 #include "rbug/rbug_public.h"
17 #include "noop/noop_public.h"
18
19 static inline struct pipe_screen *
20 debug_screen_wrap(struct pipe_screen *screen)
21 {
22 screen = ddebug_screen_create(screen);
23 screen = rbug_screen_create(screen);
24 screen = trace_screen_create(screen);
25 screen = noop_screen_create(screen);
26
27 if (debug_get_bool_option("GALLIUM_TESTS", FALSE))
28 util_run_tests(screen);
29
30 return screen;
31 }
32
33 #endif