llvmpipe: fix aniso cube map arrays.

There was a coordinate missing when you have cube map arrays,
and aniso sampling.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Fixes: ce2b711c0a ("gallivm: add support for anisotropic sampling.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17704>
This commit is contained in:
Dave Airlie 2022-07-22 13:59:11 +10:00
parent 02d6d43f54
commit 21dd305694

View file

@ -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];