diff options
Diffstat (limited to 'src/gallium/drivers/trace/tr_dump_state.c')
-rw-r--r-- | src/gallium/drivers/trace/tr_dump_state.c | 89 |
1 files changed, 78 insertions, 11 deletions
diff --git a/src/gallium/drivers/trace/tr_dump_state.c b/src/gallium/drivers/trace/tr_dump_state.c index f97d963dba..ab347182ed 100644 --- a/src/gallium/drivers/trace/tr_dump_state.c +++ b/src/gallium/drivers/trace/tr_dump_state.c @@ -44,7 +44,7 @@ void trace_dump_format(enum pipe_format format) } -void trace_dump_template(const struct pipe_texture *templat) +void trace_dump_resource_template(const struct pipe_resource *templat) { if (!trace_dumping_enabled_locked()) return; @@ -54,7 +54,7 @@ void trace_dump_template(const struct pipe_texture *templat) return; } - trace_dump_struct_begin("pipe_texture"); + trace_dump_struct_begin("pipe_resource"); trace_dump_member(int, templat, target); trace_dump_member(format, templat, format); @@ -72,7 +72,51 @@ void trace_dump_template(const struct pipe_texture *templat) trace_dump_member_end(); trace_dump_member(uint, templat, last_level); - trace_dump_member(uint, templat, tex_usage); + trace_dump_member(uint, templat, _usage); + trace_dump_member(uint, templat, bind); + trace_dump_member(uint, templat, flags); + + trace_dump_struct_end(); +} + + +void trace_dump_subresource(const struct pipe_subresource *subresource) +{ + if (!trace_dumping_enabled_locked()) + return; + + if(!subresource) { + trace_dump_null(); + return; + } + + trace_dump_struct_begin("pipe_subresource"); + + trace_dump_member(uint, subresource, face); + trace_dump_member(uint, subresource, level); + + trace_dump_struct_end(); +} + + +void trace_dump_box(const struct pipe_box *box) +{ + if (!trace_dumping_enabled_locked()) + return; + + if(!box) { + trace_dump_null(); + return; + } + + trace_dump_struct_begin("pipe_box"); + + trace_dump_member(uint, box, x); + trace_dump_member(uint, box, y); + trace_dump_member(uint, box, z); + trace_dump_member(uint, box, width); + trace_dump_member(uint, box, height); + trace_dump_member(uint, box, depth); trace_dump_struct_end(); } @@ -387,6 +431,30 @@ void trace_dump_sampler_state(const struct pipe_sampler_state *state) } +void trace_dump_sampler_view_template(const struct pipe_sampler_view *state) +{ + if (!trace_dumping_enabled_locked()) + return; + + if(!state) { + trace_dump_null(); + return; + } + + trace_dump_struct_begin("pipe_sampler_view"); + + trace_dump_member(format, state, format); + trace_dump_member(uint, state, first_level); + trace_dump_member(uint, state, last_level); + trace_dump_member(uint, state, swizzle_r); + trace_dump_member(uint, state, swizzle_g); + trace_dump_member(uint, state, swizzle_b); + trace_dump_member(uint, state, swizzle_a); + + trace_dump_struct_end(); +} + + void trace_dump_surface(const struct pipe_surface *state) { if (!trace_dumping_enabled_locked()) @@ -428,16 +496,16 @@ void trace_dump_transfer(const struct pipe_transfer *state) trace_dump_struct_begin("pipe_transfer"); - trace_dump_member(uint, state, width); - trace_dump_member(uint, state, height); + trace_dump_member(uint, state, box.width); + trace_dump_member(uint, state, box.height); trace_dump_member(uint, state, stride); trace_dump_member(uint, state, usage); - trace_dump_member(ptr, state, texture); - trace_dump_member(uint, state, face); - trace_dump_member(uint, state, level); - trace_dump_member(uint, state, zslice); + trace_dump_member(ptr, state, resource); + trace_dump_member(uint, state, sr.face); + trace_dump_member(uint, state, sr.level); + trace_dump_member(uint, state, box.z); trace_dump_struct_end(); } @@ -458,7 +526,7 @@ void trace_dump_vertex_buffer(const struct pipe_vertex_buffer *state) trace_dump_member(uint, state, stride); trace_dump_member(uint, state, max_index); trace_dump_member(uint, state, buffer_offset); - trace_dump_member(buffer_ptr, state, buffer); + trace_dump_member(resource_ptr, state, buffer); trace_dump_struct_end(); } @@ -479,7 +547,6 @@ void trace_dump_vertex_element(const struct pipe_vertex_element *state) trace_dump_member(uint, state, src_offset); trace_dump_member(uint, state, vertex_buffer_index); - trace_dump_member(uint, state, nr_components); trace_dump_member(format, state, src_format); |