diff options
author | Jerome Glisse <[email protected]> | 2011-01-09 21:04:41 -0500 |
---|---|---|
committer | Jerome Glisse <[email protected]> | 2011-01-09 21:04:41 -0500 |
commit | 3349517351059dcd70a81b31bdffe9835bd8f216 (patch) | |
tree | 8a16fcabdc11f69cd14d1bb2fcdecd0354759c44 /src/gallium/auxiliary | |
parent | ac6306e9ca904ae9674bf2a15222efe4cb861bf5 (diff) |
noop: make noop useable like trace or rbug
If you want to enable noop set GALLIUM_NOOP=1 as an env variable.
You need first to enable noop wrapping for your driver see change
to src/gallium/targets/dri-r600/ in this commit as an example.
Signed-off-by: Jerome Glisse <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary')
-rw-r--r-- | src/gallium/auxiliary/target-helpers/inline_noop_helper.h | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/target-helpers/inline_noop_helper.h b/src/gallium/auxiliary/target-helpers/inline_noop_helper.h new file mode 100644 index 00000000000..77c7cfd0c20 --- /dev/null +++ b/src/gallium/auxiliary/target-helpers/inline_noop_helper.h @@ -0,0 +1,51 @@ + +#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 + +#ifdef GALLIUM_GALAHAD +#include "galahad/glhd_public.h" +#endif + +#ifdef GALLIUM_NOOP +#include "noop/noop_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 + +#if defined(GALLIUM_GALAHAD) + screen = galahad_screen_create(screen); +#endif + +#if defined(GALLIUM_NOOP) + screen = noop_screen_create(screen); +#endif + + return screen; +} + +#endif |