debug.h revision 488e67bab267dd687dbe83e52974ad4519906fcc
122144ab7552f0799bcfca506bf4ffa7f70a06649Gareth Hughes/*
222144ab7552f0799bcfca506bf4ffa7f70a06649Gareth Hughes * Mesa 3-D graphics library
3a999e809af97e32cc1198ca816dcacc735a0a4afBrian Paul * Version:  6.1
422144ab7552f0799bcfca506bf4ffa7f70a06649Gareth Hughes *
5a999e809af97e32cc1198ca816dcacc735a0a4afBrian Paul * Copyright (C) 1999-2004  Brian Paul   All Rights Reserved.
622144ab7552f0799bcfca506bf4ffa7f70a06649Gareth Hughes *
722144ab7552f0799bcfca506bf4ffa7f70a06649Gareth Hughes * Permission is hereby granted, free of charge, to any person obtaining a
822144ab7552f0799bcfca506bf4ffa7f70a06649Gareth Hughes * copy of this software and associated documentation files (the "Software"),
922144ab7552f0799bcfca506bf4ffa7f70a06649Gareth Hughes * to deal in the Software without restriction, including without limitation
1022144ab7552f0799bcfca506bf4ffa7f70a06649Gareth Hughes * the rights to use, copy, modify, merge, publish, distribute, sublicense,
1122144ab7552f0799bcfca506bf4ffa7f70a06649Gareth Hughes * and/or sell copies of the Software, and to permit persons to whom the
1222144ab7552f0799bcfca506bf4ffa7f70a06649Gareth Hughes * Software is furnished to do so, subject to the following conditions:
1322144ab7552f0799bcfca506bf4ffa7f70a06649Gareth Hughes *
1422144ab7552f0799bcfca506bf4ffa7f70a06649Gareth Hughes * The above copyright notice and this permission notice shall be included
1522144ab7552f0799bcfca506bf4ffa7f70a06649Gareth Hughes * in all copies or substantial portions of the Software.
1622144ab7552f0799bcfca506bf4ffa7f70a06649Gareth Hughes *
1722144ab7552f0799bcfca506bf4ffa7f70a06649Gareth Hughes * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
1822144ab7552f0799bcfca506bf4ffa7f70a06649Gareth Hughes * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1922144ab7552f0799bcfca506bf4ffa7f70a06649Gareth Hughes * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
2022144ab7552f0799bcfca506bf4ffa7f70a06649Gareth Hughes * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
2122144ab7552f0799bcfca506bf4ffa7f70a06649Gareth Hughes * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
2222144ab7552f0799bcfca506bf4ffa7f70a06649Gareth Hughes * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
2322144ab7552f0799bcfca506bf4ffa7f70a06649Gareth Hughes */
2422144ab7552f0799bcfca506bf4ffa7f70a06649Gareth Hughes
25a999e809af97e32cc1198ca816dcacc735a0a4afBrian Paul/**
26a999e809af97e32cc1198ca816dcacc735a0a4afBrian Paul * \file debug.h
27a999e809af97e32cc1198ca816dcacc735a0a4afBrian Paul * Debugging functions.
28a999e809af97e32cc1198ca816dcacc735a0a4afBrian Paul *
29a999e809af97e32cc1198ca816dcacc735a0a4afBrian Paul * \if subset
30a999e809af97e32cc1198ca816dcacc735a0a4afBrian Paul * (No-op)
31a999e809af97e32cc1198ca816dcacc735a0a4afBrian Paul *
32a999e809af97e32cc1198ca816dcacc735a0a4afBrian Paul * \endif
33a999e809af97e32cc1198ca816dcacc735a0a4afBrian Paul */
34a999e809af97e32cc1198ca816dcacc735a0a4afBrian Paul
356dc85575000127630489b407c50a4b3ea87c9acbKeith Whitwell
3623caf20169ac38436ee9c13914f1d6aa7cf6bb5eKeith Whitwell#ifndef _DEBUG_H
3723caf20169ac38436ee9c13914f1d6aa7cf6bb5eKeith Whitwell#define _DEBUG_H
3823caf20169ac38436ee9c13914f1d6aa7cf6bb5eKeith Whitwell
396dc85575000127630489b407c50a4b3ea87c9acbKeith Whitwell#if _HAVE_FULL_GL
406dc85575000127630489b407c50a4b3ea87c9acbKeith Whitwell
416dc85575000127630489b407c50a4b3ea87c9acbKeith Whitwellextern void _mesa_print_tri_caps( const char *name, GLuint flags );
426dc85575000127630489b407c50a4b3ea87c9acbKeith Whitwellextern void _mesa_print_enable_flags( const char *msg, GLuint flags );
436dc85575000127630489b407c50a4b3ea87c9acbKeith Whitwellextern void _mesa_print_state( const char *msg, GLuint state );
446dc85575000127630489b407c50a4b3ea87c9acbKeith Whitwellextern void _mesa_print_info( void );
456dc85575000127630489b407c50a4b3ea87c9acbKeith Whitwellextern void _mesa_init_debug( GLcontext *ctx );
466dc85575000127630489b407c50a4b3ea87c9acbKeith Whitwell
476dc85575000127630489b407c50a4b3ea87c9acbKeith Whitwell#else
486dc85575000127630489b407c50a4b3ea87c9acbKeith Whitwell
496dc85575000127630489b407c50a4b3ea87c9acbKeith Whitwell/** No-op */
506dc85575000127630489b407c50a4b3ea87c9acbKeith Whitwell#define _mesa_print_state( m, s ) ((void)0)
516dc85575000127630489b407c50a4b3ea87c9acbKeith Whitwell
526dc85575000127630489b407c50a4b3ea87c9acbKeith Whitwell/** No-op */
536dc85575000127630489b407c50a4b3ea87c9acbKeith Whitwell#define _mesa_print_info() ((void)0)
546dc85575000127630489b407c50a4b3ea87c9acbKeith Whitwell
556dc85575000127630489b407c50a4b3ea87c9acbKeith Whitwell/** No-op */
566dc85575000127630489b407c50a4b3ea87c9acbKeith Whitwell#define _mesa_init_debug( c ) ((void)0)
576dc85575000127630489b407c50a4b3ea87c9acbKeith Whitwell
586dc85575000127630489b407c50a4b3ea87c9acbKeith Whitwell#endif
5923caf20169ac38436ee9c13914f1d6aa7cf6bb5eKeith Whitwell
60266fe93a87d5c0c21e9e7960699104e0e8bd54b4Brian Paulextern void
61488e67bab267dd687dbe83e52974ad4519906fccBrian Paul_mesa_dump_texture(GLuint texture, GLboolean dumpImages);
62488e67bab267dd687dbe83e52974ad4519906fccBrian Paul
63488e67bab267dd687dbe83e52974ad4519906fccBrian Paulextern void
64266fe93a87d5c0c21e9e7960699104e0e8bd54b4Brian Paul_mesa_dump_textures(GLboolean dumpImages);
65266fe93a87d5c0c21e9e7960699104e0e8bd54b4Brian Paul
6602f73c43b4060b58fa0d9b3da4753cbbccde3c84Brian Paulextern void
672cc5a0e6bb8fe2aa0733d70fec65df934b1093f6Brian Paul_mesa_dump_renderbuffers(GLboolean dumpImages);
682cc5a0e6bb8fe2aa0733d70fec65df934b1093f6Brian Paul
692cc5a0e6bb8fe2aa0733d70fec65df934b1093f6Brian Paulextern void
7002f73c43b4060b58fa0d9b3da4753cbbccde3c84Brian Paul_mesa_dump_color_buffer(const char *filename);
7102f73c43b4060b58fa0d9b3da4753cbbccde3c84Brian Paul
7202f73c43b4060b58fa0d9b3da4753cbbccde3c84Brian Paulextern void
7302f73c43b4060b58fa0d9b3da4753cbbccde3c84Brian Paul_mesa_dump_depth_buffer(const char *filename);
7402f73c43b4060b58fa0d9b3da4753cbbccde3c84Brian Paul
7502f73c43b4060b58fa0d9b3da4753cbbccde3c84Brian Paulextern void
7602f73c43b4060b58fa0d9b3da4753cbbccde3c84Brian Paul_mesa_dump_stencil_buffer(const char *filename);
7702f73c43b4060b58fa0d9b3da4753cbbccde3c84Brian Paul
7823caf20169ac38436ee9c13914f1d6aa7cf6bb5eKeith Whitwell#endif
79