Path: blob/21.2-virgl/src/gallium/auxiliary/target-helpers/inline_debug_helper.h
4561 views
1#ifndef INLINE_DEBUG_HELPER_H2#define INLINE_DEBUG_HELPER_H34#include "pipe/p_compiler.h"5#include "util/u_debug.h"6#include "util/u_tests.h"789/* Helper function to wrap a screen with10* one or more debug drivers.11*/1213#include "driver_ddebug/dd_public.h"14#include "driver_trace/tr_public.h"15#include "driver_rbug/rbug_public.h"16#include "driver_noop/noop_public.h"1718#ifdef __cplusplus19extern "C" {20#endif2122/*23* TODO: Audit the following *screen_create() - all of24* them should return the original screen on failuire.25*/26static inline struct pipe_screen *27debug_screen_wrap(struct pipe_screen *screen)28{29screen = ddebug_screen_create(screen);30screen = rbug_screen_create(screen);31screen = trace_screen_create(screen);32screen = noop_screen_create(screen);3334if (debug_get_bool_option("GALLIUM_TESTS", FALSE))35util_run_tests(screen);3637return screen;38}3940#ifdef __cplusplus41}42#endif4344#endif // INLINE_DEBUG_HELPER_H454647