summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/trace/tr_screen.c
diff options
context:
space:
mode:
authorJakob Bornecrantz <[email protected]>2009-06-01 11:19:55 +0100
committerJakob Bornecrantz <[email protected]>2009-06-01 11:19:56 +0100
commit01fa34cb98d9ea6008c7108b6112348e278864f4 (patch)
tree65d9c60496942630978d93e044c4caa342589848 /src/gallium/drivers/trace/tr_screen.c
parentdfa4ebcbcc9c7e9e7562f73a4ddc367756623e5e (diff)
trace/rbug: Add rbug integration for remote debugging
Diffstat (limited to 'src/gallium/drivers/trace/tr_screen.c')
-rw-r--r--src/gallium/drivers/trace/tr_screen.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/gallium/drivers/trace/tr_screen.c b/src/gallium/drivers/trace/tr_screen.c
index bc14248eebb..920f418ebf0 100644
--- a/src/gallium/drivers/trace/tr_screen.c
+++ b/src/gallium/drivers/trace/tr_screen.c
@@ -826,24 +826,26 @@ trace_screen_destroy(struct pipe_screen *_screen)
trace_dump_call_end();
trace_dump_trace_end();
+ if (tr_scr->rbug)
+ trace_rbug_stop(tr_scr->rbug);
+
screen->destroy(screen);
FREE(tr_scr);
}
-
boolean
trace_enabled(void)
{
return trace;
}
-
struct pipe_screen *
trace_screen_create(struct pipe_screen *screen)
{
struct trace_screen *tr_scr;
struct pipe_winsys *winsys;
+ boolean rbug = FALSE;
if(!screen)
goto error1;
@@ -855,6 +857,11 @@ trace_screen_create(struct pipe_screen *screen)
trace = TRUE;
}
+ if (debug_get_bool_option("GALLIUM_RBUG", FALSE)) {
+ trace = TRUE;
+ rbug = TRUE;
+ }
+
if (!trace)
goto error1;
@@ -915,6 +922,9 @@ trace_screen_create(struct pipe_screen *screen)
trace_dump_ret(ptr, screen);
trace_dump_call_end();
+ if (rbug)
+ tr_scr->rbug = trace_rbug_start(tr_scr);
+
return &tr_scr->base;
#if 0