summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakob Bornecrantz <jakob@vmware.com>2010-05-12 20:11:37 +0100
committerJakob Bornecrantz <jakob@vmware.com>2010-05-12 20:15:23 +0100
commit53cbb81576671d6d39e6a353e79ebda2c512d735 (patch)
tree86affe2ce5b536a34b471a44daaf2a6c1059fb0c
parent5494332128da0b2826e85df5eeaa878bb5c30a4e (diff)
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.
-rw-r--r--src/gallium/auxiliary/target-helpers/wrap_screen.c4
-rw-r--r--src/gallium/drivers/rbug/rbug_public.h3
-rw-r--r--src/gallium/drivers/rbug/rbug_screen.c6
-rw-r--r--src/gallium/drivers/trace/tr_drm.c6
-rw-r--r--src/gallium/drivers/trace/tr_public.h3
-rw-r--r--src/gallium/drivers/trace/tr_screen.h3
-rw-r--r--src/gallium/targets/Makefile.egl3
-rw-r--r--src/gallium/targets/dri-i915/Makefile1
-rw-r--r--src/gallium/targets/dri-i915/SConscript1
-rw-r--r--src/gallium/targets/dri-i965/Makefile1
-rw-r--r--src/gallium/targets/dri-i965/SConscript1
-rw-r--r--src/gallium/targets/dri-radeong/Makefile1
-rw-r--r--src/gallium/targets/dri-radeong/SConscript1
-rw-r--r--src/gallium/targets/dri-swrast/Makefile3
-rw-r--r--src/gallium/targets/dri-swrast/SConscript1
-rw-r--r--src/gallium/targets/dri-vmwgfx/Makefile1
-rw-r--r--src/gallium/targets/dri-vmwgfx/SConscript1
-rw-r--r--src/gallium/targets/egl-i915/Makefile1
-rw-r--r--src/gallium/targets/egl-i965/Makefile1
-rw-r--r--src/gallium/targets/egl-radeon/Makefile1
-rw-r--r--src/gallium/targets/egl-vmwgfx/Makefile1
-rw-r--r--src/gallium/targets/graw-null/SConscript1
-rw-r--r--src/gallium/targets/graw-xlib/SConscript1
-rw-r--r--src/gallium/targets/libgl-gdi/SConscript2
-rw-r--r--src/gallium/targets/libgl-xlib/Makefile1
-rw-r--r--src/gallium/targets/libgl-xlib/SConscript1
-rw-r--r--src/gallium/targets/xorg-i915/Makefile1
-rw-r--r--src/gallium/targets/xorg-i965/Makefile1
-rw-r--r--src/gallium/targets/xorg-radeon/Makefile1
-rw-r--r--src/gallium/targets/xorg-vmwgfx/Makefile1
-rw-r--r--src/gallium/targets/xorg-vmwgfx/SConscript1
31 files changed, 47 insertions, 8 deletions
diff --git a/src/gallium/auxiliary/target-helpers/wrap_screen.c b/src/gallium/auxiliary/target-helpers/wrap_screen.c
index eb47512319..df5d56a53c 100644
--- a/src/gallium/auxiliary/target-helpers/wrap_screen.c
+++ b/src/gallium/auxiliary/target-helpers/wrap_screen.c
@@ -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;
}
diff --git a/src/gallium/drivers/rbug/rbug_public.h b/src/gallium/drivers/rbug/rbug_public.h
index f3cb19a340..b66740b49c 100644
--- a/src/gallium/drivers/rbug/rbug_public.h
+++ b/src/gallium/drivers/rbug/rbug_public.h
@@ -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 */
diff --git a/src/gallium/drivers/rbug/rbug_screen.c b/src/gallium/drivers/rbug/rbug_screen.c
index acdb1f6dc0..7d7b9247c3 100644
--- a/src/gallium/drivers/rbug/rbug_screen.c
+++ b/src/gallium/drivers/rbug/rbug_screen.c
@@ -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)
{
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);
diff --git a/src/gallium/targets/Makefile.egl b/src/gallium/targets/Makefile.egl
index 604841f710..f26ffb8ad4 100644
--- a/src/gallium/targets/Makefile.egl
+++ b/src/gallium/targets/Makefile.egl
@@ -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
diff --git a/src/gallium/targets/dri-i915/Makefile b/src/gallium/targets/dri-i915/Makefile
index 50a8e11e17..fdcfd08c22 100644
--- a/src/gallium/targets/dri-i915/Makefile
+++ b/src/gallium/targets/dri-i915/Makefile
@@ -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
diff --git a/src/gallium/targets/dri-i915/SConscript b/src/gallium/targets/dri-i915/SConscript
index 2fcc8028f1..65c4239887 100644
--- a/src/gallium/targets/dri-i915/SConscript
+++ b/src/gallium/targets/dri-i915/SConscript
@@ -13,6 +13,7 @@ env.Prepend(LIBS = [
i915drm,
i915,
trace,
+ rbug,
mesa,
glsl,
gallium,
diff --git a/src/gallium/targets/dri-i965/Makefile b/src/gallium/targets/dri-i965/Makefile
index e267ba3a02..13987c643e 100644
--- a/src/gallium/targets/dri-i965/Makefile
+++ b/src/gallium/targets/dri-i965/Makefile
@@ -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 \
diff --git a/src/gallium/targets/dri-i965/SConscript b/src/gallium/targets/dri-i965/SConscript
index 115530c5eb..13ac5a2d8e 100644
--- a/src/gallium/targets/dri-i965/SConscript
+++ b/src/gallium/targets/dri-i965/SConscript
@@ -15,6 +15,7 @@ env.Prepend(LIBS = [
ws_wrapper,
i965,
trace,
+ rbug,
mesa,
glsl,
gallium,
diff --git a/src/gallium/targets/dri-radeong/Makefile b/src/gallium/targets/dri-radeong/Makefile
index 66dd392b68..8ef24c0821 100644
--- a/src/gallium/targets/dri-radeong/Makefile
+++ b/src/gallium/targets/dri-radeong/Makefile
@@ -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 = \
diff --git a/src/gallium/targets/dri-radeong/SConscript b/src/gallium/targets/dri-radeong/SConscript
index d926c27288..4c6cfb84eb 100644
--- a/src/gallium/targets/dri-radeong/SConscript
+++ b/src/gallium/targets/dri-radeong/SConscript
@@ -13,6 +13,7 @@ env.Prepend(LIBS = [
radeonwinsys,
r300,
trace,
+ rbug,
mesa,
glsl,
gallium,
diff --git a/src/gallium/targets/dri-swrast/Makefile b/src/gallium/targets/dri-swrast/Makefile
index 3db9781c20..0a53eb56c4 100644
--- a/src/gallium/targets/dri-swrast/Makefile
+++ b/src/gallium/targets/dri-swrast/Makefile
@@ -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 \
diff --git a/src/gallium/targets/dri-swrast/SConscript b/src/gallium/targets/dri-swrast/SConscript
index 77f44384d0..679afab41c 100644
--- a/src/gallium/targets/dri-swrast/SConscript
+++ b/src/gallium/targets/dri-swrast/SConscript
@@ -10,6 +10,7 @@ env.Prepend(LIBS = [
st_drisw,
ws_dri,
trace,
+ rbug,
mesa,
glsl,
gallium,
diff --git a/src/gallium/targets/dri-vmwgfx/Makefile b/src/gallium/targets/dri-vmwgfx/Makefile
index 4b002e828f..b5b679f3c7 100644
--- a/src/gallium/targets/dri-vmwgfx/Makefile
+++ b/src/gallium/targets/dri-vmwgfx/Makefile
@@ -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 = \
diff --git a/src/gallium/targets/dri-vmwgfx/SConscript b/src/gallium/targets/dri-vmwgfx/SConscript
index 6a1f8827bc..09a0c254c3 100644
--- a/src/gallium/targets/dri-vmwgfx/SConscript
+++ b/src/gallium/targets/dri-vmwgfx/SConscript
@@ -11,6 +11,7 @@ env.Prepend(LIBS = [
svgadrm,
svga,
trace,
+ rbug,
mesa,
glsl,
gallium,
diff --git a/src/gallium/targets/egl-i915/Makefile b/src/gallium/targets/egl-i915/Makefile
index 02258fb69a..a4b41842ff 100644
--- a/src/gallium/targets/egl-i915/Makefile
+++ b/src/gallium/targets/egl-i915/Makefile
@@ -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
diff --git a/src/gallium/targets/egl-i965/Makefile b/src/gallium/targets/egl-i965/Makefile
index fad56ef555..d4730824a5 100644
--- a/src/gallium/targets/egl-i965/Makefile
+++ b/src/gallium/targets/egl-i965/Makefile
@@ -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 \
diff --git a/src/gallium/targets/egl-radeon/Makefile b/src/gallium/targets/egl-radeon/Makefile
index 8daadb5979..8fcca26826 100644
--- a/src/gallium/targets/egl-radeon/Makefile
+++ b/src/gallium/targets/egl-radeon/Makefile
@@ -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
diff --git a/src/gallium/targets/egl-vmwgfx/Makefile b/src/gallium/targets/egl-vmwgfx/Makefile
index 5f9385f42b..a9f6874b98 100644
--- a/src/gallium/targets/egl-vmwgfx/Makefile
+++ b/src/gallium/targets/egl-vmwgfx/Makefile
@@ -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
diff --git a/src/gallium/targets/graw-null/SConscript b/src/gallium/targets/graw-null/SConscript
index 2849d6667c..106dcd9a83 100644
--- a/src/gallium/targets/graw-null/SConscript
+++ b/src/gallium/targets/graw-null/SConscript
@@ -8,6 +8,7 @@ env = env.Clone()
env.Prepend(LIBS = [
ws_null,
trace,
+ rbug,
identity,
# gallium,
])
diff --git a/src/gallium/targets/graw-xlib/SConscript b/src/gallium/targets/graw-xlib/SConscript
index c9ea078ac1..ad84841922 100644
--- a/src/gallium/targets/graw-xlib/SConscript
+++ b/src/gallium/targets/graw-xlib/SConscript
@@ -13,6 +13,7 @@ env.Tool('x11')
env.Prepend(LIBS = [
ws_xlib,
trace,
+ rbug,
identity,
# gallium,
])
diff --git a/src/gallium/targets/libgl-gdi/SConscript b/src/gallium/targets/libgl-gdi/SConscript
index 2a55c7a577..144084f74f 100644
--- a/src/gallium/targets/libgl-gdi/SConscript
+++ b/src/gallium/targets/libgl-gdi/SConscript
@@ -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
diff --git a/src/gallium/targets/libgl-xlib/Makefile b/src/gallium/targets/libgl-xlib/Makefile
index 1574de080a..b173ceb994 100644
--- a/src/gallium/targets/libgl-xlib/Makefile
+++ b/src/gallium/targets/libgl-xlib/Makefile
@@ -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 \
diff --git a/src/gallium/targets/libgl-xlib/SConscript b/src/gallium/targets/libgl-xlib/SConscript
index 4ff9f88ff6..78703fd096 100644
--- a/src/gallium/targets/libgl-xlib/SConscript
+++ b/src/gallium/targets/libgl-xlib/SConscript
@@ -29,6 +29,7 @@ env.Prepend(LIBS = [
st_xlib,
ws_xlib,
trace,
+ rbug,
identity,
glapi,
mesa,
diff --git a/src/gallium/targets/xorg-i915/Makefile b/src/gallium/targets/xorg-i915/Makefile
index 52a9e97b40..2f2439c6d4 100644
--- a/src/gallium/targets/xorg-i915/Makefile
+++ b/src/gallium/targets/xorg-i915/Makefile
@@ -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)
diff --git a/src/gallium/targets/xorg-i965/Makefile b/src/gallium/targets/xorg-i965/Makefile
index 104a1434a8..0aab30ff3c 100644
--- a/src/gallium/targets/xorg-i965/Makefile
+++ b/src/gallium/targets/xorg-i965/Makefile
@@ -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)
diff --git a/src/gallium/targets/xorg-radeon/Makefile b/src/gallium/targets/xorg-radeon/Makefile
index cd32914c0d..85aa711a4f 100644
--- a/src/gallium/targets/xorg-radeon/Makefile
+++ b/src/gallium/targets/xorg-radeon/Makefile
@@ -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)
diff --git a/src/gallium/targets/xorg-vmwgfx/Makefile b/src/gallium/targets/xorg-vmwgfx/Makefile
index 12bc307ef9..e334d88995 100644
--- a/src/gallium/targets/xorg-vmwgfx/Makefile
+++ b/src/gallium/targets/xorg-vmwgfx/Makefile
@@ -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)
diff --git a/src/gallium/targets/xorg-vmwgfx/SConscript b/src/gallium/targets/xorg-vmwgfx/SConscript
index b63ab99e05..d5edbebae8 100644
--- a/src/gallium/targets/xorg-vmwgfx/SConscript
+++ b/src/gallium/targets/xorg-vmwgfx/SConscript
@@ -39,6 +39,7 @@ if env['platform'] == 'linux':
env.Prepend(LIBS = [
trace,
+ rbug,
st_xorg,
svgadrm,
svga,