1 /**************************************************************************
3 * Copyright 2009 VMware, Inc.
6 * Permission is hereby granted, free of charge, to any person obtaining a
7 * copy of this software and associated documentation files (the
8 * "Software"), to deal in the Software without restriction, including
9 * without limitation the rights to use, copy, modify, merge, publish,
10 * distribute, sub license, and/or sell copies of the Software, and to
11 * permit persons to whom the Software is furnished to do so, subject to
12 * the following conditions:
14 * The above copyright notice and this permission notice (including the
15 * next paragraph) shall be included in all copies or substantial portions
18 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
19 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
20 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
21 * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR
22 * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
23 * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
24 * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
26 **************************************************************************/
30 * Dump data in human/machine readable format.
32 * @author Jose Fonseca <jfonseca@vmware.com>
35 #ifndef U_DEBUG_DUMP_H_
36 #define U_DEBUG_DUMP_H_
39 #include "pipe/p_compiler.h"
40 #include "pipe/p_state.h"
50 #define UTIL_DUMP_INVALID_NAME "<invalid>"
58 util_str_blend_factor(unsigned value
, boolean shortened
);
61 util_str_blend_func(unsigned value
, boolean shortened
);
64 util_str_logicop(unsigned value
, boolean shortened
);
67 util_str_func(unsigned value
, boolean shortened
);
70 util_str_stencil_op(unsigned value
, boolean shortened
);
73 util_str_tex_target(unsigned value
, boolean shortened
);
76 util_str_tex_wrap(unsigned value
, boolean shortened
);
79 util_str_tex_mipfilter(unsigned value
, boolean shortened
);
82 util_str_tex_filter(unsigned value
, boolean shortened
);
85 util_str_query_type(unsigned value
, boolean shortened
);
88 util_str_query_value_type(unsigned value
, boolean shortened
);
91 util_str_prim_mode(unsigned value
, boolean shortened
);
94 util_dump_ns(FILE *f
, uint64_t time
);
97 util_dump_ptr(FILE *stream
, const void *value
);
100 util_dump_query_type(FILE *stream
, unsigned value
);
103 util_dump_query_value_type(FILE *stream
, unsigned value
);
106 util_dump_transfer_usage(FILE *stream
, unsigned value
);
109 * p_state.h, through a FILE
113 util_dump_resource(FILE *stream
, const struct pipe_resource
*state
);
116 util_dump_rasterizer_state(FILE *stream
,
117 const struct pipe_rasterizer_state
*state
);
120 util_dump_poly_stipple(FILE *stream
,
121 const struct pipe_poly_stipple
*state
);
124 util_dump_viewport_state(FILE *stream
,
125 const struct pipe_viewport_state
*state
);
128 util_dump_scissor_state(FILE *stream
,
129 const struct pipe_scissor_state
*state
);
132 util_dump_clip_state(FILE *stream
,
133 const struct pipe_clip_state
*state
);
136 util_dump_shader_state(FILE *stream
,
137 const struct pipe_shader_state
*state
);
140 util_dump_depth_stencil_alpha_state(FILE *stream
,
141 const struct pipe_depth_stencil_alpha_state
*state
);
144 util_dump_rt_blend_state(FILE *stream
,
145 const struct pipe_rt_blend_state
*state
);
148 util_dump_blend_state(FILE *stream
,
149 const struct pipe_blend_state
*state
);
152 util_dump_blend_color(FILE *stream
,
153 const struct pipe_blend_color
*state
);
156 util_dump_stencil_ref(FILE *stream
,
157 const struct pipe_stencil_ref
*state
);
160 util_dump_framebuffer_state(FILE *stream
,
161 const struct pipe_framebuffer_state
*state
);
164 util_dump_sampler_state(FILE *stream
,
165 const struct pipe_sampler_state
*state
);
168 util_dump_surface(FILE *stream
,
169 const struct pipe_surface
*state
);
172 util_dump_image_view(FILE *stream
, const struct pipe_image_view
*state
);
175 util_dump_shader_buffer(FILE *stream
, const struct pipe_shader_buffer
*state
);
178 util_dump_sampler_view(FILE *stream
, const struct pipe_sampler_view
*state
);
181 util_dump_transfer(FILE *stream
,
182 const struct pipe_transfer
*state
);
185 util_dump_constant_buffer(FILE *stream
,
186 const struct pipe_constant_buffer
*state
);
189 util_dump_vertex_buffer(FILE *stream
,
190 const struct pipe_vertex_buffer
*state
);
193 util_dump_vertex_element(FILE *stream
,
194 const struct pipe_vertex_element
*state
);
197 util_dump_stream_output_target(FILE *stream
,
198 const struct pipe_stream_output_target
*state
);
201 util_dump_draw_info(FILE *stream
, const struct pipe_draw_info
*state
);
204 util_dump_grid_info(FILE *stream
, const struct pipe_grid_info
*state
);
207 util_dump_box(FILE *stream
, const struct pipe_box
*box
);
210 util_dump_blit_info(FILE *stream
, const struct pipe_blit_info
*info
);
212 /* FIXME: Move the other debug_dump_xxx functions out of u_debug.h into here. */
219 #endif /* U_DEBUG_H_ */