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