From 63e38bd0f6a1958f174a98e4b06be3fb152048b4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Tue, 14 Jun 2011 01:23:20 +0200 Subject: [PATCH] target-helpers: remove copy-pasted function inline_noop_helper --- .../auxiliary/target-helpers/inline_debug_helper.h | 8 ++++ .../auxiliary/target-helpers/inline_noop_helper.h | 51 ---------------------- src/gallium/targets/dri-r600/target.c | 2 +- 3 files changed, 9 insertions(+), 52 deletions(-) delete mode 100644 src/gallium/auxiliary/target-helpers/inline_noop_helper.h diff --git a/src/gallium/auxiliary/target-helpers/inline_debug_helper.h b/src/gallium/auxiliary/target-helpers/inline_debug_helper.h index 0433da6..c6630c4 100644 --- a/src/gallium/auxiliary/target-helpers/inline_debug_helper.h +++ b/src/gallium/auxiliary/target-helpers/inline_debug_helper.h @@ -22,6 +22,10 @@ #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) { @@ -38,6 +42,10 @@ debug_screen_wrap(struct pipe_screen *screen) screen = galahad_screen_create(screen); #endif +#if defined(GALLIUM_NOOP) + screen = noop_screen_create(screen); +#endif + return screen; } diff --git a/src/gallium/auxiliary/target-helpers/inline_noop_helper.h b/src/gallium/auxiliary/target-helpers/inline_noop_helper.h deleted file mode 100644 index 77c7cfd..0000000 --- a/src/gallium/auxiliary/target-helpers/inline_noop_helper.h +++ /dev/null @@ -1,51 +0,0 @@ - -#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 diff --git a/src/gallium/targets/dri-r600/target.c b/src/gallium/targets/dri-r600/target.c index 2fe3454..8753e2b 100644 --- a/src/gallium/targets/dri-r600/target.c +++ b/src/gallium/targets/dri-r600/target.c @@ -1,5 +1,5 @@ #include "state_tracker/drm_driver.h" -#include "target-helpers/inline_noop_helper.h" +#include "target-helpers/inline_debug_helper.h" #include "r600/drm/r600_drm_public.h" #include "r600/r600_public.h" -- 2.7.4