diff options
author | Marek Olšák <[email protected]> | 2019-05-09 21:04:23 -0400 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2019-05-29 21:13:35 -0400 |
commit | b5697c311b6f29dee40b96c48bad3279e3667c1e (patch) | |
tree | d0708cd5249ec8d3535bda8134f91ea79af2ffde /src/gallium/drivers | |
parent | 0f1b68ebeeee196ced42d8ac66d231338b507bad (diff) |
Change a few frequented uses of DEBUG to !NDEBUG
debugoptimized builds don't define NDEBUG, but they also don't define
DEBUG. We want to enable cheap debug code for these builds.
I only chose those occurences that I care about.
Reviewed-by: Mathias Fröhlich <[email protected]>
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r-- | src/gallium/drivers/radeonsi/si_descriptors.c | 2 | ||||
-rw-r--r-- | src/gallium/drivers/radeonsi/si_pipe.h | 2 | ||||
-rw-r--r-- | src/gallium/drivers/radeonsi/si_shader_tgsi_setup.c | 6 | ||||
-rw-r--r-- | src/gallium/drivers/radeonsi/si_state.c | 4 |
4 files changed, 7 insertions, 7 deletions
diff --git a/src/gallium/drivers/radeonsi/si_descriptors.c b/src/gallium/drivers/radeonsi/si_descriptors.c index 4cb6a1abb9a..1cb0ac93caa 100644 --- a/src/gallium/drivers/radeonsi/si_descriptors.c +++ b/src/gallium/drivers/radeonsi/si_descriptors.c @@ -953,7 +953,7 @@ static void si_bind_sampler_states(struct pipe_context *ctx, sstates[i] == samplers->sampler_states[slot]) continue; -#ifdef DEBUG +#ifndef NDEBUG assert(sstates[i]->magic == SI_SAMPLER_STATE_MAGIC); #endif samplers->sampler_states[slot] = sstates[i]; diff --git a/src/gallium/drivers/radeonsi/si_pipe.h b/src/gallium/drivers/radeonsi/si_pipe.h index c663cad0a61..20f769d09fd 100644 --- a/src/gallium/drivers/radeonsi/si_pipe.h +++ b/src/gallium/drivers/radeonsi/si_pipe.h @@ -607,7 +607,7 @@ struct si_sampler_view { #define SI_SAMPLER_STATE_MAGIC 0x34f1c35a struct si_sampler_state { -#ifdef DEBUG +#ifndef NDEBUG unsigned magic; #endif uint32_t val[4]; diff --git a/src/gallium/drivers/radeonsi/si_shader_tgsi_setup.c b/src/gallium/drivers/radeonsi/si_shader_tgsi_setup.c index 3ec919dd23b..f70c41ca8c4 100644 --- a/src/gallium/drivers/radeonsi/si_shader_tgsi_setup.c +++ b/src/gallium/drivers/radeonsi/si_shader_tgsi_setup.c @@ -651,7 +651,7 @@ static void emit_declaration(struct lp_build_tgsi_context *bld_base, } if (!array_alloca) { for (i = 0; i < decl_size; ++i) { -#ifdef DEBUG +#ifndef NDEBUG snprintf(name, sizeof(name), "TEMP%d.%c", first + i / 4, "xyzw"[i % 4]); #endif @@ -681,7 +681,7 @@ static void emit_declaration(struct lp_build_tgsi_context *bld_base, for (i = 0; i < decl_size; ++i) { LLVMValueRef ptr; if (writemask & (1 << (i % 4))) { -#ifdef DEBUG +#ifndef NDEBUG snprintf(name, sizeof(name), "TEMP%d.%c", first + i / 4, "xyzw"[i % 4]); #endif @@ -735,7 +735,7 @@ static void emit_declaration(struct lp_build_tgsi_context *bld_base, if (ctx->outputs[idx][0]) continue; for (chan = 0; chan < TGSI_NUM_CHANNELS; chan++) { -#ifdef DEBUG +#ifndef NDEBUG snprintf(name, sizeof(name), "OUT%d.%c", idx, "xyzw"[chan % 4]); #endif diff --git a/src/gallium/drivers/radeonsi/si_state.c b/src/gallium/drivers/radeonsi/si_state.c index f9e8adc9f5b..9bebafa69a4 100644 --- a/src/gallium/drivers/radeonsi/si_state.c +++ b/src/gallium/drivers/radeonsi/si_state.c @@ -4328,7 +4328,7 @@ static void *si_create_sampler_state(struct pipe_context *ctx, return NULL; } -#ifdef DEBUG +#ifndef NDEBUG rstate->magic = SI_SAMPLER_STATE_MAGIC; #endif rstate->val[0] = (S_008F30_CLAMP_X(si_tex_wrap(state->wrap_s)) | @@ -4407,7 +4407,7 @@ static void si_emit_sample_mask(struct si_context *sctx) static void si_delete_sampler_state(struct pipe_context *ctx, void *state) { -#ifdef DEBUG +#ifndef NDEBUG struct si_sampler_state *s = state; assert(s->magic == SI_SAMPLER_STATE_MAGIC); |