mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 05:08:08 +02:00
rusticl/device: Make supported 1Dbuffer formats a strict subset of 1D
This works around a bug in the OpenCL CTS, which a few drivers here run into. Fixes a couple of tests with agx. Reviewed-by: @LingMan Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30514>
This commit is contained in:
parent
f8553f56ac
commit
50ce777edd
1 changed files with 8 additions and 0 deletions
|
|
@ -293,6 +293,14 @@ impl Device {
|
|||
|
||||
fs.insert(t, flags as cl_mem_flags);
|
||||
}
|
||||
|
||||
// Restrict supported formats with 1DBuffer images. This is an OpenCL CTS workaround.
|
||||
// See https://github.com/KhronosGroup/OpenCL-CTS/issues/1889
|
||||
let image1d_mask = fs[&CL_MEM_OBJECT_IMAGE1D];
|
||||
if let Some(entry) = fs.get_mut(&CL_MEM_OBJECT_IMAGE1D_BUFFER) {
|
||||
*entry &= image1d_mask;
|
||||
}
|
||||
|
||||
self.formats.insert(f.cl_image_format, fs);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue