From dce0665705a4886abbdbe9d55e10d4be08cdeb54 Mon Sep 17 00:00:00 2001 From: Karol Herbst Date: Sat, 17 Jun 2023 21:28:55 +0200 Subject: [PATCH] rusticl/device: sort cl_device_info queries Signed-off-by: Karol Herbst Reviewed-by: Nora Allen Part-of: --- src/gallium/frontends/rusticl/api/device.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/gallium/frontends/rusticl/api/device.rs b/src/gallium/frontends/rusticl/api/device.rs index 7aba83d..060f0f3 100644 --- a/src/gallium/frontends/rusticl/api/device.rs +++ b/src/gallium/frontends/rusticl/api/device.rs @@ -202,6 +202,11 @@ impl CLInfo for cl_device_id { } CL_DEVICE_NON_UNIFORM_WORK_GROUP_SUPPORT => cl_prop::(false), CL_DEVICE_NUMERIC_VERSION => cl_prop::(dev.cl_version as cl_version), + CL_DEVICE_OPENCL_C_ALL_VERSIONS => cl_prop::<&Vec>(&dev.clc_versions), + CL_DEVICE_OPENCL_C_FEATURES => cl_prop::<&Vec>(&dev.clc_features), + CL_DEVICE_OPENCL_C_VERSION => { + cl_prop::<&str>(&format!("OpenCL C {} ", dev.clc_version.api_str())) + } // TODO subdevice support CL_DEVICE_PARENT_DEVICE => cl_prop::(cl_device_id::from_ptr(ptr::null())), CL_DEVICE_PARTITION_AFFINITY_DOMAIN => cl_prop::(0), @@ -232,18 +237,13 @@ impl CLInfo for cl_device_id { cl_prop::(dev.subgroups() as usize) } CL_DEVICE_PRINTF_BUFFER_SIZE => cl_prop::(dev.printf_buffer_size()), - // TODO - CL_DEVICE_PROFILING_TIMER_RESOLUTION => cl_prop::(0), - CL_DEVICE_OPENCL_C_FEATURES => cl_prop::<&Vec>(&dev.clc_features), - CL_DEVICE_OPENCL_C_VERSION => { - cl_prop::<&str>(&format!("OpenCL C {} ", dev.clc_version.api_str())) - } - CL_DEVICE_OPENCL_C_ALL_VERSIONS => cl_prop::<&Vec>(&dev.clc_versions), CL_DEVICE_PROFILE => cl_prop(if dev.embedded { "EMBEDDED_PROFILE" } else { "FULL_PROFILE" }), + // TODO + CL_DEVICE_PROFILING_TIMER_RESOLUTION => cl_prop::(0), CL_DEVICE_QUEUE_ON_DEVICE_MAX_SIZE => cl_prop::(0), CL_DEVICE_QUEUE_ON_DEVICE_PREFERRED_SIZE => cl_prop::(0), CL_DEVICE_QUEUE_ON_DEVICE_PROPERTIES => cl_prop::(0), -- 2.7.4