gallivm: fix oob image detection for cube/1dArray/2dArray/cubeArray

these all need to check for z coord oob to avoid crashing

cc: mesa-stable

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15388>
This commit is contained in:
Mike Blumenkrantz 2022-03-14 16:19:25 -04:00 committed by Marge Bot
parent b7fbaf924d
commit 6345575f8a

View file

@ -4660,7 +4660,7 @@ lp_build_img_op_soa(const struct lp_static_texture_state *static_texture_state,
out1 = lp_build_cmp(&int_coord_bld, PIPE_FUNC_GEQUAL, y, height);
out_of_bounds = lp_build_or(&int_coord_bld, out_of_bounds, out1);
}
if (dims >= 3) {
if (dims >= 3 || layer_coord) {
out1 = lp_build_cmp(&int_coord_bld, PIPE_FUNC_GEQUAL, z, depth);
out_of_bounds = lp_build_or(&int_coord_bld, out_of_bounds, out1);
}