rusticl/device: fix image_3d_write_supported for embedded

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30104>
This commit is contained in:
Karol Herbst 2024-06-27 10:48:39 +02:00 committed by Marge Bot
parent 5cc37b9025
commit 386632e2a3

View file

@ -836,7 +836,13 @@ impl Device {
self.caps.has_images
&& !FORMATS
.iter()
.filter(|f| f.req_for_full_read_or_write)
.filter(|f| {
if self.embedded {
f.req_for_embeded_read_or_write
} else {
f.req_for_full_read_or_write
}
})
.map(|f| self.formats.get(&f.cl_image_format).unwrap())
.map(|f| f.get(&CL_MEM_OBJECT_IMAGE3D).unwrap())
.any(|f| *f & cl_mem_flags::from(CL_MEM_WRITE_ONLY) == 0)