summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2012-01-03 19:18:45 +0100
committerMarek Olšák <[email protected]>2012-01-05 18:29:11 +0100
commit1ae9e588fa8e213f414f3d2d2e70c001deb304c8 (patch)
tree2e001efa54609a6afdbe0b5d81be3a304b0b2d29 /src
parent345b1a31c9f1fdd513d6f394c772830bb811fc94 (diff)
util: add helper function util_dump_draw_info
Diffstat (limited to 'src')
-rw-r--r--src/gallium/auxiliary/util/u_dump.h2
-rw-r--r--src/gallium/auxiliary/util/u_dump_state.c32
2 files changed, 34 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/util/u_dump.h b/src/gallium/auxiliary/util/u_dump.h
index 3890b3bddca..87d84bead97 100644
--- a/src/gallium/auxiliary/util/u_dump.h
+++ b/src/gallium/auxiliary/util/u_dump.h
@@ -162,6 +162,8 @@ void
util_dump_vertex_element(FILE *stream,
const struct pipe_vertex_element *state);
+void
+util_dump_draw_info(FILE *stream, const struct pipe_draw_info *state);
/* FIXME: Move the other debug_dump_xxx functions out of u_debug.h into here. */
diff --git a/src/gallium/auxiliary/util/u_dump_state.c b/src/gallium/auxiliary/util/u_dump_state.c
index 91f4aae69ef..e44c6194c77 100644
--- a/src/gallium/auxiliary/util/u_dump_state.c
+++ b/src/gallium/auxiliary/util/u_dump_state.c
@@ -725,3 +725,35 @@ util_dump_vertex_element(FILE *stream, const struct pipe_vertex_element *state)
util_dump_struct_end(stream);
}
+
+
+void
+util_dump_draw_info(FILE *stream, const struct pipe_draw_info *state)
+{
+ if(!state) {
+ util_dump_null(stream);
+ return;
+ }
+
+ util_dump_struct_begin(stream, "pipe_draw_info");
+
+ util_dump_member(stream, bool, state, indexed);
+
+ util_dump_member(stream, uint, state, mode);
+ util_dump_member(stream, uint, state, start);
+ util_dump_member(stream, uint, state, count);
+
+ util_dump_member(stream, uint, state, start_instance);
+ util_dump_member(stream, uint, state, instance_count);
+
+ util_dump_member(stream, int, state, index_bias);
+ util_dump_member(stream, uint, state, min_index);
+ util_dump_member(stream, uint, state, max_index);
+
+ util_dump_member(stream, bool, state, primitive_restart);
+ util_dump_member(stream, uint, state, restart_index);
+
+ util_dump_member(stream, ptr, state, count_from_stream_output);
+
+ util_dump_struct_end(stream);
+}