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>
.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 ||