From c723acc03dc39388e75d2c5919b99cd7b4d7e7cc Mon Sep 17 00:00:00 2001 From: Marek Olšák Date: Sat, 10 Sep 2016 10:16:54 +0200 Subject: ddebug: dump shader buffers and images MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit this was unimplemented Reviewed-by: Nicolai Hähnle --- src/gallium/auxiliary/util/u_dump.h | 3 +++ src/gallium/auxiliary/util/u_dump_state.c | 19 +++++++++++++++++++ 2 files changed, 22 insertions(+) (limited to 'src/gallium/auxiliary') diff --git a/src/gallium/auxiliary/util/u_dump.h b/src/gallium/auxiliary/util/u_dump.h index 2598851152b..bce8517b4e6 100644 --- a/src/gallium/auxiliary/util/u_dump.h +++ b/src/gallium/auxiliary/util/u_dump.h @@ -158,6 +158,9 @@ util_dump_surface(FILE *stream, void util_dump_image_view(FILE *stream, const struct pipe_image_view *state); +void +util_dump_shader_buffer(FILE *stream, const struct pipe_shader_buffer *state); + void util_dump_sampler_view(FILE *stream, const struct pipe_sampler_view *state); diff --git a/src/gallium/auxiliary/util/u_dump_state.c b/src/gallium/auxiliary/util/u_dump_state.c index 6aecee1e622..06d5e788fae 100644 --- a/src/gallium/auxiliary/util/u_dump_state.c +++ b/src/gallium/auxiliary/util/u_dump_state.c @@ -735,6 +735,25 @@ util_dump_image_view(FILE *stream, const struct pipe_image_view *state) } +void +util_dump_shader_buffer(FILE *stream, const struct pipe_shader_buffer *state) +{ + if (!state) { + util_dump_null(stream); + return; + } + + util_dump_struct_begin(stream, "pipe_shader_buffer"); + + util_dump_member(stream, ptr, state, buffer); + util_dump_member(stream, uint, state, buffer_offset); + util_dump_member(stream, uint, state, buffer_size); + + util_dump_struct_end(stream); + +} + + void util_dump_sampler_view(FILE *stream, const struct pipe_sampler_view *state) { -- cgit v1.2.3