target-helpers: add a note about debug wrappers
[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
8
9 /* Helper function to wrap a screen with
10 * one or more debug driver: rbug, trace.
11 */
12
13 #ifdef GALLIUM_TRACE
14 #include "trace/tr_public.h"
15 #endif
16
17 #ifdef GALLIUM_RBUG
18 #include "rbug/rbug_public.h"
19 #endif
20
21 #ifdef GALLIUM_GALAHAD
22 #include "galahad/glhd_public.h"
23 #endif
24
25 #ifdef GALLIUM_NOOP
26 #include "noop/noop_public.h"
27 #endif
28
29 /*
30 * TODO: Audit the following *screen_create() - all of
31 * them should return the original screen on failuire.
32 */
33 static INLINE struct pipe_screen *
34 debug_screen_wrap(struct pipe_screen *screen)
35 {
36 #if defined(GALLIUM_RBUG)
37 screen = rbug_screen_create(screen);
38 #endif
39
40 #if defined(GALLIUM_TRACE)
41 screen = trace_screen_create(screen);
42 #endif
43
44 #if defined(GALLIUM_GALAHAD)
45 screen = galahad_screen_create(screen);
46 #endif
47
48 #if defined(GALLIUM_NOOP)
49 screen = noop_screen_create(screen);
50 #endif
51
52 return screen;
53 }
54
55 #endif