Devices might report an image_pitch_alignment of 0 leading to a division
by 0 trap.
Fixes:
06daa03c5cd ("rusticl: Implement spec for cl_khr_image2d_from_buffer")
Signed-off-by: Karol Herbst <git@karolherbst.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24993>
desc.image_slice_pitch = desc.image_row_pitch * desc.image_height;
}
- if has_buf_parent {
+ if has_buf_parent && desc.image_type != CL_MEM_OBJECT_IMAGE1D_BUFFER {
let pitch_alignment = devs
.iter()
.map(|d| d.image_pitch_alignment())