mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 02:10:11 +01:00
gallium: Add debug target helper
This commit is contained in:
parent
59981d418f
commit
ea1786ec5b
1 changed files with 36 additions and 0 deletions
36
src/gallium/auxiliary/target-helpers/inline_debug_helper.h
Normal file
36
src/gallium/auxiliary/target-helpers/inline_debug_helper.h
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
|
||||
#ifndef INLINE_DEBUG_HELPER_H
|
||||
#define INLINE_DEBUG_HELPER_H
|
||||
|
||||
#include "pipe/p_compiler.h"
|
||||
#include "util/u_debug.h"
|
||||
|
||||
|
||||
/* Helper function to wrap a screen with
|
||||
* one or more debug driver: rbug, trace.
|
||||
*/
|
||||
|
||||
#ifdef GALLIUM_TRACE
|
||||
#include "trace/tr_public.h"
|
||||
#endif
|
||||
|
||||
#ifdef GALLIUM_RBUG
|
||||
#include "rbug/rbug_public.h"
|
||||
#endif
|
||||
|
||||
static INLINE struct pipe_screen *
|
||||
debug_screen_wrap(struct pipe_screen *screen)
|
||||
{
|
||||
|
||||
#if defined(GALLIUM_RBUG)
|
||||
screen = rbug_screen_create(screen);
|
||||
#endif
|
||||
|
||||
#if defined(GALLIUM_TRACE)
|
||||
screen = trace_screen_create(screen);
|
||||
#endif
|
||||
|
||||
return screen;
|
||||
}
|
||||
|
||||
#endif
|
||||
Loading…
Add table
Reference in a new issue