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