mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 02:10:11 +01:00
rusticl/device: fix panic when disabling 3D image write support
Cc: mesa-stable Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12985 Reviewed-by: @LingMan Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34649>
This commit is contained in:
parent
e3edc6029b
commit
6f080ac532
1 changed files with 8 additions and 5 deletions
|
|
@ -364,11 +364,14 @@ impl Device {
|
|||
|
||||
// if we can't advertize 3d image write ext, we have to disable them all
|
||||
if !self.caps.has_3d_image_writes {
|
||||
for f in &mut self.formats.values_mut() {
|
||||
*f.get_mut(&CL_MEM_OBJECT_IMAGE3D).unwrap() &= !cl_mem_flags::from(
|
||||
CL_MEM_WRITE_ONLY | CL_MEM_READ_WRITE | CL_MEM_KERNEL_READ_AND_WRITE,
|
||||
);
|
||||
}
|
||||
self.formats
|
||||
.values_mut()
|
||||
.filter_map(|f| f.get_mut(&CL_MEM_OBJECT_IMAGE3D))
|
||||
.for_each(|flags| {
|
||||
*flags &= !cl_mem_flags::from(
|
||||
CL_MEM_WRITE_ONLY | CL_MEM_READ_WRITE | CL_MEM_KERNEL_READ_AND_WRITE,
|
||||
)
|
||||
});
|
||||
}
|
||||
|
||||
// we require formatted loads
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue