"Fossies" - the Fresh Open Source Software Archive

Member "mesa-20.1.8/src/gallium/auxiliary/target-helpers/inline_debug_helper.h" (16 Sep 2020, 940 Bytes) of package /linux/misc/mesa-20.1.8.tar.xz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "inline_debug_helper.h" see the Fossies "Dox" file reference documentation.

    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 #include "util/u_tests.h"
    8 
    9 
   10 /* Helper function to wrap a screen with
   11  * one or more debug drivers.
   12  */
   13 
   14 #include "driver_ddebug/dd_public.h"
   15 #include "driver_trace/tr_public.h"
   16 #include "driver_rbug/rbug_public.h"
   17 #include "driver_noop/noop_public.h"
   18 
   19 #ifdef __cplusplus
   20 extern "C" {
   21 #endif
   22 
   23 /*
   24  * TODO: Audit the following *screen_create() - all of
   25  * them should return the original screen on failuire.
   26  */
   27 static inline struct pipe_screen *
   28 debug_screen_wrap(struct pipe_screen *screen)
   29 {
   30    screen = ddebug_screen_create(screen);
   31    screen = rbug_screen_create(screen);
   32    screen = trace_screen_create(screen);
   33    screen = noop_screen_create(screen);
   34 
   35    if (debug_get_bool_option("GALLIUM_TESTS", FALSE))
   36       util_run_tests(screen);
   37 
   38    return screen;
   39 }
   40 
   41 #ifdef __cplusplus
   42 }
   43 #endif
   44 
   45 #endif // INLINE_DEBUG_HELPER_H