diff --git a/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c b/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c index 09f6080fca2..da07fa4bc8a 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c @@ -3201,9 +3201,16 @@ lp_build_fetch_texel(struct lp_build_sample_context *bld, * Could use min/max above instead of out-of-bounds comparisons * if we don't care about the result returned for out-of-bounds. */ + LLVMValueRef oob[4] = { + bld->texel_bld.zero, + bld->texel_bld.zero, + bld->texel_bld.zero, + bld->texel_bld.zero, + }; + lp_build_format_swizzle_soa(bld->format_desc, &bld->texel_bld, oob, oob); for (chan = 0; chan < 4; chan++) { colors_out[chan] = lp_build_select(&bld->texel_bld, out_of_bounds, - bld->texel_bld.zero, colors_out[chan]); + oob[chan], colors_out[chan]); } } }