diff --git a/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c b/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c index 6af22d0c378..9a18ef33ded 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c @@ -2208,8 +2208,10 @@ lp_build_sample_common(struct lp_build_sample_context *bld, */ switch (mip_filter) { default: - assert(0 && "bad mip_filter value in lp_build_sample_soa()"); + debug_assert(0 && "bad mip_filter value in lp_build_sample_soa()"); +#if defined(NDEBUG) || defined(DEBUG) FALLTHROUGH; +#endif case PIPE_TEX_MIPFILTER_NONE: /* always use mip level 0 */ first_level = bld->dynamic_state->first_level(bld->dynamic_state, diff --git a/src/gallium/auxiliary/gallivm/lp_bld_swizzle.c b/src/gallium/auxiliary/gallivm/lp_bld_swizzle.c index 875271883e1..ea2ec780f16 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_swizzle.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_swizzle.c @@ -408,7 +408,9 @@ lp_build_swizzle_aos(struct lp_build_context *bld, switch (swizzles[i]) { default: assert(0); +#if defined(NDEBUG) || defined(DEBUG) FALLTHROUGH; +#endif case PIPE_SWIZZLE_X: case PIPE_SWIZZLE_Y: case PIPE_SWIZZLE_Z: diff --git a/src/gallium/drivers/freedreno/freedreno_util.h b/src/gallium/drivers/freedreno/freedreno_util.h index dd7658bee18..064987265c2 100644 --- a/src/gallium/drivers/freedreno/freedreno_util.h +++ b/src/gallium/drivers/freedreno/freedreno_util.h @@ -426,7 +426,9 @@ fd_msaa_samples(unsigned samples) switch (samples) { default: debug_assert(0); +#if defined(NDEBUG) || defined(DEBUG) FALLTHROUGH; +#endif case 0: case 1: return MSAA_ONE; diff --git a/src/gallium/frontends/vdpau/vdpau_private.h b/src/gallium/frontends/vdpau/vdpau_private.h index 68523e3214a..7e77aa354bc 100644 --- a/src/gallium/frontends/vdpau/vdpau_private.h +++ b/src/gallium/frontends/vdpau/vdpau_private.h @@ -144,8 +144,10 @@ FormatYCBCRToPipe(VdpYCbCrFormat vdpau_format) #endif default: /* NOTE: Can't be "unreachable", as it's quite reachable. */ - assert(!"unexpected VdpYCbCrFormat"); + debug_assert(!"unexpected VdpYCbCrFormat"); +#if defined(NDEBUG) || defined(DEBUG) FALLTHROUGH; +#endif #ifdef VDP_YCBCR_FORMAT_Y_UV_444 case VDP_YCBCR_FORMAT_Y_UV_444: #endif diff --git a/src/mesa/state_tracker/st_texture.c b/src/mesa/state_tracker/st_texture.c index 1327fb56f90..d63628fcd87 100644 --- a/src/mesa/state_tracker/st_texture.c +++ b/src/mesa/state_tracker/st_texture.c @@ -184,7 +184,9 @@ st_gl_texture_dims_to_pipe_dims(GLenum texture, break; default: assert(0 && "Unexpected texture in st_gl_texture_dims_to_pipe_dims()"); +#if defined(NDEBUG) || defined(DEBUG) FALLTHROUGH; +#endif case GL_TEXTURE_3D: case GL_PROXY_TEXTURE_3D: *widthOut = widthIn;