Mesa (main): gallivm: fix oob image detection for cube/1dArray/2dArray/cubeArray
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed Mar 16 05:22:08 UTC 2022
Module: Mesa
Branch: main
Commit: 6345575f8a9e97f5856e53a1c3aee4474c4433c2
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=6345575f8a9e97f5856e53a1c3aee4474c4433c2
Author: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Date: Mon Mar 14 16:19:25 2022 -0400
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 at redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15388>
---
src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c | 2 +-
1 file changed, 1 insertion(+), 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 ce58db67e79..8417cdd79fc 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c
+++ b/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c
@@ -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);
}
More information about the mesa-commit
mailing list