nouveau_mm.h \
nouveau_screen.c \
nouveau_screen.h \
- nouveau_statebuf.h \
nouveau_video.c \
nouveau_video.h \
nouveau_vp3_video_bsp.c \
ubyte si; /* TGSI semantic index */
};
-#ifdef DEBUG
+#ifndef NDEBUG
# define NV50_IR_DEBUG_BASIC (1 << 0)
# define NV50_IR_DEBUG_VERBOSE (2 << 0)
# define NV50_IR_DEBUG_REG_ALLOC (1 << 2)
return (*it)->getInsn();
// should be unreachable and trigger assertion at the end
}
-#ifdef DEBUG
+#ifndef NDEBUG
if (reg.data.id < 0) {
int n = 0;
for (DefCIterator it = defs.begin(); n < 2 && it != defs.end(); ++it)
#include "util/u_inlines.h"
#include "util/u_memory.h"
-#define ERROR(args...) debug_printf("ERROR: " args)
-#define WARN(args...) debug_printf("WARNING: " args)
-#define INFO(args...) debug_printf(args)
+#define ERROR(args...) _debug_printf("ERROR: " args)
+#define WARN(args...) _debug_printf("WARNING: " args)
+#define INFO(args...) _debug_printf(args)
#define INFO_DBG(m, f, args...) \
do { \
if (m & NV50_IR_DEBUG_##f) \
- debug_printf(args); \
+ _debug_printf(args); \
} while(0)
#define FATAL(args...) \
'nouveau_mm.h',
'nouveau_screen.c',
'nouveau_screen.h',
- 'nouveau_statebuf.h',
'nouveau_video.c',
'nouveau_video.h',
'nouveau_vp3_video_bsp.c',
#include "util/u_atomic.h"
#include "util/u_memory.h"
-#ifdef DEBUG
+#ifndef NDEBUG
# define NOUVEAU_ENABLE_DRIVER_STATISTICS
#endif
+++ /dev/null
-#ifndef __NOUVEAU_STATEBUF_H__
-#define __NOUVEAU_STATEBUF_H__
-
-/* state buffers: lightweight state objects interface */
-/* relocations are not supported, but Gallium CSOs don't require them */
-
-struct nouveau_statebuf_builder
-{
- uint32_t* p;
-#ifdef DEBUG
- uint32_t* pend;
-#endif
-};
-
-#ifdef DEBUG
-#define sb_init(var) {var, var + sizeof(var) / sizeof((var)[0])}
-#define sb_data(sb, v) do {assert((sb).p != (sb).pend); *(sb).p++ = (v);} while(0)
-#else
-#define sb_init(var) {var}
-#define sb_data(sb, v) *(sb).p++ = (v)
-#endif
-
-static inline uint32_t sb_header(unsigned subc, unsigned mthd, unsigned size)
-{
- return (size << 18) | (subc << 13) | mthd;
-}
-
-#define sb_method(sb, v, n) sb_data(sb, sb_header(SUBC_3D(v), n));
-
-#define sb_len(sb, var) ((sb).p - (var))
-#define sb_emit(push, sb_buf, sb_len) do {PUSH_SPACE((push), (sb_len)); PUSH_DATAp((push), (sb_buf), (sb_len)); } while(0)
-#endif
info->driverPriv = prog;
-#ifdef DEBUG
+#ifndef NDEBUG
info->optLevel = debug_get_num_option("NV50_PROG_OPTIMIZE", 3);
info->dbgFlags = debug_get_num_option("NV50_PROG_DEBUG", 0);
info->omitLineNum = debug_get_num_option("NV50_PROG_DEBUG_OMIT_LINENUM", 0);
return tfb;
}
-#ifdef DEBUG
+#ifndef NDEBUG
static void
nvc0_program_dump(struct nvc0_program *prog)
{
return false;
}
-#ifdef DEBUG
+#ifndef NDEBUG
info->target = debug_get_num_option("NV50_PROG_CHIPSET", chipset);
info->optLevel = debug_get_num_option("NV50_PROG_OPTIMIZE", 3);
info->dbgFlags = debug_get_num_option("NV50_PROG_DEBUG", 0);
prog->num_gprs, info->bin.instructions,
info->bin.codeSize);
-#ifdef DEBUG
+#ifndef NDEBUG
if (debug_get_option("NV50_PROG_CHIPSET", NULL) && info->dbgFlags)
nvc0_program_dump(prog);
#endif
nvc0_program_upload_code(nvc0, prog);
-#ifdef DEBUG
+#ifndef NDEBUG
if (debug_get_bool_option("NV50_PROG_DEBUG", false))
nvc0_program_dump(prog);
#endif
#include "codegen/nv50_ir_driver.h"
-#ifdef DEBUG
+#ifndef NDEBUG
static void nve4_compute_dump_launch_desc(const struct nve4_cp_launch_desc *);
static void gp100_compute_dump_launch_desc(const struct gp100_cp_launch_desc *);
#endif
nve4_compute_upload_input(nvc0, info);
-#ifdef DEBUG
+#ifndef NDEBUG
if (debug_get_num_option("NV50_PROG_DEBUG", 0)) {
if (nvc0->screen->compute->oclass >= GP100_COMPUTE_CLASS)
gp100_compute_dump_launch_desc(desc);
}
-#ifdef DEBUG
+#ifndef NDEBUG
static const char *nve4_cache_split_name(unsigned value)
{
switch (value) {