summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/trace/tr_screen.c
diff options
context:
space:
mode:
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