diff options
author | José Fonseca <[email protected]> | 2013-07-05 14:34:34 +0100 |
---|---|---|
committer | José Fonseca <[email protected]> | 2013-07-05 14:35:54 +0100 |
commit | 45f174ce40c8eab006e8f032ffc40703050a639b (patch) | |
tree | 43bf4bf6c2ca8d37305fcbcbd73b4fdd4f58b731 /src/gallium | |
parent | c29c6b2b2e65f73c75c70daae1d2d32e53964120 (diff) |
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.
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/auxiliary/gallivm/lp_bld_tgsi.c | 5 |
1 files changed, 1 insertions, 4 deletions
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]); |