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 DEBUG 14 15 #ifdef GALLIUM_TRACE 16 #include "trace/tr_public.h" 17 #endif 18 19 #ifdef GALLIUM_RBUG 20 #include "rbug/rbug_public.h" 21 #endif 22 23 #ifdef GALLIUM_GALAHAD 24 #include "galahad/glhd_public.h" 25 #endif 26 27 #ifdef GALLIUM_NOOP 28 #include "noop/noop_public.h" 29 #endif 30 31 #endif /* DEBUG */ 32 33 static INLINE struct pipe_screen * 34 debug_screen_wrap(struct pipe_screen *screen) 35 { 36 #ifdef DEBUG 37 38 #if defined(GALLIUM_RBUG) 39 screen = rbug_screen_create(screen); 40 #endif 41 42 #if defined(GALLIUM_TRACE) 43 screen = trace_screen_create(screen); 44 #endif 45 46 #if defined(GALLIUM_GALAHAD) 47 screen = galahad_screen_create(screen); 48 #endif 49 50 #if defined(GALLIUM_NOOP) 51 screen = noop_screen_create(screen); 52 #endif 53 54 #endif /* DEBUG */ 55 56 return screen; 57 } 58 59 #endif 60