summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gallium/auxiliary/gallivm/lp_bld_tgsi.c5
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(&reg.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]);