Path: blob/21.2-virgl/src/gallium/drivers/svga/svga_debug.h
4570 views
/**********************************************************1* Copyright 2008-2009 VMware, Inc. All rights reserved.2*3* Permission is hereby granted, free of charge, to any person4* obtaining a copy of this software and associated documentation5* files (the "Software"), to deal in the Software without6* restriction, including without limitation the rights to use, copy,7* modify, merge, publish, distribute, sublicense, and/or sell copies8* of the Software, and to permit persons to whom the Software is9* furnished to do so, subject to the following conditions:10*11* The above copyright notice and this permission notice shall be12* included in all copies or substantial portions of the Software.13*14* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,15* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF16* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND17* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS18* BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN19* ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN20* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE21* SOFTWARE.22*23**********************************************************/2425#ifndef SVGA_DEBUG_H26#define SVGA_DEBUG_H2728#include "pipe/p_compiler.h"29#include "util/u_debug.h"3031#define DEBUG_DMA 0x132#define DEBUG_TGSI 0x433#define DEBUG_PIPE 0x834#define DEBUG_STATE 0x1035#define DEBUG_SCREEN 0x2036#define DEBUG_TEX 0x4037#define DEBUG_SWTNL 0x8038#define DEBUG_CONSTS 0x10039#define DEBUG_VIEWPORT 0x20040#define DEBUG_VIEWS 0x40041#define DEBUG_PERF 0x800 /* print something when we hit any slow path operation */42#define DEBUG_FLUSH 0x1000 /* flush after every draw */43#define DEBUG_SYNC 0x2000 /* sync after every flush */44#define DEBUG_QUERY 0x400045#define DEBUG_CACHE 0x800046#define DEBUG_STREAMOUT 0x1000047#define DEBUG_SAMPLERS 0x2000048#define DEBUG_RETRY 0x1000004950#ifdef DEBUG51extern int SVGA_DEBUG;52#define DBSTR(x) x53#else54#define SVGA_DEBUG 055#define DBSTR(x) ""56#endif5758static inline void59SVGA_DBG( unsigned flag, const char *fmt, ... )60{61#ifdef DEBUG62if (SVGA_DEBUG & flag)63{64va_list args;6566va_start( args, fmt );67debug_vprintf( fmt, args );68va_end( args );69}70#else71(void)flag;72(void)fmt;73#endif74}757677#endif787980