summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/trace/tr_context.c
diff options
context:
space:
mode:
authorJosé Fonseca <[email protected]>2010-02-15 00:19:22 +0000
committerJosé Fonseca <[email protected]>2010-02-15 00:19:22 +0000
commit1fc94ab3dffa742ac0197368f0136432954c328f (patch)
treeff1a6eb59a9df75571129c0aeed20e485261c67d /src/gallium/drivers/trace/tr_context.c
parentd70c76907519592b723df915e8a71a7bf88c1197 (diff)
trace: Fix constant buffer unwrapping.
Pointer unwrapping should happen before dump the pointer, so that the real pipe driver pointers are shown, instead of the trace driver's.
Diffstat (limited to 'src/gallium/drivers/trace/tr_context.c')
-rw-r--r--src/gallium/drivers/trace/tr_context.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/src/gallium/drivers/trace/tr_context.c b/src/gallium/drivers/trace/tr_context.c
index 879778bd383..df40fbade6c 100644
--- a/src/gallium/drivers/trace/tr_context.c
+++ b/src/gallium/drivers/trace/tr_context.c
@@ -835,8 +835,10 @@ trace_context_set_constant_buffer(struct pipe_context *_pipe,
struct trace_context *tr_ctx = trace_context(_pipe);
struct pipe_context *pipe = tr_ctx->pipe;
- if (buffer)
+ if (buffer) {
trace_screen_user_buffer_update(_pipe->screen, buffer);
+ buffer = trace_buffer_unwrap(tr_ctx, buffer);
+ }
trace_dump_call_begin("pipe_context", "set_constant_buffer");
@@ -845,14 +847,7 @@ trace_context_set_constant_buffer(struct pipe_context *_pipe,
trace_dump_arg(uint, index);
trace_dump_arg(ptr, buffer);
- /* XXX hmm? */
- if (buffer) {
- struct pipe_buffer *_buffer;
- _buffer = trace_buffer_unwrap(tr_ctx, buffer);
- pipe->set_constant_buffer(pipe, shader, index, _buffer);
- } else {
- pipe->set_constant_buffer(pipe, shader, index, buffer);
- }
+ pipe->set_constant_buffer(pipe, shader, index, buffer);
trace_dump_call_end();
}