Merge branch '7.8'
[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
43 #ifdef __cplusplus
44 extern "C" {
45 #endif
46
47
48 #define UTIL_DUMP_INVALID_NAME "<invalid>"
49
50
51 struct os_stream;
52
53
54 /* Duplicated here for convenience */
55 extern struct os_stream *
56 os_log_stream;
57
58
59 /*
60 * p_defines.h
61 *
62 * XXX: These functions don't really dump anything -- just translate into
63 * strings so a verb better than "dump" should be used instead, in order to
64 * free up the namespace to the true dumper functions.
65 */
66
67 const char *
68 util_dump_blend_factor(unsigned value, boolean shortened);
69
70 const char *
71 util_dump_blend_func(unsigned value, boolean shortened);
72
73 const char *
74 util_dump_func(unsigned value, boolean shortened);
75
76 const char *
77 util_dump_tex_target(unsigned value, boolean shortened);
78
79 const char *
80 util_dump_tex_wrap(unsigned value, boolean shortened);
81
82 const char *
83 util_dump_tex_mipfilter(unsigned value, boolean shortened);
84
85 const char *
86 util_dump_tex_filter(unsigned value, boolean shortened);
87
88
89 /*
90 * p_state.h, through an os_stream
91 */
92
93 void
94 util_dump_template(struct os_stream *stream,
95 const struct pipe_resource *templat);
96
97 void
98 util_dump_rasterizer_state(struct os_stream *stream,
99 const struct pipe_rasterizer_state *state);
100
101 void
102 util_dump_poly_stipple(struct os_stream *stream,
103 const struct pipe_poly_stipple *state);
104
105 void
106 util_dump_viewport_state(struct os_stream *stream,
107 const struct pipe_viewport_state *state);
108
109 void
110 util_dump_scissor_state(struct os_stream *stream,
111 const struct pipe_scissor_state *state);
112
113 void
114 util_dump_clip_state(struct os_stream *stream,
115 const struct pipe_clip_state *state);
116
117 void
118 util_dump_shader_state(struct os_stream *stream,
119 const struct pipe_shader_state *state);
120
121 void
122 util_dump_depth_stencil_alpha_state(struct os_stream *stream,
123 const struct pipe_depth_stencil_alpha_state *state);
124
125 void
126 util_dump_rt_blend_state(struct os_stream *stream,
127 const struct pipe_rt_blend_state *state);
128
129 void
130 util_dump_blend_state(struct os_stream *stream,
131 const struct pipe_blend_state *state);
132
133 void
134 util_dump_blend_color(struct os_stream *stream,
135 const struct pipe_blend_color *state);
136
137 void
138 util_dump_stencil_ref(struct os_stream *stream,
139 const struct pipe_stencil_ref *state);
140
141 void
142 util_dump_framebuffer_state(struct os_stream *stream,
143 const struct pipe_framebuffer_state *state);
144
145 void
146 util_dump_sampler_state(struct os_stream *stream,
147 const struct pipe_sampler_state *state);
148
149 void
150 util_dump_surface(struct os_stream *stream,
151 const struct pipe_surface *state);
152
153 void
154 util_dump_transfer(struct os_stream *stream,
155 const struct pipe_transfer *state);
156
157 void
158 util_dump_vertex_buffer(struct os_stream *stream,
159 const struct pipe_vertex_buffer *state);
160
161 void
162 util_dump_vertex_element(struct os_stream *stream,
163 const struct pipe_vertex_element *state);
164
165
166 /* FIXME: Move the other debug_dump_xxx functions out of u_debug.h into here. */
167
168
169 #ifdef __cplusplus
170 }
171 #endif
172
173 #endif /* U_DEBUG_H_ */