rusticl/device: fix custom device detection
Signed-off-by: Karol Herbst <kherbst@redhat.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18809>
This commit is contained in:
@@ -207,7 +207,7 @@ impl Device {
|
||||
// Max size of memory object allocation in bytes. The minimum value is
|
||||
// max(min(1024 × 1024 × 1024, 1/4th of CL_DEVICE_GLOBAL_MEM_SIZE), 32 × 1024 × 1024)
|
||||
// for devices that are not of type CL_DEVICE_TYPE_CUSTOM.
|
||||
let mut limit = min(1024 * 1024 * 1024, self.global_mem_size());
|
||||
let mut limit = min(1024 * 1024 * 1024, self.global_mem_size() / 4);
|
||||
limit = max(limit, 32 * 1024 * 1024);
|
||||
if self.max_mem_alloc() < limit {
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user