trace: Dump format names.
authorJosé Fonseca <jrfonseca@tungstengraphics.com>
Thu, 7 Aug 2008 18:46:39 +0000 (19:46 +0100)
committerJosé Fonseca <jrfonseca@tungstengraphics.com>
Thu, 7 Aug 2008 19:58:09 +0000 (20:58 +0100)
src/gallium/drivers/trace/tr_dump.c
src/gallium/drivers/trace/tr_dump.h
src/gallium/drivers/trace/tr_screen.c
src/gallium/drivers/trace/tr_state.c
src/gallium/drivers/trace/trace.xsl

index 0591b9fc336768bbc7499a528659db58f703040c..359a903ab9121a329c936debb35d08d9139b4614 100644 (file)
@@ -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>");
index 5eeac8d3c5eb3a0aa2c2463e0add5929eddb2166..7b15da30330120384ee32bb97d7f49739cb521c6 100644 (file)
@@ -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);
index 20a2026e1d0b8b59138f8e9e115be369cbea4892..3a48654609aed136165adb0cfd249d17f26520c3 100644 (file)
@@ -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);
index f18f5c611ed0aecfecc07a59d36718d46d3435f8..f17006dd816883c688ee62f1e83093b3f281e4f9 100644 (file)
@@ -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);
index 194c8b2efdb0f4b9b46069de3b697ff88700ce54..3c84c4c35af8e6f6f6aa263fb551756c40facb4e 100644 (file)
@@ -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>