1
2#ifndef __NOUVEAU_DEBUG_H__
3#define __NOUVEAU_DEBUG_H__
4
5#include <stdio.h>
6
7#include "util/u_debug.h"
8
9#define NOUVEAU_DEBUG_MISC       0x0001
10#define NOUVEAU_DEBUG_USE_TGSI   0x0002
11#define NOUVEAU_DEBUG_SHADER     0x0100
12#define NOUVEAU_DEBUG_PROG_IR    0x0200
13#define NOUVEAU_DEBUG_PROG_RA    0x0400
14#define NOUVEAU_DEBUG_PROG_CFLOW 0x0800
15#define NOUVEAU_DEBUG_PROG_ALL   0x1f00
16
17#define NOUVEAU_DEBUG 0
18
19#define NOUVEAU_ERR(fmt, args...)                                 \
20   fprintf(stderr, "%s:%d - " fmt, __FUNCTION__, __LINE__, ##args)
21
22#define NOUVEAU_DBG(ch, args...)           \
23   if ((NOUVEAU_DEBUG) & (NOUVEAU_DEBUG_##ch))        \
24      debug_printf(args)
25
26#endif /* __NOUVEAU_DEBUG_H__ */
27