Merge remote branch 'origin/master' into glsl2
[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 static INLINE struct pipe_screen *
26 debug_screen_wrap(struct pipe_screen *screen)
27 {
28
29 #if defined(GALLIUM_RBUG)
30 screen = rbug_screen_create(screen);
31 #endif
32
33 #if defined(GALLIUM_TRACE)
34 screen = trace_screen_create(screen);
35 #endif
36
37 #if defined(GALLIUM_GALAHAD)
38 screen = galahad_screen_create(screen);
39 #endif
40
41 return screen;
42 }
43
44 #endif