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.
This commit is contained in:
Jakob Bornecrantz
2010-05-12 20:11:37 +01:00
parent 5494332128
commit 53cbb81576
31 changed files with 47 additions and 8 deletions

View File

@@ -33,6 +33,7 @@
#include "target-helpers/wrap_screen.h"
#include "trace/tr_public.h"
#include "rbug/rbug_public.h"
#include "identity/id_public.h"
#include "util/u_debug.h"
@@ -56,6 +57,9 @@ gallium_wrap_screen( struct pipe_screen *screen )
/* Trace does its own checking if it should run */
screen = trace_screen_create(screen);
/* Rbug does its own checking if it should run */
screen = rbug_screen_create(screen);
return screen;
}

View File

@@ -34,4 +34,7 @@ struct pipe_context;
struct pipe_screen *
rbug_screen_create(struct pipe_screen *screen);
boolean
rbug_enabled(void);
#endif /* RBUG_PUBLIC_H */

View File

@@ -285,6 +285,12 @@ rbug_screen_fence_finish(struct pipe_screen *_screen,
flags);
}
boolean
rbug_enabled()
{
return debug_get_option_rbug();
}
struct pipe_screen *
rbug_screen_create(struct pipe_screen *screen)
{

View File

@@ -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);

View File

@@ -38,6 +38,9 @@ struct pipe_context;
struct pipe_screen *
trace_screen_create(struct pipe_screen *screen);
boolean
trace_enabled(void);
#ifdef __cplusplus
}
#endif

View File

@@ -64,9 +64,6 @@ struct trace_screen
*/
boolean
trace_enabled(void);
struct trace_screen *
trace_screen(struct pipe_screen *screen);

View File

@@ -19,7 +19,8 @@ x11_ST = $(TOP)/src/gallium/state_trackers/egl/libeglx11.a \
$(TOP)/src/gallium/winsys/sw/xlib/libws_xlib.a \
$(TOP)/src/gallium/drivers/softpipe/libsoftpipe.a \
$(TOP)/src/gallium/drivers/identity/libidentity.a \
$(TOP)/src/gallium/drivers/trace/libtrace.a
$(TOP)/src/gallium/drivers/trace/libtrace.a \
$(TOP)/src/gallium/drivers/rbug/librbug.a
x11_LIBS = $(common_LIBS) -lX11 -lXext -lXfixes

View File

@@ -7,6 +7,7 @@ PIPE_DRIVERS = \
$(TOP)/src/gallium/state_trackers/dri/drm/libdridrm.a \
$(TOP)/src/gallium/winsys/i915/drm/libi915drm.a \
$(TOP)/src/gallium/drivers/trace/libtrace.a \
$(TOP)/src/gallium/drivers/rbug/librbug.a \
$(TOP)/src/gallium/drivers/softpipe/libsoftpipe.a \
$(TOP)/src/gallium/drivers/identity/libidentity.a \
$(TOP)/src/gallium/drivers/i915/libi915.a

View File

@@ -13,6 +13,7 @@ env.Prepend(LIBS = [
i915drm,
i915,
trace,
rbug,
mesa,
glsl,
gallium,

View File

@@ -7,6 +7,7 @@ PIPE_DRIVERS = \
$(TOP)/src/gallium/state_trackers/dri/drm/libdridrm.a \
$(TOP)/src/gallium/winsys/i965/drm/libi965drm.a \
$(TOP)/src/gallium/drivers/trace/libtrace.a \
$(TOP)/src/gallium/drivers/rbug/librbug.a \
$(TOP)/src/gallium/winsys/sw/drm/libswdrm.a \
$(TOP)/src/gallium/winsys/sw/wrapper/libwsw.a \
$(TOP)/src/gallium/drivers/softpipe/libsoftpipe.a \

View File

@@ -15,6 +15,7 @@ env.Prepend(LIBS = [
ws_wrapper,
i965,
trace,
rbug,
mesa,
glsl,
gallium,

View File

@@ -8,6 +8,7 @@ PIPE_DRIVERS = \
$(TOP)/src/gallium/winsys/radeon/drm/libradeonwinsys.a \
$(TOP)/src/gallium/drivers/softpipe/libsoftpipe.a \
$(TOP)/src/gallium/drivers/trace/libtrace.a \
$(TOP)/src/gallium/drivers/rbug/librbug.a \
$(TOP)/src/gallium/drivers/r300/libr300.a
C_SOURCES = \

View File

@@ -13,6 +13,7 @@ env.Prepend(LIBS = [
radeonwinsys,
r300,
trace,
rbug,
mesa,
glsl,
gallium,

View File

@@ -9,7 +9,8 @@ PIPE_DRIVERS = \
$(TOP)/src/gallium/state_trackers/dri/sw/libdrisw.a \
$(TOP)/src/gallium/winsys/sw/dri/libswdri.a \
$(TOP)/src/gallium/drivers/softpipe/libsoftpipe.a \
$(TOP)/src/gallium/drivers/trace/libtrace.a
$(TOP)/src/gallium/drivers/trace/libtrace.a \
$(TOP)/src/gallium/drivers/rbug/librbug.a
SWRAST_COMMON_GALLIUM_SOURCES = \
$(TOP)/src/mesa/drivers/dri/common/utils.c \

View File

@@ -10,6 +10,7 @@ env.Prepend(LIBS = [
st_drisw,
ws_dri,
trace,
rbug,
mesa,
glsl,
gallium,

View File

@@ -7,6 +7,7 @@ PIPE_DRIVERS = \
$(TOP)/src/gallium/state_trackers/dri/drm/libdridrm.a \
$(TOP)/src/gallium/winsys/svga/drm/libsvgadrm.a \
$(TOP)/src/gallium/drivers/trace/libtrace.a \
$(TOP)/src/gallium/drivers/rbug/librbug.a \
$(TOP)/src/gallium/drivers/svga/libsvga.a
C_SOURCES = \

View File

@@ -11,6 +11,7 @@ env.Prepend(LIBS = [
svgadrm,
svga,
trace,
rbug,
mesa,
glsl,
gallium,

View File

@@ -8,6 +8,7 @@ EGL_DRIVER_LIBS = -ldrm_intel
EGL_DRIVER_PIPES = \
$(TOP)/src/gallium/winsys/i915/drm/libi915drm.a \
$(TOP)/src/gallium/drivers/trace/libtrace.a \
$(TOP)/src/gallium/drivers/rbug/librbug.a \
$(TOP)/src/gallium/drivers/i915/libi915.a
include ../Makefile.egl

View File

@@ -8,6 +8,7 @@ EGL_DRIVER_LIBS = -ldrm_intel
EGL_DRIVER_PIPES = \
$(TOP)/src/gallium/winsys/i965/drm/libi965drm.a \
$(TOP)/src/gallium/drivers/trace/libtrace.a \
$(TOP)/src/gallium/drivers/rbug/librbug.a \
$(TOP)/src/gallium/drivers/i965/libi965.a \
$(TOP)/src/gallium/winsys/sw/drm/libswdrm.a \
$(TOP)/src/gallium/winsys/sw/wrapper/libwsw.a \

View File

@@ -8,6 +8,7 @@ EGL_DRIVER_LIBS = -ldrm_radeon
EGL_DRIVER_PIPES = \
$(TOP)/src/gallium/winsys/radeon/drm/libradeonwinsys.a \
$(TOP)/src/gallium/drivers/trace/libtrace.a \
$(TOP)/src/gallium/drivers/rbug/librbug.a \
$(TOP)/src/gallium/drivers/r300/libr300.a
include ../Makefile.egl

View File

@@ -8,6 +8,7 @@ EGL_DRIVER_LIBS =
EGL_DRIVER_PIPES = \
$(TOP)/src/gallium/winsys/svga/drm/libsvgadrm.a \
$(TOP)/src/gallium/drivers/trace/libtrace.a \
$(TOP)/src/gallium/drivers/rbug/librbug.a \
$(TOP)/src/gallium/drivers/svga/libsvga.a
include ../Makefile.egl

View File

@@ -8,6 +8,7 @@ env = env.Clone()
env.Prepend(LIBS = [
ws_null,
trace,
rbug,
identity,
# gallium,
])

View File

@@ -13,6 +13,7 @@ env.Tool('x11')
env.Prepend(LIBS = [
ws_xlib,
trace,
rbug,
identity,
# gallium,
])

View File

@@ -35,7 +35,7 @@ if env['platform'] == 'windows':
else:
sources += ['#src/gallium/state_trackers/wgl/opengl32.def']
drivers += [trace]
drivers += [trace, rbug]
env['no_import_lib'] = 1

View File

@@ -42,6 +42,7 @@ LIBS = \
$(TOP)/src/gallium/state_trackers/glx/xlib/libxlib.a \
$(TOP)/src/gallium/winsys/sw/xlib/libws_xlib.a \
$(TOP)/src/gallium/drivers/trace/libtrace.a \
$(TOP)/src/gallium/drivers/rbug/librbug.a \
$(TOP)/src/gallium/drivers/identity/libidentity.a \
$(TOP)/src/mapi/glapi/libglapi.a \
$(TOP)/src/mesa/libmesagallium.a \

View File

@@ -29,6 +29,7 @@ env.Prepend(LIBS = [
st_xlib,
ws_xlib,
trace,
rbug,
identity,
glapi,
mesa,

View File

@@ -20,6 +20,7 @@ LIBS = \
$(TOP)/src/gallium/winsys/i915/drm/libi915drm.a \
$(TOP)/src/gallium/drivers/i915/libi915.a \
$(TOP)/src/gallium/drivers/trace/libtrace.a \
$(TOP)/src/gallium/drivers/rbug/librbug.a \
$(TOP)/src/gallium/drivers/softpipe/libsoftpipe.a \
$(GALLIUM_AUXILIARIES)

View File

@@ -20,6 +20,7 @@ LIBS = \
$(TOP)/src/gallium/winsys/i965/drm/libi965drm.a \
$(TOP)/src/gallium/drivers/i965/libi965.a \
$(TOP)/src/gallium/drivers/trace/libtrace.a \
$(TOP)/src/gallium/drivers/rbug/librbug.a \
$(TOP)/src/gallium/drivers/softpipe/libsoftpipe.a \
$(GALLIUM_AUXILIARIES)

View File

@@ -20,6 +20,7 @@ LIBS = \
$(TOP)/src/gallium/winsys/radeon/drm/libradeonwinsys.a \
$(TOP)/src/gallium/drivers/r300/libr300.a \
$(TOP)/src/gallium/drivers/trace/libtrace.a \
$(TOP)/src/gallium/drivers/rbug/librbug.a \
$(TOP)/src/gallium/drivers/softpipe/libsoftpipe.a \
$(GALLIUM_AUXILIARIES)

View File

@@ -22,6 +22,7 @@ LIBS = \
$(TOP)/src/gallium/state_trackers/xorg/libxorgtracker.a \
$(TOP)/src/gallium/winsys/svga/drm/libsvgadrm.a \
$(TOP)/src/gallium/drivers/trace/libtrace.a \
$(TOP)/src/gallium/drivers/rbug/librbug.a \
$(TOP)/src/gallium/drivers/svga/libsvga.a \
$(GALLIUM_AUXILIARIES)

View File

@@ -39,6 +39,7 @@ if env['platform'] == 'linux':
env.Prepend(LIBS = [
trace,
rbug,
st_xorg,
svgadrm,
svga,