gallium/util: add util_dump_grid_info
authorNicolai Hähnle <nicolai.haehnle@amd.com>
Mon, 8 May 2017 11:29:02 +0000 (13:29 +0200)
committerNicolai Hähnle <nicolai.haehnle@amd.com>
Wed, 10 May 2017 06:58:23 +0000 (08:58 +0200)
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/gallium/auxiliary/util/u_dump.h
src/gallium/auxiliary/util/u_dump_state.c

index bce8517b4e6f88e8150b19e663678518dbc7250d..3a701ac5be9581c50b014b39ef8e4d37d4b74386 100644 (file)
@@ -190,6 +190,9 @@ util_dump_stream_output_target(FILE *stream,
 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);
 
index 105e5c4bc388a5c175bbf0e98a93ebd76dd3a3a0..9bb9095938b3758a18657be1dcf87b08af3fea24 100644 (file)
@@ -948,6 +948,33 @@ util_dump_draw_info(FILE *stream, const struct pipe_draw_info *state)
    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) {