diff options
author | José Fonseca <[email protected]> | 2012-10-25 15:30:19 +0100 |
---|---|---|
committer | José Fonseca <[email protected]> | 2012-10-25 15:30:19 +0100 |
commit | 4efcdd1e7a187c3493628fe1a8067a1defe86f9d (patch) | |
tree | 0864591761bfb8e903b64aed2a832ea9d50f3fdc /src | |
parent | 86cd77d0a9ac940c2c06eebc5e9ef840d176712a (diff) |
trace: Fix dumping of set_constant_buffer method.
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/drivers/trace/tr_context.c | 10 | ||||
-rw-r--r-- | src/gallium/drivers/trace/tr_dump_state.c | 18 | ||||
-rw-r--r-- | src/gallium/drivers/trace/tr_dump_state.h | 2 |
3 files changed, 21 insertions, 9 deletions
diff --git a/src/gallium/drivers/trace/tr_context.c b/src/gallium/drivers/trace/tr_context.c index dd1b5a00de7..a1333e5a132 100644 --- a/src/gallium/drivers/trace/tr_context.c +++ b/src/gallium/drivers/trace/tr_context.c @@ -763,15 +763,7 @@ trace_context_set_constant_buffer(struct pipe_context *_pipe, trace_dump_arg(ptr, pipe); trace_dump_arg(uint, shader); trace_dump_arg(uint, index); - if (constant_buffer) { - trace_dump_struct_begin("pipe_constant_buffer"); - trace_dump_member(ptr, constant_buffer, buffer); - trace_dump_member(uint, constant_buffer, buffer_offset); - trace_dump_member(uint, constant_buffer, buffer_size); - trace_dump_struct_end(); - } else { - trace_dump_arg(ptr, constant_buffer); - } + trace_dump_arg(constant_buffer, constant_buffer); pipe->set_constant_buffer(pipe, shader, index, constant_buffer ? &cb : NULL); diff --git a/src/gallium/drivers/trace/tr_dump_state.c b/src/gallium/drivers/trace/tr_dump_state.c index 3df6f1220d1..c7e1e8fb0de 100644 --- a/src/gallium/drivers/trace/tr_dump_state.c +++ b/src/gallium/drivers/trace/tr_dump_state.c @@ -661,6 +661,24 @@ void trace_dump_vertex_element(const struct pipe_vertex_element *state) } +void trace_dump_constant_buffer(const struct pipe_constant_buffer *state) +{ + if (!trace_dumping_enabled_locked()) + return; + + if(!state) { + trace_dump_null(); + return; + } + + trace_dump_struct_begin("pipe_constant_buffer"); + trace_dump_member(ptr, state, buffer); + trace_dump_member(uint, state, buffer_offset); + trace_dump_member(uint, state, buffer_size); + trace_dump_struct_end(); +} + + void trace_dump_draw_info(const struct pipe_draw_info *state) { if (!trace_dumping_enabled_locked()) diff --git a/src/gallium/drivers/trace/tr_dump_state.h b/src/gallium/drivers/trace/tr_dump_state.h index e17246b21b1..22beffaae67 100644 --- a/src/gallium/drivers/trace/tr_dump_state.h +++ b/src/gallium/drivers/trace/tr_dump_state.h @@ -79,6 +79,8 @@ void trace_dump_index_buffer(const struct pipe_index_buffer *state); void trace_dump_vertex_element(const struct pipe_vertex_element *state); +void trace_dump_constant_buffer(const struct pipe_constant_buffer *state); + void trace_dump_draw_info(const struct pipe_draw_info *state); void trace_dump_blit_info(const struct pipe_blit_info *); |