diff --git a/hw/xbox/nv2a/debug.h b/hw/xbox/nv2a/debug.h index a843df3259..ef5d21c47d 100644 --- a/hw/xbox/nv2a/debug.h +++ b/hw/xbox/nv2a/debug.h @@ -30,8 +30,11 @@ } \ } while (0) -// #define DEBUG_NV2A -#ifdef DEBUG_NV2A +#ifndef DEBUG_NV2A +# define DEBUG_NV2A 0 +#endif + +#if DEBUG_NV2A # define NV2A_DPRINTF(format, ...) printf("nv2a: " format, ## __VA_ARGS__) #else # define NV2A_DPRINTF(format, ...) do { } while (0) @@ -42,9 +45,11 @@ * varying degree, but should otherwise not crash the system. Enable this * macro for debugging. */ -// #define DEBUG_NV2A_FEATURES 1 +#ifndef DEBUG_NV2A_FEATURES +# define DEBUG_NV2A_FEATURES 0 +#endif -#ifdef DEBUG_NV2A_FEATURES +#if DEBUG_NV2A_FEATURES /* Feature which has not yet been confirmed */ #define NV2A_UNCONFIRMED(format, ...) do { \ diff --git a/hw/xbox/nv2a/pgraph/gl/debug.c b/hw/xbox/nv2a/pgraph/gl/debug.c index 8e7f49e47c..968941dc7e 100644 --- a/hw/xbox/nv2a/pgraph/gl/debug.c +++ b/hw/xbox/nv2a/pgraph/gl/debug.c @@ -21,7 +21,7 @@ #include "renderer.h" #include "debug.h" -#ifdef DEBUG_NV2A_GL +#if DEBUG_NV2A_GL #include #include diff --git a/hw/xbox/nv2a/pgraph/gl/debug.h b/hw/xbox/nv2a/pgraph/gl/debug.h index c242e1f384..1220244da8 100644 --- a/hw/xbox/nv2a/pgraph/gl/debug.h +++ b/hw/xbox/nv2a/pgraph/gl/debug.h @@ -21,8 +21,11 @@ #ifndef HW_XBOX_NV2A_PGRAPH_GL_DEBUG_H #define HW_XBOX_NV2A_PGRAPH_GL_DEBUG_H -// #define DEBUG_NV2A_GL -#ifdef DEBUG_NV2A_GL +#ifndef DEBUG_NV2A_GL +# define DEBUG_NV2A_GL 0 +#endif + +#if DEBUG_NV2A_GL #include #include "gloffscreen.h" diff --git a/hw/xbox/nv2a/pgraph/gl/renderer.c b/hw/xbox/nv2a/pgraph/gl/renderer.c index f91a192b25..87b647d50d 100644 --- a/hw/xbox/nv2a/pgraph/gl/renderer.c +++ b/hw/xbox/nv2a/pgraph/gl/renderer.c @@ -43,7 +43,7 @@ static void pgraph_gl_init(NV2AState *d, Error **errp) /* fire up opengl */ glo_set_current(g_nv2a_context_render); -#ifdef DEBUG_NV2A_GL +#if DEBUG_NV2A_GL gl_debug_initialize(); #endif diff --git a/hw/xbox/nv2a/pgraph/pgraph.c b/hw/xbox/nv2a/pgraph/pgraph.c index d75bdd2827..36e818c3c4 100644 --- a/hw/xbox/nv2a/pgraph/pgraph.c +++ b/hw/xbox/nv2a/pgraph/pgraph.c @@ -136,7 +136,7 @@ void pgraph_write(void *opaque, hwaddr addr, uint64_t val, unsigned int size) NV_PGRAPH_CHANNEL_CTX_POINTER_INST) << 4; if (val & NV_PGRAPH_CHANNEL_CTX_TRIGGER_READ_IN) { -#ifdef DEBUG_NV2A +#if DEBUG_NV2A unsigned pgraph_channel_id = PG_GET_MASK(NV_PGRAPH_CTX_USER, NV_PGRAPH_CTX_USER_CHID); #endif diff --git a/hw/xbox/nv2a/pgraph/texture.c b/hw/xbox/nv2a/pgraph/texture.c index e5350ea8d4..9b3c15fb72 100644 --- a/hw/xbox/nv2a/pgraph/texture.c +++ b/hw/xbox/nv2a/pgraph/texture.c @@ -238,7 +238,7 @@ TextureShape pgraph_get_texture_shape(PGRAPHState *pg, int texture_idx) unsigned int rect_height = GET_MASK(pgraph_reg_r(pg, NV_PGRAPH_TEXIMAGERECT0 + i*4), NV_PGRAPH_TEXIMAGERECT0_HEIGHT); -#ifdef DEBUG_NV2A +#if DEBUG_NV2A unsigned int lod_bias = GET_MASK(filter, NV_PGRAPH_TEXFILTER0_MIPMAP_LOD_BIAS); #endif