trace: Dump blend state as a binary blob.
authorJosé Fonseca <jfonseca@vmware.com>
Mon, 15 Feb 2010 00:22:29 +0000 (00:22 +0000)
committerJosé Fonseca <jfonseca@vmware.com>
Mon, 15 Feb 2010 00:22:29 +0000 (00:22 +0000)
Gallium interfaces are too fluid -- XML or not is just too much work
trying to accommodate for differences in traces.

SWIG generated bindings are also full of quirks, making unmarshalling
the XML from too hard.

Finally, this is the first step for faster tracing.

src/gallium/drivers/trace/tr_dump_state.c

index ee6a6e75370f3cd6c5e51cd969938f792ff99c6c..6da186a655523b73f730a2816848ca3d60446765 100644 (file)
@@ -292,29 +292,8 @@ void trace_dump_depth_stencil_alpha_state(const struct pipe_depth_stencil_alpha_
    trace_dump_struct_end();
 }
 
-static void trace_dump_rt_blend_state(const struct pipe_rt_blend_state *state)
-{
-   trace_dump_struct_begin("pipe_rt_blend_state");
-
-   trace_dump_member(uint, state, blend_enable);
-
-   trace_dump_member(uint, state, rgb_func);
-   trace_dump_member(uint, state, rgb_src_factor);
-   trace_dump_member(uint, state, rgb_dst_factor);
-
-   trace_dump_member(uint, state, alpha_func);
-   trace_dump_member(uint, state, alpha_src_factor);
-   trace_dump_member(uint, state, alpha_dst_factor);
-
-   trace_dump_member(uint, state, colormask);
-
-   trace_dump_struct_end();
-}
-
 void trace_dump_blend_state(const struct pipe_blend_state *state)
 {
-   unsigned valid_entries = 1;
-
    if (!trace_dumping_enabled_locked())
       return;
 
@@ -323,22 +302,7 @@ void trace_dump_blend_state(const struct pipe_blend_state *state)
       return;
    }
 
-   trace_dump_struct_begin("pipe_blend_state");
-
-   trace_dump_member(bool, state, dither);
-
-   trace_dump_member(bool, state, logicop_enable);
-   trace_dump_member(uint, state, logicop_func);
-
-   trace_dump_member(bool, state, independent_blend_enable);
-
-   trace_dump_member_begin("rt");
-   if (state->independent_blend_enable)
-      valid_entries = PIPE_MAX_COLOR_BUFS;
-   trace_dump_struct_array(rt_blend_state, state->rt, valid_entries);
-   trace_dump_member_end();
-
-   trace_dump_struct_end();
+   trace_dump_bytes(state, sizeof *state);
 }