2 #ifndef INLINE_DEBUG_HELPER_H
3 #define INLINE_DEBUG_HELPER_H
5 #include "pipe/p_compiler.h"
6 #include "util/u_debug.h"
9 /* Helper function to wrap a screen with
10 * one or more debug driver: rbug, trace.
14 #include "trace/tr_public.h"
18 #include "rbug/rbug_public.h"
21 #ifdef GALLIUM_GALAHAD
22 #include "galahad/glhd_public.h"
26 #include "noop/noop_public.h"
30 * TODO: Audit the following *screen_create() - all of
31 * them should return the original screen on failuire.
33 static INLINE
struct pipe_screen
*
34 debug_screen_wrap(struct pipe_screen
*screen
)
36 #if defined(GALLIUM_RBUG)
37 screen
= rbug_screen_create(screen
);
40 #if defined(GALLIUM_TRACE)
41 screen
= trace_screen_create(screen
);
44 #if defined(GALLIUM_GALAHAD)
45 screen
= galahad_screen_create(screen
);
48 #if defined(GALLIUM_NOOP)
49 screen
= noop_screen_create(screen
);