Path: blob/21.2-virgl/src/gallium/auxiliary/util/u_dump.h
4561 views
/**************************************************************************1*2* Copyright 2009 VMware, Inc.3* All Rights Reserved.4*5* Permission is hereby granted, free of charge, to any person obtaining a6* copy of this software and associated documentation files (the7* "Software"), to deal in the Software without restriction, including8* without limitation the rights to use, copy, modify, merge, publish,9* distribute, sub license, and/or sell copies of the Software, and to10* permit persons to whom the Software is furnished to do so, subject to11* the following conditions:12*13* The above copyright notice and this permission notice (including the14* next paragraph) shall be included in all copies or substantial portions15* of the Software.16*17* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS18* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF19* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.20* IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR21* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,22* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE23* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.24*25**************************************************************************/2627/**28* @file29* Dump data in human/machine readable format.30*31* @author Jose Fonseca <[email protected]>32*/3334#ifndef U_DEBUG_DUMP_H_35#define U_DEBUG_DUMP_H_363738#include "pipe/p_compiler.h"39#include "pipe/p_state.h"4041#include <stdio.h>424344#ifdef __cplusplus45extern "C" {46#endif474849#define UTIL_DUMP_INVALID_NAME "<invalid>"505152/*53* p_defines.h54*/5556const char *57util_str_blend_factor(unsigned value, boolean shortened);5859const char *60util_str_blend_func(unsigned value, boolean shortened);6162const char *63util_str_logicop(unsigned value, boolean shortened);6465const char *66util_str_func(unsigned value, boolean shortened);6768const char *69util_str_stencil_op(unsigned value, boolean shortened);7071const char *72util_str_tex_target(unsigned value, boolean shortened);7374const char *75util_str_tex_wrap(unsigned value, boolean shortened);7677const char *78util_str_tex_mipfilter(unsigned value, boolean shortened);7980const char *81util_str_tex_filter(unsigned value, boolean shortened);8283const char *84util_str_query_type(unsigned value, boolean shortened);8586const char *87util_str_query_value_type(unsigned value, boolean shortened);8889const char *90util_str_prim_mode(unsigned value, boolean shortened);9192void93util_dump_ns(FILE *f, uint64_t time);9495void96util_dump_ptr(FILE *stream, const void *value);9798void99util_dump_query_type(FILE *stream, unsigned value);100101void102util_dump_query_value_type(FILE *stream, unsigned value);103104void105util_dump_transfer_usage(FILE *stream, unsigned value);106107/*108* p_state.h, through a FILE109*/110111void112util_dump_resource(FILE *stream, const struct pipe_resource *state);113114void115util_dump_rasterizer_state(FILE *stream,116const struct pipe_rasterizer_state *state);117118void119util_dump_poly_stipple(FILE *stream,120const struct pipe_poly_stipple *state);121122void123util_dump_viewport_state(FILE *stream,124const struct pipe_viewport_state *state);125126void127util_dump_scissor_state(FILE *stream,128const struct pipe_scissor_state *state);129130void131util_dump_clip_state(FILE *stream,132const struct pipe_clip_state *state);133134void135util_dump_shader_state(FILE *stream,136const struct pipe_shader_state *state);137138void139util_dump_depth_stencil_alpha_state(FILE *stream,140const struct pipe_depth_stencil_alpha_state *state);141142void143util_dump_rt_blend_state(FILE *stream,144const struct pipe_rt_blend_state *state);145146void147util_dump_blend_state(FILE *stream,148const struct pipe_blend_state *state);149150void151util_dump_blend_color(FILE *stream,152const struct pipe_blend_color *state);153154void155util_dump_stencil_ref(FILE *stream,156const struct pipe_stencil_ref *state);157158void159util_dump_framebuffer_state(FILE *stream,160const struct pipe_framebuffer_state *state);161162void163util_dump_sampler_state(FILE *stream,164const struct pipe_sampler_state *state);165166void167util_dump_surface(FILE *stream,168const struct pipe_surface *state);169170void171util_dump_image_view(FILE *stream, const struct pipe_image_view *state);172173void174util_dump_shader_buffer(FILE *stream, const struct pipe_shader_buffer *state);175176void177util_dump_sampler_view(FILE *stream, const struct pipe_sampler_view *state);178179void180util_dump_transfer(FILE *stream,181const struct pipe_transfer *state);182183void184util_dump_constant_buffer(FILE *stream,185const struct pipe_constant_buffer *state);186187void188util_dump_vertex_buffer(FILE *stream,189const struct pipe_vertex_buffer *state);190191void192util_dump_vertex_element(FILE *stream,193const struct pipe_vertex_element *state);194195void196util_dump_stream_output_target(FILE *stream,197const struct pipe_stream_output_target *state);198199void200util_dump_draw_info(FILE *stream, const struct pipe_draw_info *state);201202void203util_dump_draw_start_count_bias(FILE *stream, const struct pipe_draw_start_count_bias *state);204205void206util_dump_draw_indirect_info(FILE *stream,207const struct pipe_draw_indirect_info *indirect);208209void210util_dump_grid_info(FILE *stream, const struct pipe_grid_info *state);211212void213util_dump_box(FILE *stream, const struct pipe_box *box);214215void216util_dump_blit_info(FILE *stream, const struct pipe_blit_info *info);217218/* FIXME: Move the other debug_dump_xxx functions out of u_debug.h into here. */219220221#ifdef __cplusplus222}223#endif224225#endif /* U_DEBUG_H_ */226227228