intel/blorp: Set array_len for 3D images properly

We need to minify the depth so we don't set a size that's out-of-bounds.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21376>
This commit is contained in:
Faith Ekstrand 2023-02-28 11:14:36 -06:00 committed by Marge Bot
parent 4ee1908ab6
commit 74e6e207fe

View file

@ -189,8 +189,9 @@ brw_blorp_surface_info_init(struct blorp_batch *batch,
.swizzle = ISL_SWIZZLE_IDENTITY,
};
info->view.array_len = MAX2(info->surf.logical_level0_px.depth,
info->surf.logical_level0_px.array_len);
info->view.array_len =
MAX2(u_minify(info->surf.logical_level0_px.depth, level),
info->surf.logical_level0_px.array_len);
if (!is_dest &&
(info->surf.dim == ISL_SURF_DIM_3D ||