diff options
author | Jakob Bornecrantz <[email protected]> | 2009-07-02 14:57:55 +0200 |
---|---|---|
committer | Jakob Bornecrantz <[email protected]> | 2009-07-02 14:57:55 +0200 |
commit | c0d7502a2cf994e635f1383f523653b92f4bd709 (patch) | |
tree | 5ebc3c253bd47d5f8de5370d2e47738280a35b84 /src/gallium/drivers/trace/tr_screen.c | |
parent | 54ee188a00e31d239cbd256e7ba5ffd2c1259650 (diff) |
trace: Add drm api integration
This is okay since drm_api.h doesn't have any external
dependancies, one could make it only compile on platforms
that support drm.
Diffstat (limited to 'src/gallium/drivers/trace/tr_screen.c')
-rw-r--r-- | src/gallium/drivers/trace/tr_screen.c | 30 |
1 files changed, 18 insertions, 12 deletions
diff --git a/src/gallium/drivers/trace/tr_screen.c b/src/gallium/drivers/trace/tr_screen.c index 920f418ebf0..5b1e26a52d7 100644 --- a/src/gallium/drivers/trace/tr_screen.c +++ b/src/gallium/drivers/trace/tr_screen.c @@ -38,6 +38,7 @@ static boolean trace = FALSE; +static boolean rbug = FALSE; static const char * trace_screen_get_name(struct pipe_screen *_screen) @@ -837,18 +838,11 @@ trace_screen_destroy(struct pipe_screen *_screen) boolean trace_enabled(void) { - return trace; -} + static boolean firstrun = TRUE; -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; + if (!firstrun) + return trace; + firstrun = FALSE; trace_dump_init(); @@ -862,7 +856,19 @@ trace_screen_create(struct pipe_screen *screen) rbug = TRUE; } - if (!trace) + return trace; +} + +struct pipe_screen * +trace_screen_create(struct pipe_screen *screen) +{ + struct trace_screen *tr_scr; + struct pipe_winsys *winsys; + + if(!screen) + goto error1; + + if (!trace_enabled()) goto error1; trace_dump_call_begin("", "pipe_screen_create"); |