rbug: Add to all targets that link against trace
authorJakob Bornecrantz <jakob@vmware.com>
Wed, 12 May 2010 19:11:37 +0000 (20:11 +0100)
committerJakob Bornecrantz <jakob@vmware.com>
Wed, 12 May 2010 19:15:23 +0000 (20:15 +0100)
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.

31 files changed:
src/gallium/auxiliary/target-helpers/wrap_screen.c
src/gallium/drivers/rbug/rbug_public.h
src/gallium/drivers/rbug/rbug_screen.c
src/gallium/drivers/trace/tr_drm.c
src/gallium/drivers/trace/tr_public.h
src/gallium/drivers/trace/tr_screen.h
src/gallium/targets/Makefile.egl
src/gallium/targets/dri-i915/Makefile
src/gallium/targets/dri-i915/SConscript
src/gallium/targets/dri-i965/Makefile
src/gallium/targets/dri-i965/SConscript
src/gallium/targets/dri-radeong/Makefile
src/gallium/targets/dri-radeong/SConscript
src/gallium/targets/dri-swrast/Makefile
src/gallium/targets/dri-swrast/SConscript
src/gallium/targets/dri-vmwgfx/Makefile
src/gallium/targets/dri-vmwgfx/SConscript
src/gallium/targets/egl-i915/Makefile
src/gallium/targets/egl-i965/Makefile
src/gallium/targets/egl-radeon/Makefile
src/gallium/targets/egl-vmwgfx/Makefile
src/gallium/targets/graw-null/SConscript
src/gallium/targets/graw-xlib/SConscript
src/gallium/targets/libgl-gdi/SConscript
src/gallium/targets/libgl-xlib/Makefile
src/gallium/targets/libgl-xlib/SConscript
src/gallium/targets/xorg-i915/Makefile
src/gallium/targets/xorg-i965/Makefile
src/gallium/targets/xorg-radeon/Makefile
src/gallium/targets/xorg-vmwgfx/Makefile
src/gallium/targets/xorg-vmwgfx/SConscript

index eb475123198221b71e4fc0f39f03ec75af7d7865..df5d56a53c917cbb6fd01c45257caf67711060ee 100644 (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;
 }
 
index f3cb19a340533e04e9409b2237a838436e9a2225..b66740b49cde652fe1bfe607f136dfabbb3e2ded 100644 (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 */
index acdb1f6dc0183eb149538cb44663342d8f0d369a..7d7b9247c35b395149c5db54cc747fdbb02d9138 100644 (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)
 {
index 0dc8cca2648232faa7fa87785b57610a544b00fb..43a4b296de297c3bf2ae267b7a678269f58459a1 100644 (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);
index 62e217097d0639f9e70f0aed1b8b4e9dda0e62b7..aee4937dd4fe519d5656e55be983d91b575baa35 100644 (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
index 9fadb0d70ac062c0fe2a9ba09ac22fb75e5a3cd3..3598ceaa20f9bedb6cff004605827b211ba7060c 100644 (file)
@@ -64,9 +64,6 @@ struct trace_screen
  */
 
 
-boolean
-trace_enabled(void);
-
 struct trace_screen *
 trace_screen(struct pipe_screen *screen);
 
index 604841f710a8cb9f06788ca0ca5ec3f4bd212ab8..f26ffb8ad4f4da5602eb5930ca324a84d2dd0f31 100644 (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
 
index 50a8e11e17c8ae23ba1517157a766313856e3a09..fdcfd08c2275ad44d48867e8ad2b8fa2aba570a2 100644 (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
index 2fcc8028f12e7542d597e546dbad41add9a23bae..65c423988755d4d93acc8629f78bde9aeaa6d842 100644 (file)
@@ -13,6 +13,7 @@ env.Prepend(LIBS = [
     i915drm,
     i915,
     trace,
+    rbug,
     mesa,
     glsl,
     gallium,
index e267ba3a0232dc0c63d8ef5113a62a3ebb060253..13987c643e20393ca6ce03e7612607aa78f22f67 100644 (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 \
index 115530c5ebf87b1915d95e8dc0865b7562f4c1c3..13ac5a2d8ea6f058b3fb938c22ab758f47fd416c 100644 (file)
@@ -15,6 +15,7 @@ env.Prepend(LIBS = [
     ws_wrapper,
     i965,
     trace,
+    rbug,
     mesa,
     glsl,
     gallium,
index 66dd392b68bdd0f3353ad411e25b092e1fdd4a1e..8ef24c08215ff85af6e391f6dec9f743c6ebe201 100644 (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 = \
index d926c2728897e9f99e2b6fcd809966cf41ae884d..4c6cfb84ebade0ed5b80dd5658ee0aa373dd4573 100644 (file)
@@ -13,6 +13,7 @@ env.Prepend(LIBS = [
     radeonwinsys,
     r300,
     trace,
+    rbug,
     mesa,
     glsl,
     gallium,
index 3db9781c209023911f434ce88878481a64b4047c..0a53eb56c455c8283d30b5b7ab81d679eb766860 100644 (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 \
index 77f44384d062e1dbbabdea7631dbd7e09832eb2b..679afab41c7bc049251740079370248dbab052e7 100644 (file)
@@ -10,6 +10,7 @@ env.Prepend(LIBS = [
     st_drisw,
     ws_dri,
     trace,
+    rbug,
     mesa,
     glsl,
     gallium,
index 4b002e828fa3c4cd7d3592b5ed3118c687425c16..b5b679f3c7c9e558093b9d24e9d8180ac9fdc2b7 100644 (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 = \
index 6a1f8827bc38f323810f0a5b5b2f6dd3a5b7b1f0..09a0c254c304e651f36190e9a757e2fcdd4fe6e7 100644 (file)
@@ -11,6 +11,7 @@ env.Prepend(LIBS = [
     svgadrm,
     svga,
     trace,
+    rbug,
     mesa,
     glsl,
     gallium,
index 02258fb69a44265d2410607f002ce4c411e57e82..a4b41842ff75d9700d2027e37187f3b67656b500 100644 (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
index fad56ef55544305ff62cae29dfd89b1a54cf59be..d4730824a5b2e55e827c72823e991a49caa1a5e5 100644 (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 \
index 8daadb59791295bd8f411edd8bad425fdefab775..8fcca2682655c6ca910114280ff08f41743c571f 100644 (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
index 5f9385f42b093e23ba8ef6a61a7c202d8f02474e..a9f6874b98120d6911ac9a7abbd317aabd8f2e85 100644 (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
index 2849d6667c27de5da68b1eafb706cfd664f33f0f..106dcd9a83536c6a4a6fe091f00e6b928f976fa3 100644 (file)
@@ -8,6 +8,7 @@ env = env.Clone()
 env.Prepend(LIBS = [
     ws_null,
     trace,
+    rbug,
     identity,
 #    gallium,
 ])
index c9ea078ac16d01835ebe13f961898ff0c089c948..ad84841922d1dae5ab0cc2121aaeb324e319f27f 100644 (file)
@@ -13,6 +13,7 @@ env.Tool('x11')
 env.Prepend(LIBS = [
     ws_xlib,
     trace,
+    rbug,
     identity,
 #    gallium,
 ])
index 2a55c7a5776ceada43f3c260a876068cb7cfd54e..144084f74f838cbda095da3ccee3243dde9e479e 100644 (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
 
index 1574de080abf677f0f824be067e7b57df2753fd6..b173ceb994ab4e9b260e7dc888c8cf690afa13b8 100644 (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 \
index 4ff9f88ff6795ca0970fae8f75da6cd42c5bd4a7..78703fd096d295d853e52a0b6277b7311179f694 100644 (file)
@@ -29,6 +29,7 @@ env.Prepend(LIBS = [
     st_xlib,
     ws_xlib,
     trace,
+    rbug,
     identity,
     glapi,
     mesa,
index 52a9e97b409bf5b536b3b992fb09f728d0d7e227..2f2439c6d42753ffff2495b809fd60dfa0effc60 100644 (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)
 
index 104a1434a84ab7a05b2f31d32eb73f648813ae46..0aab30ff3c6de025805defb37a58b2b81be2baa7 100644 (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)
 
index cd32914c0d3527664c6cd68f847628c9889996f5..85aa711a4f3d058c1bd099e2c9bed34e8e5a98d3 100644 (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)
 
index 12bc307ef9baf2c12cea3b8097d1457139ed7b5d..e334d889957e47091efc01b660d92a5a570adccf 100644 (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)
 
index b63ab99e050a8575a9778649ee260596bec703b1..d5edbebae8721447acc0d1d639662abbbe7cf7c5 100644 (file)
@@ -39,6 +39,7 @@ if env['platform'] == 'linux':
 
        env.Prepend(LIBS = [
                trace,
+               rbug,
                st_xorg,
                svgadrm,
                svga,