gallium/u_dump: export util_dump_ptr
[mesa.git] / src / gallium / auxiliary / util / u_dump.h
1 /**************************************************************************
2 *
3 * Copyright 2009 VMware, Inc.
4 * All Rights Reserved.
5 *
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:
13 *
14 * The above copyright notice and this permission notice (including the
15 * next paragraph) shall be included in all copies or substantial portions
16 * of the Software.
17 *
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.
25 *
26 **************************************************************************/
27
28 /**
29 * @file
30 * Dump data in human/machine readable format.
31 *
32 * @author Jose Fonseca <jfonseca@vmware.com>
33 */
34
35 #ifndef U_DEBUG_DUMP_H_
36 #define U_DEBUG_DUMP_H_
37
38
39 #include "pipe/p_compiler.h"
40 #include "pipe/p_state.h"
41
42 #include <stdio.h>
43
44
45 #ifdef __cplusplus
46 extern "C" {
47 #endif
48
49
50 #define UTIL_DUMP_INVALID_NAME "<invalid>"
51
52
53 /*
54 * p_defines.h
55 */
56
57 const char *
58 util_str_blend_factor(unsigned value, boolean shortened);
59
60 const char *
61 util_str_blend_func(unsigned value, boolean shortened);
62
63 const char *
64 util_str_logicop(unsigned value, boolean shortened);
65
66 const char *
67 util_str_func(unsigned value, boolean shortened);
68
69 const char *
70 util_str_stencil_op(unsigned value, boolean shortened);
71
72 const char *
73 util_str_tex_target(unsigned value, boolean shortened);
74
75 const char *
76 util_str_tex_wrap(unsigned value, boolean shortened);
77
78 const char *
79 util_str_tex_mipfilter(unsigned value, boolean shortened);
80
81 const char *
82 util_str_tex_filter(unsigned value, boolean shortened);
83
84 const char *
85 util_str_query_type(unsigned value, boolean shortened);
86
87 const char *
88 util_str_query_value_type(unsigned value, boolean shortened);
89
90 const char *
91 util_str_prim_mode(unsigned value, boolean shortened);
92
93 void
94 util_dump_ptr(FILE *stream, const void *value);
95
96 void
97 util_dump_query_type(FILE *stream, unsigned value);
98
99 void
100 util_dump_query_value_type(FILE *stream, unsigned value);
101
102 /*
103 * p_state.h, through a FILE
104 */
105
106 void
107 util_dump_resource(FILE *stream, const struct pipe_resource *state);
108
109 void
110 util_dump_rasterizer_state(FILE *stream,
111 const struct pipe_rasterizer_state *state);
112
113 void
114 util_dump_poly_stipple(FILE *stream,
115 const struct pipe_poly_stipple *state);
116
117 void
118 util_dump_viewport_state(FILE *stream,
119 const struct pipe_viewport_state *state);
120
121 void
122 util_dump_scissor_state(FILE *stream,
123 const struct pipe_scissor_state *state);
124
125 void
126 util_dump_clip_state(FILE *stream,
127 const struct pipe_clip_state *state);
128
129 void
130 util_dump_shader_state(FILE *stream,
131 const struct pipe_shader_state *state);
132
133 void
134 util_dump_depth_stencil_alpha_state(FILE *stream,
135 const struct pipe_depth_stencil_alpha_state *state);
136
137 void
138 util_dump_rt_blend_state(FILE *stream,
139 const struct pipe_rt_blend_state *state);
140
141 void
142 util_dump_blend_state(FILE *stream,
143 const struct pipe_blend_state *state);
144
145 void
146 util_dump_blend_color(FILE *stream,
147 const struct pipe_blend_color *state);
148
149 void
150 util_dump_stencil_ref(FILE *stream,
151 const struct pipe_stencil_ref *state);
152
153 void
154 util_dump_framebuffer_state(FILE *stream,
155 const struct pipe_framebuffer_state *state);
156
157 void
158 util_dump_sampler_state(FILE *stream,
159 const struct pipe_sampler_state *state);
160
161 void
162 util_dump_surface(FILE *stream,
163 const struct pipe_surface *state);
164
165 void
166 util_dump_image_view(FILE *stream, const struct pipe_image_view *state);
167
168 void
169 util_dump_shader_buffer(FILE *stream, const struct pipe_shader_buffer *state);
170
171 void
172 util_dump_sampler_view(FILE *stream, const struct pipe_sampler_view *state);
173
174 void
175 util_dump_transfer(FILE *stream,
176 const struct pipe_transfer *state);
177
178 void
179 util_dump_constant_buffer(FILE *stream,
180 const struct pipe_constant_buffer *state);
181
182 void
183 util_dump_vertex_buffer(FILE *stream,
184 const struct pipe_vertex_buffer *state);
185
186 void
187 util_dump_vertex_element(FILE *stream,
188 const struct pipe_vertex_element *state);
189
190 void
191 util_dump_stream_output_target(FILE *stream,
192 const struct pipe_stream_output_target *state);
193
194 void
195 util_dump_draw_info(FILE *stream, const struct pipe_draw_info *state);
196
197 void
198 util_dump_grid_info(FILE *stream, const struct pipe_grid_info *state);
199
200 void
201 util_dump_box(FILE *stream, const struct pipe_box *box);
202
203 void
204 util_dump_blit_info(FILE *stream, const struct pipe_blit_info *info);
205
206 /* FIXME: Move the other debug_dump_xxx functions out of u_debug.h into here. */
207
208
209 #ifdef __cplusplus
210 }
211 #endif
212
213 #endif /* U_DEBUG_H_ */