trace: Fix set_constant_buffer dumping.
authorJosé Fonseca <jfonseca@vmware.com>
Thu, 21 Feb 2013 19:54:55 +0000 (19:54 +0000)
committerJosé Fonseca <jfonseca@vmware.com>
Fri, 22 Feb 2013 08:40:47 +0000 (08:40 +0000)
We were dumping the trace driver pointer, instead of the pointer from the
underlying pipe driver.

src/gallium/drivers/trace/tr_context.c

index 538ff4afc9eedb04ccf3a71c7faf30dca8cbdd8a..f8637bd599d26a4c26f11403a4badf0864d4d85a 100644 (file)
@@ -700,6 +700,7 @@ trace_context_set_constant_buffer(struct pipe_context *_pipe,
    if (constant_buffer) {
       cb = *constant_buffer;
       cb.buffer = trace_resource_unwrap(tr_ctx, constant_buffer->buffer);
+      constant_buffer = &cb;
    }
 
    trace_dump_call_begin("pipe_context", "set_constant_buffer");
@@ -709,8 +710,7 @@ trace_context_set_constant_buffer(struct pipe_context *_pipe,
    trace_dump_arg(uint, index);
    trace_dump_arg(constant_buffer, constant_buffer);
 
-   pipe->set_constant_buffer(pipe, shader, index,
-                             constant_buffer ? &cb : NULL);
+   pipe->set_constant_buffer(pipe, shader, index, constant_buffer);
 
    trace_dump_call_end();
 }