From: José Fonseca Date: Fri, 5 Jul 2013 13:34:34 +0000 (+0100) Subject: gallivm: Remove bogus assert. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=45f174ce40c8eab006e8f032ffc40703050a639b;p=mesa.git gallivm: Remove bogus assert. It is perfectly valid for the swizzle to be bigger than 2. For example the texel offsets could be SAMPLE ..., IMM[0].zzz What is not correct is for chan_index to be bigger than 2. Trivial. --- diff --git a/src/gallium/auxiliary/gallivm/lp_bld_tgsi.c b/src/gallium/auxiliary/gallivm/lp_bld_tgsi.c index 66ff14c888a..495940caf80 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_tgsi.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_tgsi.c @@ -390,11 +390,8 @@ lp_build_emit_fetch_texoffset( if (chan_index == LP_CHAN_ALL) { swizzle = ~0; } else { + assert(chan_index < TGSI_SWIZZLE_W); swizzle = tgsi_util_get_src_register_swizzle(®.Register, chan_index); - if (swizzle > 2) { - assert(0 && "invalid swizzle in emit_fetch_texoffset()"); - return bld_base->base.undef; - } } assert(off->Index <= bld_base->info->file_max[off->File]);