From 53cbb81576671d6d39e6a353e79ebda2c512d735 Mon Sep 17 00:00:00 2001 From: Jakob Bornecrantz Date: Wed, 12 May 2010 20:11:37 +0100 Subject: rbug: Add to all targets that link against trace Also added calls to the create function in target helpers and in tr_drm.c the latter being a hack and should be replaced with the wrap screen target helper. But at least this way we don't regress. --- src/gallium/drivers/trace/tr_drm.c | 6 ++++-- src/gallium/drivers/trace/tr_public.h | 3 +++ src/gallium/drivers/trace/tr_screen.h | 3 --- 3 files changed, 7 insertions(+), 5 deletions(-) (limited to 'src/gallium/drivers/trace') diff --git a/src/gallium/drivers/trace/tr_drm.c b/src/gallium/drivers/trace/tr_drm.c index 0dc8cca264..43a4b296de 100644 --- a/src/gallium/drivers/trace/tr_drm.c +++ b/src/gallium/drivers/trace/tr_drm.c @@ -28,6 +28,8 @@ #include "state_tracker/drm_api.h" #include "util/u_memory.h" +#include "rbug/rbug_public.h" +#include "tr_screen.h" #include "tr_drm.h" #include "tr_screen.h" #include "tr_public.h" @@ -61,7 +63,7 @@ trace_drm_create_screen(struct drm_api *_api, int fd, screen = api->create_screen(api, fd, arg); - return trace_screen_create(screen); + return trace_screen_create(rbug_screen_create(screen)); } static void @@ -84,7 +86,7 @@ trace_drm_create(struct drm_api *api) if (!api) goto error; - if (!trace_enabled()) + if (!trace_enabled() && !rbug_enabled()) goto error; tr_api = CALLOC_STRUCT(trace_drm_api); diff --git a/src/gallium/drivers/trace/tr_public.h b/src/gallium/drivers/trace/tr_public.h index 62e217097d..aee4937dd4 100644 --- a/src/gallium/drivers/trace/tr_public.h +++ b/src/gallium/drivers/trace/tr_public.h @@ -38,6 +38,9 @@ struct pipe_context; struct pipe_screen * trace_screen_create(struct pipe_screen *screen); +boolean +trace_enabled(void); + #ifdef __cplusplus } #endif diff --git a/src/gallium/drivers/trace/tr_screen.h b/src/gallium/drivers/trace/tr_screen.h index 9fadb0d70a..3598ceaa20 100644 --- a/src/gallium/drivers/trace/tr_screen.h +++ b/src/gallium/drivers/trace/tr_screen.h @@ -64,9 +64,6 @@ struct trace_screen */ -boolean -trace_enabled(void); - struct trace_screen * trace_screen(struct pipe_screen *screen); -- cgit v1.2.3