Module: Mesa Branch: main Commit: 21dd30569450b05a98c71b116df03c46f29c4da5 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=21dd30569450b05a98c71b116df03c46f29c4da5
Author: Dave Airlie <[email protected]> Date: Fri Jul 22 13:59:11 2022 +1000 llvmpipe: fix aniso cube map arrays. There was a coordinate missing when you have cube map arrays, and aniso sampling. Reviewed-By: Mike Blumenkrantz <[email protected]> Fixes: ce2b711c0a5d ("gallivm: add support for anisotropic sampling.") Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17704> --- src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c b/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c index 626934aa86a..a30aa119c23 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c @@ -2397,10 +2397,11 @@ lp_build_sample_aniso(struct lp_build_sample_context *bld, wnz = LLVMBuildSExt(builder, wnz, bld->int_coord_bld.vec_type, ""); wnz = lp_build_any_true_range(&bld->coord_bld, bld->coord_bld.type.length, wnz); lp_build_if(&noloadw0, gallivm, wnz); - LLVMValueRef new_coords[3]; + LLVMValueRef new_coords[4]; new_coords[0] = lp_build_div(coord_bld, lp_build_int_to_float(coord_bld, u_val), width_dim); new_coords[1] = lp_build_div(coord_bld, lp_build_int_to_float(coord_bld, v_val), height_dim); new_coords[2] = coords[2]; + new_coords[3] = coords[3]; /* lookup q in filter table */ LLVMValueRef temp_colors[4];
