mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-07 02:10:12 +01:00
nouveau: flip DEBUG -> !NDEBUG
The meson conversion chose to change the meaning of DEBUG to "used for debugging" to be "used for expensive things for debugging", primarily for nir_validate. Flip things over so that we get nice things with optimizations enabled. While we're at it, also kill off nouveau_statebuf.h which is unused (and has a mention of DEBUG which is how I found it). Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Karol Herbst <kherbst@redhat.com>
This commit is contained in:
parent
9f8ed5aa67
commit
23dfff0669
10 changed files with 15 additions and 49 deletions
|
|
@ -12,7 +12,6 @@ C_SOURCES := \
|
|||
nouveau_mm.h \
|
||||
nouveau_screen.c \
|
||||
nouveau_screen.h \
|
||||
nouveau_statebuf.h \
|
||||
nouveau_video.c \
|
||||
nouveau_video.h \
|
||||
nouveau_vp3_video_bsp.c \
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ struct nv50_ir_varying
|
|||
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)
|
||||
|
|
|
|||
|
|
@ -222,7 +222,7 @@ Instruction *Value::getUniqueInsn() const
|
|||
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)
|
||||
|
|
|
|||
|
|
@ -36,14 +36,14 @@
|
|||
#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...) \
|
||||
|
|
|
|||
|
|
@ -32,7 +32,6 @@ files_libnouveau = files(
|
|||
'nouveau_mm.h',
|
||||
'nouveau_screen.c',
|
||||
'nouveau_screen.h',
|
||||
'nouveau_statebuf.h',
|
||||
'nouveau_video.c',
|
||||
'nouveau_video.h',
|
||||
'nouveau_vp3_video_bsp.c',
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
#include "util/u_atomic.h"
|
||||
#include "util/u_memory.h"
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifndef NDEBUG
|
||||
# define NOUVEAU_ENABLE_DRIVER_STATISTICS
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -1,32 +0,0 @@
|
|||
#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
|
||||
|
|
@ -378,7 +378,7 @@ nv50_program_translate(struct nv50_program *prog, uint16_t chipset,
|
|||
|
||||
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);
|
||||
|
|
|
|||
|
|
@ -544,7 +544,7 @@ nvc0_program_create_tfb_state(const struct nv50_ir_prog_info *info,
|
|||
return tfb;
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifndef NDEBUG
|
||||
static void
|
||||
nvc0_program_dump(struct nvc0_program *prog)
|
||||
{
|
||||
|
|
@ -594,7 +594,7 @@ nvc0_program_translate(struct nvc0_program *prog, uint16_t chipset,
|
|||
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);
|
||||
|
|
@ -714,7 +714,7 @@ nvc0_program_translate(struct nvc0_program *prog, uint16_t chipset,
|
|||
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
|
||||
|
|
@ -880,7 +880,7 @@ nvc0_program_upload(struct nvc0_context *nvc0, struct nvc0_program *prog)
|
|||
|
||||
nvc0_program_upload_code(nvc0, prog);
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifndef NDEBUG
|
||||
if (debug_get_bool_option("NV50_PROG_DEBUG", false))
|
||||
nvc0_program_dump(prog);
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@
|
|||
|
||||
#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
|
||||
|
|
@ -741,7 +741,7 @@ nve4_launch_grid(struct pipe_context *pipe, const struct pipe_grid_info *info)
|
|||
|
||||
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);
|
||||
|
|
@ -878,7 +878,7 @@ nve4_compute_validate_textures(struct nvc0_context *nvc0)
|
|||
}
|
||||
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifndef NDEBUG
|
||||
static const char *nve4_cache_split_name(unsigned value)
|
||||
{
|
||||
switch (value) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue