trace: Several fixes.
authorJosé Fonseca <jrfonseca@tungstengraphics.com>
Thu, 14 Aug 2008 13:38:58 +0000 (14:38 +0100)
committerJosé Fonseca <jrfonseca@tungstengraphics.com>
Fri, 15 Aug 2008 09:35:18 +0000 (10:35 +0100)
src/gallium/drivers/trace/tr_context.c
src/gallium/drivers/trace/tr_winsys.c

index 868b4f010d0532bf09805fb42982d8312200ba3e..e81cab252c3cd6cb42e1696022f8751e3ee780ae 100644 (file)
@@ -318,11 +318,11 @@ trace_context_create_sampler_state(struct pipe_context *_pipe,
    trace_dump_call_begin("pipe_context", "create_sampler_state");
 
    trace_dump_arg(ptr, pipe);
-   trace_dump_arg(ptr, state);
+   trace_dump_arg(sampler_state, state);
 
    result = pipe->create_sampler_state(pipe, state);;
 
-   trace_dump_ret(sampler_state, result);
+   trace_dump_ret(ptr, result);
    
    trace_dump_call_end();
    
@@ -888,10 +888,12 @@ trace_context_flush(struct pipe_context *_pipe,
 
    trace_dump_arg(ptr, pipe);
    trace_dump_arg(uint, flags);
-   trace_dump_arg(ptr, fence);
 
    pipe->flush(pipe, flags, fence);;
 
+   if(fence)
+      trace_dump_ret(ptr, *fence);
+
    trace_dump_call_end();
 }
 
index be76c0716f0e1412ef42d7aa6a05984fc61254bb..356579809ad552d00cb9f79204716d8824b6fcae 100644 (file)
@@ -74,12 +74,14 @@ trace_winsys_flush_frontbuffer(struct pipe_winsys *_winsys,
 {
    struct trace_winsys *tr_ws = trace_winsys(_winsys);
    struct pipe_winsys *winsys = tr_ws->winsys;
-   
+
    trace_dump_call_begin("pipe_winsys", "flush_frontbuffer");
    
    trace_dump_arg(ptr, winsys);
    trace_dump_arg(ptr, surface);
+   /* XXX: hide, as there is nothing we can do with this
    trace_dump_arg(ptr, context_private);
+   */
 
    winsys->flush_frontbuffer(winsys, surface, context_private);
    
@@ -203,8 +205,8 @@ trace_winsys_buffer_create(struct pipe_winsys *_winsys,
 
 static struct pipe_buffer *
 trace_winsys_user_buffer_create(struct pipe_winsys *_winsys, 
-                                void *ptr,
-                                unsigned bytes)
+                                void *data,
+                                unsigned size)
 {
    struct trace_winsys *tr_ws = trace_winsys(_winsys);
    struct pipe_winsys *winsys = tr_ws->winsys;
@@ -213,10 +215,12 @@ trace_winsys_user_buffer_create(struct pipe_winsys *_winsys,
    trace_dump_call_begin("pipe_winsys", "user_buffer_create");
    
    trace_dump_arg(ptr, winsys);
-   trace_dump_arg(ptr, ptr);
-   trace_dump_arg(uint, bytes);
+   trace_dump_arg_begin("data");
+   trace_dump_bytes(data, size);
+   trace_dump_arg_end();
+   trace_dump_arg(uint, size);
 
-   result = winsys->user_buffer_create(winsys, ptr, bytes);
+   result = winsys->user_buffer_create(winsys, data, size);
    
    trace_dump_ret(ptr, result);