diff options
author | José Fonseca <[email protected]> | 2008-08-07 19:46:39 +0100 |
---|---|---|
committer | José Fonseca <[email protected]> | 2008-08-07 20:58:09 +0100 |
commit | ce2137a6a4c2648a77b9697a3aa0479c9c61bacc (patch) | |
tree | 5ee987722d79e44d81b696470e059ae011dc4bac | |
parent | 8fb55dab783f2de5111e7440093e1458fce5fb3d (diff) |
trace: Dump format names.
-rw-r--r-- | src/gallium/drivers/trace/tr_dump.c | 8 | ||||
-rw-r--r-- | src/gallium/drivers/trace/tr_dump.h | 1 | ||||
-rw-r--r-- | src/gallium/drivers/trace/tr_screen.c | 2 | ||||
-rw-r--r-- | src/gallium/drivers/trace/tr_state.c | 4 | ||||
-rw-r--r-- | src/gallium/drivers/trace/trace.xsl | 2 |
5 files changed, 13 insertions, 4 deletions
diff --git a/src/gallium/drivers/trace/tr_dump.c b/src/gallium/drivers/trace/tr_dump.c index 0591b9fc336..359a903ab91 100644 --- a/src/gallium/drivers/trace/tr_dump.c +++ b/src/gallium/drivers/trace/tr_dump.c @@ -280,6 +280,14 @@ void trace_dump_string(struct trace_stream *stream, trace_dump_write(stream, "</string>"); } +void trace_dump_enum(struct trace_stream *stream, + const char *value) +{ + trace_dump_write(stream, "<enum>"); + trace_dump_escape(stream, value); + trace_dump_write(stream, "</enum>"); +} + void trace_dump_array_begin(struct trace_stream *stream) { trace_dump_write(stream, "<array>"); diff --git a/src/gallium/drivers/trace/tr_dump.h b/src/gallium/drivers/trace/tr_dump.h index 5eeac8d3c5e..7b15da30330 100644 --- a/src/gallium/drivers/trace/tr_dump.h +++ b/src/gallium/drivers/trace/tr_dump.h @@ -53,6 +53,7 @@ void trace_dump_int(struct trace_stream *stream, long int value); void trace_dump_uint(struct trace_stream *stream, long unsigned value); void trace_dump_float(struct trace_stream *stream, double value); void trace_dump_string(struct trace_stream *stream, const char *str); +void trace_dump_enum(struct trace_stream *stream, const char *value); void trace_dump_array_begin(struct trace_stream *stream); void trace_dump_array_end(struct trace_stream *stream); void trace_dump_elem_begin(struct trace_stream *stream); diff --git a/src/gallium/drivers/trace/tr_screen.c b/src/gallium/drivers/trace/tr_screen.c index 20a2026e1d0..3a48654609a 100644 --- a/src/gallium/drivers/trace/tr_screen.c +++ b/src/gallium/drivers/trace/tr_screen.c @@ -140,7 +140,7 @@ trace_screen_is_format_supported(struct pipe_screen *_screen, trace_dump_call_begin(stream, "pipe_screen", "is_format_supported"); trace_dump_arg(stream, ptr, screen); - trace_dump_arg(stream, int, format); + trace_dump_arg(stream, format, format); trace_dump_arg(stream, int, target); trace_dump_arg(stream, uint, tex_usage); trace_dump_arg(stream, uint, geom_flags); diff --git a/src/gallium/drivers/trace/tr_state.c b/src/gallium/drivers/trace/tr_state.c index f18f5c611ed..f17006dd816 100644 --- a/src/gallium/drivers/trace/tr_state.c +++ b/src/gallium/drivers/trace/tr_state.c @@ -36,7 +36,7 @@ void trace_dump_format(struct trace_stream *stream, enum pipe_format format) { - trace_dump_int(stream, format); + trace_dump_enum(stream, pf_name(format) ); } @@ -80,7 +80,7 @@ void trace_dump_template(struct trace_stream *stream, trace_dump_struct_begin(stream, "pipe_texture"); trace_dump_member(stream, int, templat, target); - trace_dump_member(stream, int, templat, format); + trace_dump_member(stream, format, templat, format); trace_dump_member_begin(stream, "width"); trace_dump_array(stream, uint, templat->width, 1); diff --git a/src/gallium/drivers/trace/trace.xsl b/src/gallium/drivers/trace/trace.xsl index 194c8b2efdb..3c84c4c35af 100644 --- a/src/gallium/drivers/trace/trace.xsl +++ b/src/gallium/drivers/trace/trace.xsl @@ -71,7 +71,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. <xsl:apply-templates /> </xsl:template> - <xsl:template match="bool|int|uint"> + <xsl:template match="bool|int|uint|enum"> <span class="lit"> <xsl:value-of select="text()"/> </span> |