1bf215546Sopenharmony_ci/**************************************************************************
2bf215546Sopenharmony_ci *
3bf215546Sopenharmony_ci * Copyright 2009 VMware, Inc.
4bf215546Sopenharmony_ci * All Rights Reserved.
5bf215546Sopenharmony_ci *
6bf215546Sopenharmony_ci * Permission is hereby granted, free of charge, to any person obtaining a
7bf215546Sopenharmony_ci * copy of this software and associated documentation files (the
8bf215546Sopenharmony_ci * "Software"), to deal in the Software without restriction, including
9bf215546Sopenharmony_ci * without limitation the rights to use, copy, modify, merge, publish,
10bf215546Sopenharmony_ci * distribute, sub license, and/or sell copies of the Software, and to
11bf215546Sopenharmony_ci * permit persons to whom the Software is furnished to do so, subject to
12bf215546Sopenharmony_ci * the following conditions:
13bf215546Sopenharmony_ci *
14bf215546Sopenharmony_ci * The above copyright notice and this permission notice (including the
15bf215546Sopenharmony_ci * next paragraph) shall be included in all copies or substantial portions
16bf215546Sopenharmony_ci * of the Software.
17bf215546Sopenharmony_ci *
18bf215546Sopenharmony_ci * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
19bf215546Sopenharmony_ci * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
20bf215546Sopenharmony_ci * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
21bf215546Sopenharmony_ci * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR
22bf215546Sopenharmony_ci * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
23bf215546Sopenharmony_ci * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
24bf215546Sopenharmony_ci * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
25bf215546Sopenharmony_ci *
26bf215546Sopenharmony_ci **************************************************************************/
27bf215546Sopenharmony_ci
28bf215546Sopenharmony_ci/**
29bf215546Sopenharmony_ci * @file
30bf215546Sopenharmony_ci * Dump data in human/machine readable format.
31bf215546Sopenharmony_ci *
32bf215546Sopenharmony_ci * @author Jose Fonseca <jfonseca@vmware.com>
33bf215546Sopenharmony_ci */
34bf215546Sopenharmony_ci
35bf215546Sopenharmony_ci#ifndef U_DEBUG_DUMP_H_
36bf215546Sopenharmony_ci#define U_DEBUG_DUMP_H_
37bf215546Sopenharmony_ci
38bf215546Sopenharmony_ci
39bf215546Sopenharmony_ci#include "pipe/p_compiler.h"
40bf215546Sopenharmony_ci#include "pipe/p_state.h"
41bf215546Sopenharmony_ci
42bf215546Sopenharmony_ci#include <stdio.h>
43bf215546Sopenharmony_ci
44bf215546Sopenharmony_ci
45bf215546Sopenharmony_ci#ifdef __cplusplus
46bf215546Sopenharmony_ciextern "C" {
47bf215546Sopenharmony_ci#endif
48bf215546Sopenharmony_ci
49bf215546Sopenharmony_ci
50bf215546Sopenharmony_ci#define UTIL_DUMP_INVALID_NAME "<invalid>"
51bf215546Sopenharmony_ci
52bf215546Sopenharmony_ci
53bf215546Sopenharmony_ci/*
54bf215546Sopenharmony_ci * p_defines.h
55bf215546Sopenharmony_ci */
56bf215546Sopenharmony_ci
57bf215546Sopenharmony_ciconst char *
58bf215546Sopenharmony_ciutil_str_blend_factor(unsigned value, boolean shortened);
59bf215546Sopenharmony_ci
60bf215546Sopenharmony_ciconst char *
61bf215546Sopenharmony_ciutil_str_blend_func(unsigned value, boolean shortened);
62bf215546Sopenharmony_ci
63bf215546Sopenharmony_ciconst char *
64bf215546Sopenharmony_ciutil_str_logicop(unsigned value, boolean shortened);
65bf215546Sopenharmony_ci
66bf215546Sopenharmony_ciconst char *
67bf215546Sopenharmony_ciutil_str_func(unsigned value, boolean shortened);
68bf215546Sopenharmony_ci
69bf215546Sopenharmony_ciconst char *
70bf215546Sopenharmony_ciutil_str_stencil_op(unsigned value, boolean shortened);
71bf215546Sopenharmony_ci
72bf215546Sopenharmony_ciconst char *
73bf215546Sopenharmony_ciutil_str_tex_target(unsigned value, boolean shortened);
74bf215546Sopenharmony_ci
75bf215546Sopenharmony_ciconst char *
76bf215546Sopenharmony_ciutil_str_tex_wrap(unsigned value, boolean shortened);
77bf215546Sopenharmony_ci
78bf215546Sopenharmony_ciconst char *
79bf215546Sopenharmony_ciutil_str_tex_mipfilter(unsigned value, boolean shortened);
80bf215546Sopenharmony_ci
81bf215546Sopenharmony_ciconst char *
82bf215546Sopenharmony_ciutil_str_tex_filter(unsigned value, boolean shortened);
83bf215546Sopenharmony_ci
84bf215546Sopenharmony_ciconst char *
85bf215546Sopenharmony_ciutil_str_query_type(unsigned value, boolean shortened);
86bf215546Sopenharmony_ci
87bf215546Sopenharmony_ciconst char *
88bf215546Sopenharmony_ciutil_str_query_value_type(unsigned value, boolean shortened);
89bf215546Sopenharmony_ci
90bf215546Sopenharmony_ciconst char *
91bf215546Sopenharmony_ciutil_str_prim_mode(unsigned value, boolean shortened);
92bf215546Sopenharmony_ci
93bf215546Sopenharmony_civoid
94bf215546Sopenharmony_ciutil_dump_ns(FILE *f, uint64_t time);
95bf215546Sopenharmony_ci
96bf215546Sopenharmony_civoid
97bf215546Sopenharmony_ciutil_dump_ptr(FILE *stream, const void *value);
98bf215546Sopenharmony_ci
99bf215546Sopenharmony_civoid
100bf215546Sopenharmony_ciutil_dump_query_type(FILE *stream, unsigned value);
101bf215546Sopenharmony_ci
102bf215546Sopenharmony_civoid
103bf215546Sopenharmony_ciutil_dump_query_value_type(FILE *stream, unsigned value);
104bf215546Sopenharmony_ci
105bf215546Sopenharmony_civoid
106bf215546Sopenharmony_ciutil_dump_query_flags(FILE *stream, unsigned value);
107bf215546Sopenharmony_ci
108bf215546Sopenharmony_civoid
109bf215546Sopenharmony_ciutil_dump_transfer_usage(FILE *stream, unsigned value);
110bf215546Sopenharmony_ci
111bf215546Sopenharmony_ci/*
112bf215546Sopenharmony_ci * p_state.h, through a FILE
113bf215546Sopenharmony_ci */
114bf215546Sopenharmony_ci
115bf215546Sopenharmony_civoid
116bf215546Sopenharmony_ciutil_dump_resource(FILE *stream, const struct pipe_resource *state);
117bf215546Sopenharmony_ci
118bf215546Sopenharmony_civoid
119bf215546Sopenharmony_ciutil_dump_rasterizer_state(FILE *stream,
120bf215546Sopenharmony_ci                           const struct pipe_rasterizer_state *state);
121bf215546Sopenharmony_ci
122bf215546Sopenharmony_civoid
123bf215546Sopenharmony_ciutil_dump_poly_stipple(FILE *stream,
124bf215546Sopenharmony_ci                       const struct pipe_poly_stipple *state);
125bf215546Sopenharmony_ci
126bf215546Sopenharmony_civoid
127bf215546Sopenharmony_ciutil_dump_viewport_state(FILE *stream,
128bf215546Sopenharmony_ci                         const struct pipe_viewport_state *state);
129bf215546Sopenharmony_ci
130bf215546Sopenharmony_civoid
131bf215546Sopenharmony_ciutil_dump_scissor_state(FILE *stream,
132bf215546Sopenharmony_ci                        const struct pipe_scissor_state *state);
133bf215546Sopenharmony_ci
134bf215546Sopenharmony_civoid
135bf215546Sopenharmony_ciutil_dump_clip_state(FILE *stream,
136bf215546Sopenharmony_ci                     const struct pipe_clip_state *state);
137bf215546Sopenharmony_ci
138bf215546Sopenharmony_civoid
139bf215546Sopenharmony_ciutil_dump_stream_output_info(FILE *stream,
140bf215546Sopenharmony_ci                             const struct pipe_stream_output_info *state);
141bf215546Sopenharmony_ci
142bf215546Sopenharmony_civoid
143bf215546Sopenharmony_ciutil_dump_shader_state(FILE *stream,
144bf215546Sopenharmony_ci                       const struct pipe_shader_state *state);
145bf215546Sopenharmony_ci
146bf215546Sopenharmony_civoid
147bf215546Sopenharmony_ciutil_dump_depth_stencil_alpha_state(FILE *stream,
148bf215546Sopenharmony_ci                                    const struct pipe_depth_stencil_alpha_state *state);
149bf215546Sopenharmony_ci
150bf215546Sopenharmony_civoid
151bf215546Sopenharmony_ciutil_dump_rt_blend_state(FILE *stream,
152bf215546Sopenharmony_ci                         const struct pipe_rt_blend_state *state);
153bf215546Sopenharmony_ci
154bf215546Sopenharmony_civoid
155bf215546Sopenharmony_ciutil_dump_blend_state(FILE *stream,
156bf215546Sopenharmony_ci                      const struct pipe_blend_state *state);
157bf215546Sopenharmony_ci
158bf215546Sopenharmony_civoid
159bf215546Sopenharmony_ciutil_dump_blend_color(FILE *stream,
160bf215546Sopenharmony_ci                      const struct pipe_blend_color *state);
161bf215546Sopenharmony_ci
162bf215546Sopenharmony_civoid
163bf215546Sopenharmony_ciutil_dump_stencil_ref(FILE *stream,
164bf215546Sopenharmony_ci                      const struct pipe_stencil_ref *state);
165bf215546Sopenharmony_ci
166bf215546Sopenharmony_civoid
167bf215546Sopenharmony_ciutil_dump_framebuffer_state(FILE *stream,
168bf215546Sopenharmony_ci                            const struct pipe_framebuffer_state *state);
169bf215546Sopenharmony_ci
170bf215546Sopenharmony_civoid
171bf215546Sopenharmony_ciutil_dump_sampler_state(FILE *stream,
172bf215546Sopenharmony_ci                        const struct pipe_sampler_state *state);
173bf215546Sopenharmony_ci
174bf215546Sopenharmony_civoid
175bf215546Sopenharmony_ciutil_dump_surface(FILE *stream,
176bf215546Sopenharmony_ci                  const struct pipe_surface *state);
177bf215546Sopenharmony_ci
178bf215546Sopenharmony_civoid
179bf215546Sopenharmony_ciutil_dump_image_view(FILE *stream, const struct pipe_image_view *state);
180bf215546Sopenharmony_ci
181bf215546Sopenharmony_civoid
182bf215546Sopenharmony_ciutil_dump_shader_buffer(FILE *stream, const struct pipe_shader_buffer *state);
183bf215546Sopenharmony_ci
184bf215546Sopenharmony_civoid
185bf215546Sopenharmony_ciutil_dump_sampler_view(FILE *stream, const struct pipe_sampler_view *state);
186bf215546Sopenharmony_ci
187bf215546Sopenharmony_civoid
188bf215546Sopenharmony_ciutil_dump_transfer(FILE *stream,
189bf215546Sopenharmony_ci                   const struct pipe_transfer *state);
190bf215546Sopenharmony_ci
191bf215546Sopenharmony_civoid
192bf215546Sopenharmony_ciutil_dump_constant_buffer(FILE *stream,
193bf215546Sopenharmony_ci                          const struct pipe_constant_buffer *state);
194bf215546Sopenharmony_ci
195bf215546Sopenharmony_civoid
196bf215546Sopenharmony_ciutil_dump_vertex_buffer(FILE *stream,
197bf215546Sopenharmony_ci                        const struct pipe_vertex_buffer *state);
198bf215546Sopenharmony_ci
199bf215546Sopenharmony_civoid
200bf215546Sopenharmony_ciutil_dump_vertex_element(FILE *stream,
201bf215546Sopenharmony_ci                         const struct pipe_vertex_element *state);
202bf215546Sopenharmony_ci
203bf215546Sopenharmony_civoid
204bf215546Sopenharmony_ciutil_dump_stream_output_target(FILE *stream,
205bf215546Sopenharmony_ci                               const struct pipe_stream_output_target *state);
206bf215546Sopenharmony_ci
207bf215546Sopenharmony_civoid
208bf215546Sopenharmony_ciutil_dump_draw_info(FILE *stream, const struct pipe_draw_info *state);
209bf215546Sopenharmony_ci
210bf215546Sopenharmony_civoid
211bf215546Sopenharmony_ciutil_dump_draw_start_count_bias(FILE *stream, const struct pipe_draw_start_count_bias *state);
212bf215546Sopenharmony_ci
213bf215546Sopenharmony_civoid
214bf215546Sopenharmony_ciutil_dump_draw_indirect_info(FILE *stream,
215bf215546Sopenharmony_ci                             const struct pipe_draw_indirect_info *indirect);
216bf215546Sopenharmony_ci
217bf215546Sopenharmony_civoid
218bf215546Sopenharmony_ciutil_dump_grid_info(FILE *stream, const struct pipe_grid_info *state);
219bf215546Sopenharmony_ci
220bf215546Sopenharmony_civoid
221bf215546Sopenharmony_ciutil_dump_box(FILE *stream, const struct pipe_box *box);
222bf215546Sopenharmony_ci
223bf215546Sopenharmony_civoid
224bf215546Sopenharmony_ciutil_dump_blit_info(FILE *stream, const struct pipe_blit_info *info);
225bf215546Sopenharmony_ci
226bf215546Sopenharmony_ci/* FIXME: Move the other debug_dump_xxx functions out of u_debug.h into here. */
227bf215546Sopenharmony_ci
228bf215546Sopenharmony_ci
229bf215546Sopenharmony_ci#ifdef __cplusplus
230bf215546Sopenharmony_ci}
231bf215546Sopenharmony_ci#endif
232bf215546Sopenharmony_ci
233bf215546Sopenharmony_ci#endif /* U_DEBUG_H_ */
234