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