llvmpipe: Avoid a crash when using 5 coords with AF

Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32935>
This commit is contained in:
Konstantin Seurer 2025-01-13 19:51:33 +01:00 committed by Marge Bot
parent 3f7564d86b
commit 6701806cd1

View file

@ -2283,12 +2283,13 @@ lp_build_sample_aniso(struct lp_build_sample_context *bld,
LLVMValueRef u_offset = lp_build_mul(coord_bld, float_k, dudk);
LLVMValueRef v_offset = lp_build_mul(coord_bld, float_k, dvdk);
LLVMValueRef sample_coords[4] = {
LLVMValueRef sample_coords[5] = {
lp_build_add(coord_bld, coords[0], u_offset),
lp_build_add(coord_bld, coords[1], v_offset),
coords[2],
coords[3],
};
for (uint32_t i = 2; i < ARRAY_SIZE(sample_coords); i++)
sample_coords[i] = coords[i];
if (bld->static_texture_state->target == PIPE_TEXTURE_CUBE ||
bld->static_texture_state->target == PIPE_TEXTURE_CUBE_ARRAY) {