#include "cubetexture9.h"
#include "volumetexture9.h"
-#ifdef DEBUG
+#if defined(DEBUG) || !defined(NDEBUG)
#include "nine_pipe.h"
#include "nine_dump.h"
#endif
BASETEX_REGISTER_UPDATE(This);
}
-#ifdef DEBUG
+#if defined(DEBUG) || !defined(NDEBUG)
void
NineBaseTexture9_Dump( struct NineBaseTexture9 *This )
{
This->base.info.array_size, This->base.info.last_level,
This->managed.lod, This->managed.lod_resident);
}
-#endif /* DEBUG */
+#endif /* DEBUG || !NDEBUG */
nine_bind(slot, tex);
}
-#ifdef DEBUG
+#if defined(DEBUG) || !defined(NDEBUG)
void
NineBaseTexture9_Dump( struct NineBaseTexture9 *This );
#else
for (func += 4; func != f; ++func) { *ptr++ = tolower(*func); }
*ptr = '\0';
if (tid)
- debug_printf("nine:0x%08lx:%s:%s: ", tid, klass, ++f);
+ _debug_printf("nine:0x%08lx:%s:%s: ", tid, klass, ++f);
else
- debug_printf("nine:%s:%s: ", klass, ++f);
+ _debug_printf("nine:%s:%s: ", klass, ++f);
} else if (func) {
if (tid)
- debug_printf("nine:0x%08lx:%s ", tid, func);
+ _debug_printf("nine:0x%08lx:%s ", tid, func);
else
- debug_printf("nine:%s ", func);
+ _debug_printf("nine:%s ", func);
}
va_start(ap, fmt);
- debug_vprintf(fmt, ap);
+ _debug_vprintf(fmt, ap);
va_end(ap);
}
}
{
const char *r = strrchr(file, '/');
if (r == NULL) { r = strrchr(file, '\\'); }
- debug_printf("nine:%s:%d: %s STUB!\n", r ? ++r : file, line, func);
+ _debug_printf("nine:%s:%d: %s STUB!\n", r ? ++r : file, line, func);
}
#define ERR(fmt, ...) _nine_debug_printf(DBG_ERROR, __FUNCTION__, fmt, ## __VA_ARGS__)
-#ifdef DEBUG
+#if defined(DEBUG) || !defined(NDEBUG)
#define WARN(fmt, ...) _nine_debug_printf(DBG_WARN, __FUNCTION__, fmt, ## __VA_ARGS__)
#define WARN_ONCE(fmt, ...) \
do { \
#define WARN_ONCE(fmt, ...)
#endif
-#ifdef DEBUG
+#if defined(DEBUG) || !defined(NDEBUG)
#define DBG_FLAG(flag, fmt, ...) \
_nine_debug_printf(flag, __FUNCTION__, fmt, ## __VA_ARGS__)
#else
const char *func,
unsigned line );
-#ifdef DEBUG
+#if defined(DEBUG) || !defined(NDEBUG)
#define STUB(ret) \
do { \
_nine_stub(__FILE__, __FUNCTION__, __LINE__); \
* macro is designed to be used in conditionals ala
* if (user_error(required condition)) { assertion failed }
* It also prints debug message if the assertion fails. */
-#ifdef DEBUG
+#if defined(DEBUG) || !defined(NDEBUG)
#define user_error(x) \
(!(x) ? (DBG_FLAG(DBG_USER, "User assertion failed: `%s'\n", #x), TRUE) \
: FALSE)
#define user_error(x) (!(x) ? TRUE : FALSE)
#endif
-#ifdef DEBUG
+#if defined(DEBUG) || !defined(NDEBUG)
#define user_warn(x) \
if ((x)) { DBG_FLAG(DBG_USER, "User warning: `%s'\n", #x); }
#else
#include "nine_dump.h"
-#ifdef DEBUG
+#if defined(DEBUG) || !defined(NDEBUG)
static char __thread tls[128];
FREE(s);
}
-#endif /* DEBUG */
+#endif /* DEBUG || !NDEBUG */
const char *nine_D3DLOCK_to_str(DWORD);
const char *nine_D3DSAMP_to_str(DWORD);
-#ifdef DEBUG
+#if defined(DEBUG) || !defined(NDEBUG)
void
nine_dump_D3DADAPTER_IDENTIFIER9(unsigned, const D3DADAPTER_IDENTIFIER9 *);
void
nine_dump_D3DTSS_value(unsigned, D3DTEXTURESTAGESTATETYPE, DWORD);
-#else /* !DEBUG */
+#else /* !DEBUG && NDEBUG */
static inline void
nine_dump_D3DADAPTER_IDENTIFIER9(unsigned ch, const D3DADAPTER_IDENTIFIER9 *id)
nine_dump_D3DTSS_value(unsigned ch, D3DTEXTURESTAGESTATETYPE tss, DWORD value)
{ }
-#endif /* DEBUG */
+#endif /* DEBUG || !NDEBUG */
#endif /* _NINE_DUMP_H_H_ */
for (k = 0; k < 4; k++)
D->m[i][k] *= det;
-#ifdef DEBUG
+#if defined(DEBUG) || !defined(NDEBUG)
{
D3DMATRIX I;
(void) mtx_init(&ctx->thread_running, mtx_plain);
(void) mtx_init(&ctx->thread_resume, mtx_plain);
-#if DEBUG
+#if defined(DEBUG) || !defined(NDEBUG)
u_thread_setname("Main thread");
#endif
assert(This->surface[1]);
}
-#ifdef DEBUG
+#if defined(DEBUG) || !defined(NDEBUG)
void
NineSurface9_Dump( struct NineSurface9 *This )
{
NineUnknown_Release(NineUnknown(tex));
}
}
-#endif /* DEBUG */
+#endif /* DEBUG || !NDEBUG */
HRESULT NINE_WINAPI
NineSurface9_GetContainer( struct NineSurface9 *This,
return This->base.usage == 0 && !This->texture;
}
-#ifdef DEBUG
+#if defined(DEBUG) || !defined(NDEBUG)
void
NineSurface9_Dump( struct NineSurface9 *This );
#else
NineVolume9_MarkContainerDirty( struct NineVolume9 *This )
{
struct NineBaseTexture9 *tex;
-#ifdef DEBUG
+#if defined(DEBUG) || !defined(NDEBUG)
/* This is always contained by a NineVolumeTexture9. */
GUID id = IID_IDirect3DVolumeTexture9;
REFIID ref = &id;