From 45f174ce40c8eab006e8f032ffc40703050a639b Mon Sep 17 00:00:00 2001 From: José Fonseca Date: Fri, 5 Jul 2013 14:34:34 +0100 Subject: 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. --- src/gallium/auxiliary/gallivm/lp_bld_tgsi.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/gallium') 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]); -- cgit v1.2.3