u_blitter: add a msaa parameter to util_blitter_clear
[mesa.git] / src / gallium / drivers / svga / svga_debug.h
1 /**********************************************************
2 * Copyright 2008-2009 VMware, Inc. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person
5 * obtaining a copy of this software and associated documentation
6 * files (the "Software"), to deal in the Software without
7 * restriction, including without limitation the rights to use, copy,
8 * modify, merge, publish, distribute, sublicense, and/or sell copies
9 * of the Software, and to permit persons to whom the Software is
10 * furnished to do so, subject to the following conditions:
11 *
12 * The above copyright notice and this permission notice shall be
13 * included in all copies or substantial portions of the Software.
14 *
15 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
19 * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
20 * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
21 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 * SOFTWARE.
23 *
24 **********************************************************/
25
26 #ifndef SVGA_DEBUG_H
27 #define SVGA_DEBUG_H
28
29 #include "pipe/p_compiler.h"
30 #include "util/u_debug.h"
31
32 #define DEBUG_DMA 0x1
33 #define DEBUG_TGSI 0x4
34 #define DEBUG_PIPE 0x8
35 #define DEBUG_STATE 0x10
36 #define DEBUG_SCREEN 0x20
37 #define DEBUG_TEX 0x40
38 #define DEBUG_SWTNL 0x80
39 #define DEBUG_CONSTS 0x100
40 #define DEBUG_VIEWPORT 0x200
41 #define DEBUG_VIEWS 0x400
42 #define DEBUG_PERF 0x800 /* print something when we hit any slow path operation */
43 #define DEBUG_FLUSH 0x1000 /* flush after every draw */
44 #define DEBUG_SYNC 0x2000 /* sync after every flush */
45 #define DEBUG_QUERY 0x4000
46 #define DEBUG_CACHE 0x8000
47 #define DEBUG_STREAMOUT 0x10000
48 #define DEBUG_SAMPLERS 0x20000
49
50 #ifdef DEBUG
51 extern int SVGA_DEBUG;
52 #define DBSTR(x) x
53 #else
54 #define SVGA_DEBUG 0
55 #define DBSTR(x) ""
56 #endif
57
58 static inline void
59 SVGA_DBG( unsigned flag, const char *fmt, ... )
60 {
61 #ifdef DEBUG
62 if (SVGA_DEBUG & flag)
63 {
64 va_list args;
65
66 va_start( args, fmt );
67 debug_vprintf( fmt, args );
68 va_end( args );
69 }
70 #else
71 (void)flag;
72 (void)fmt;
73 #endif
74 }
75
76
77 #endif