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 39989c60bc9221e0918153a29206c786514c4a5f3dVinson Lee#include "glheader.h" 4076a5fed50196e1168ce463dec66be34c5d7d1e50Vinson Lee#include "mfeatures.h" 4176a5fed50196e1168ce463dec66be34c5d7d1e50Vinson Lee 4276a5fed50196e1168ce463dec66be34c5d7d1e50Vinson Leestruct gl_context; 4376a5fed50196e1168ce463dec66be34c5d7d1e50Vinson Leestruct gl_texture_image; 44989c60bc9221e0918153a29206c786514c4a5f3dVinson Lee 456dc85575000127630489b407c50a4b3ea87c9acbKeith Whitwell#if _HAVE_FULL_GL 466dc85575000127630489b407c50a4b3ea87c9acbKeith Whitwell 476dc85575000127630489b407c50a4b3ea87c9acbKeith Whitwellextern void _mesa_print_tri_caps( const char *name, GLuint flags ); 486dc85575000127630489b407c50a4b3ea87c9acbKeith Whitwellextern void _mesa_print_enable_flags( const char *msg, GLuint flags ); 496dc85575000127630489b407c50a4b3ea87c9acbKeith Whitwellextern void _mesa_print_state( const char *msg, GLuint state ); 506dc85575000127630489b407c50a4b3ea87c9acbKeith Whitwellextern void _mesa_print_info( void ); 51f9995b30756140724f41daf963fa06167912be7fKristian Høgsbergextern void _mesa_init_debug( struct gl_context *ctx ); 526dc85575000127630489b407c50a4b3ea87c9acbKeith Whitwell 536dc85575000127630489b407c50a4b3ea87c9acbKeith Whitwell#else 546dc85575000127630489b407c50a4b3ea87c9acbKeith Whitwell 556dc85575000127630489b407c50a4b3ea87c9acbKeith Whitwell/** No-op */ 566dc85575000127630489b407c50a4b3ea87c9acbKeith Whitwell#define _mesa_print_state( m, s ) ((void)0) 576dc85575000127630489b407c50a4b3ea87c9acbKeith Whitwell 586dc85575000127630489b407c50a4b3ea87c9acbKeith Whitwell/** No-op */ 596dc85575000127630489b407c50a4b3ea87c9acbKeith Whitwell#define _mesa_print_info() ((void)0) 606dc85575000127630489b407c50a4b3ea87c9acbKeith Whitwell 616dc85575000127630489b407c50a4b3ea87c9acbKeith Whitwell/** No-op */ 626dc85575000127630489b407c50a4b3ea87c9acbKeith Whitwell#define _mesa_init_debug( c ) ((void)0) 636dc85575000127630489b407c50a4b3ea87c9acbKeith Whitwell 646dc85575000127630489b407c50a4b3ea87c9acbKeith Whitwell#endif 6523caf20169ac38436ee9c13914f1d6aa7cf6bb5eKeith Whitwell 66266fe93a87d5c0c21e9e7960699104e0e8bd54b4Brian Paulextern void 67e162f28228ed56ff041ae870b96b813a52dd6b54Brian Paul_mesa_write_renderbuffer_image(const struct gl_renderbuffer *rb); 68e162f28228ed56ff041ae870b96b813a52dd6b54Brian Paul 69e162f28228ed56ff041ae870b96b813a52dd6b54Brian Paulextern void 70403181b91355c733883d0a6d7f48440212226d45Brian Paul_mesa_dump_texture(GLuint texture, GLuint writeImages); 71488e67bab267dd687dbe83e52974ad4519906fccBrian Paul 72488e67bab267dd687dbe83e52974ad4519906fccBrian Paulextern void 73403181b91355c733883d0a6d7f48440212226d45Brian Paul_mesa_dump_textures(GLuint writeImages); 74266fe93a87d5c0c21e9e7960699104e0e8bd54b4Brian Paul 7502f73c43b4060b58fa0d9b3da4753cbbccde3c84Brian Paulextern void 76403181b91355c733883d0a6d7f48440212226d45Brian Paul_mesa_dump_renderbuffers(GLboolean writeImages); 772cc5a0e6bb8fe2aa0733d70fec65df934b1093f6Brian Paul 782cc5a0e6bb8fe2aa0733d70fec65df934b1093f6Brian Paulextern void 7902f73c43b4060b58fa0d9b3da4753cbbccde3c84Brian Paul_mesa_dump_color_buffer(const char *filename); 8002f73c43b4060b58fa0d9b3da4753cbbccde3c84Brian Paul 8102f73c43b4060b58fa0d9b3da4753cbbccde3c84Brian Paulextern void 8202f73c43b4060b58fa0d9b3da4753cbbccde3c84Brian Paul_mesa_dump_depth_buffer(const char *filename); 8302f73c43b4060b58fa0d9b3da4753cbbccde3c84Brian Paul 8402f73c43b4060b58fa0d9b3da4753cbbccde3c84Brian Paulextern void 8502f73c43b4060b58fa0d9b3da4753cbbccde3c84Brian Paul_mesa_dump_stencil_buffer(const char *filename); 8602f73c43b4060b58fa0d9b3da4753cbbccde3c84Brian Paul 8767df4fb56bcb72eddcfc187454d95b663cc43578Brian Paulextern void 88e1a9ef2304e9dc688b604fab889964922e76b6feBrian Paul_mesa_dump_image(const char *filename, const void *image, GLuint w, GLuint h, 89e1a9ef2304e9dc688b604fab889964922e76b6feBrian Paul GLenum format, GLenum type); 90e1a9ef2304e9dc688b604fab889964922e76b6feBrian Paul 91e1a9ef2304e9dc688b604fab889964922e76b6feBrian Paulextern void 92b8950c2225930c928bd727424201a1e95410626dBrian Paul_mesa_print_texture(struct gl_context *ctx, struct gl_texture_image *img); 9367df4fb56bcb72eddcfc187454d95b663cc43578Brian Paul 9423caf20169ac38436ee9c13914f1d6aa7cf6bb5eKeith Whitwell#endif 95