[Mesa-dev] [PATCH 01/11] gallium/util: add util_dump_grid_info
Nicolai Hähnle
nhaehnle at gmail.com
Mon May 8 15:35:51 UTC 2017
From: Nicolai Hähnle <nicolai.haehnle at amd.com>
---
src/gallium/auxiliary/util/u_dump.h | 3 +++
src/gallium/auxiliary/util/u_dump_state.c | 27 +++++++++++++++++++++++++++
2 files changed, 30 insertions(+)
diff --git a/src/gallium/auxiliary/util/u_dump.h b/src/gallium/auxiliary/util/u_dump.h
index bce8517..3a701ac 100644
--- a/src/gallium/auxiliary/util/u_dump.h
+++ b/src/gallium/auxiliary/util/u_dump.h
@@ -184,20 +184,23 @@ util_dump_vertex_element(FILE *stream,
const struct pipe_vertex_element *state);
void
util_dump_stream_output_target(FILE *stream,
const struct pipe_stream_output_target *state);
void
util_dump_draw_info(FILE *stream, const struct pipe_draw_info *state);
void
+util_dump_grid_info(FILE *stream, const struct pipe_grid_info *state);
+
+void
util_dump_box(FILE *stream, const struct pipe_box *box);
void
util_dump_blit_info(FILE *stream, const struct pipe_blit_info *info);
/* FIXME: Move the other debug_dump_xxx functions out of u_debug.h into here. */
#ifdef __cplusplus
}
diff --git a/src/gallium/auxiliary/util/u_dump_state.c b/src/gallium/auxiliary/util/u_dump_state.c
index 105e5c4..9bb9095 100644
--- a/src/gallium/auxiliary/util/u_dump_state.c
+++ b/src/gallium/auxiliary/util/u_dump_state.c
@@ -941,20 +941,47 @@ util_dump_draw_info(FILE *stream, const struct pipe_draw_info *state)
util_dump_member(stream, ptr, state, indirect);
util_dump_member(stream, uint, state, indirect_offset);
util_dump_member(stream, uint, state, indirect_stride);
util_dump_member(stream, uint, state, indirect_count);
util_dump_member(stream, uint, state, indirect_params_offset);
util_dump_struct_end(stream);
}
+void util_dump_grid_info(FILE *stream, const struct pipe_grid_info *state)
+{
+ if (!state) {
+ util_dump_null(stream);
+ return;
+ }
+
+ util_dump_struct_begin(stream, "pipe_grid_info");
+
+ util_dump_member(stream, uint, state, pc);
+ util_dump_member(stream, ptr, state, input);
+ util_dump_member(stream, uint, state, work_dim);
+
+ util_dump_member_begin(stream, "block");
+ util_dump_array(stream, uint, state->block, ARRAY_SIZE(state->block));
+ util_dump_member_end(stream);
+
+ util_dump_member_begin(stream, "grid");
+ util_dump_array(stream, uint, state->grid, ARRAY_SIZE(state->grid));
+ util_dump_member_end(stream);
+
+ util_dump_member(stream, ptr, state, indirect);
+ util_dump_member(stream, uint, state, indirect_offset);
+
+ util_dump_struct_end(stream);
+}
+
void util_dump_box(FILE *stream, const struct pipe_box *box)
{
if (!box) {
util_dump_null(stream);
return;
}
util_dump_struct_begin(stream, "pipe_box");
util_dump_member(stream, int, box, x);
--
2.9.3
More information about the mesa-dev
mailing list