trace: Fixup trace a bit
authorJakob Bornecrantz <jakob@vmware.com>
Wed, 11 Mar 2009 13:27:54 +0000 (14:27 +0100)
committerJakob Bornecrantz <jakob@vmware.com>
Wed, 11 Mar 2009 13:43:28 +0000 (14:43 +0100)
src/gallium/drivers/trace/tr_screen.c

index 1d868eff6bb8182d41f47be0d7fd5c92950d6414..a49ddb5e9ee315c57dae9bf273f689c113799493 100644 (file)
@@ -436,14 +436,26 @@ trace_screen_create(struct pipe_screen *screen)
    if(!trace_dump_trace_begin())
       goto error1;
 
+   trace_dump_call_begin("", "pipe_screen_create");
+   trace_dump_arg_begin("screen");
+   trace_dump_ptr(screen);
+   trace_dump_arg_end();
+   trace_dump_arg_begin("screen->winsys");
+   trace_dump_ptr(screen->winsys);
+   trace_dump_arg_end();
+
    tr_scr = CALLOC_STRUCT(trace_screen);
    if(!tr_scr)
       goto error2;
 
+#if 0
    winsys = trace_winsys_create(screen->winsys);
    if(!winsys)
       goto error3;
-   
+#else
+   winsys = screen->winsys;
+#endif
+
    tr_scr->base.winsys = winsys;
    tr_scr->base.destroy = trace_screen_destroy;
    tr_scr->base.get_name = trace_screen_get_name;
@@ -460,21 +472,20 @@ trace_screen_create(struct pipe_screen *screen)
    tr_scr->base.tex_transfer_destroy = trace_screen_tex_transfer_destroy;
    tr_scr->base.transfer_map = trace_screen_transfer_map;
    tr_scr->base.transfer_unmap = trace_screen_transfer_unmap;
-   
    tr_scr->screen = screen;
 
-   trace_dump_call_begin("", "pipe_screen_create");
-   trace_dump_arg_begin("winsys");
-   trace_dump_ptr(screen->winsys);
-   trace_dump_arg_end();
-   trace_dump_ret(ptr, screen);
+   trace_dump_ret(ptr, &tr_scr->base);
    trace_dump_call_end();
 
    return &tr_scr->base;
 
+#if 0
 error3:
    FREE(tr_scr);
+#endif
 error2:
+   trace_dump_ret(ptr, screen);
+   trace_dump_call_end();
    trace_dump_trace_end();
 error1:
    return screen;