From 8887be6206586d5fe048489ce7cb8e00cc31a7a0 Mon Sep 17 00:00:00 2001 From: "Dr. David Alan Gilbert" Date: Sun, 25 Jun 2023 17:22:29 +0100 Subject: [PATCH] rusticl/api: Wire up CL_DEVICE_PROFILING_TIMER_RESOLUTION Wire up the CL_DEVICE_PROFILING_TIMER_RESOLUTION from the PIPE_CAP. While here, also set CL_PLATFORM_HOST_TIMER_RESOLUTION to 1; that's bogus since we're using the same value as for device, but at this point we don't have a device to ask. Signed-off-by: Dr. David Alan Gilbert Part-of: --- src/gallium/frontends/rusticl/api/device.rs | 3 +-- src/gallium/frontends/rusticl/api/platform.rs | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/gallium/frontends/rusticl/api/device.rs b/src/gallium/frontends/rusticl/api/device.rs index 993416267ab..6399f84b593 100644 --- a/src/gallium/frontends/rusticl/api/device.rs +++ b/src/gallium/frontends/rusticl/api/device.rs @@ -256,8 +256,7 @@ impl CLInfo for cl_device_id { } else { "FULL_PROFILE" }), - // TODO - CL_DEVICE_PROFILING_TIMER_RESOLUTION => cl_prop::(0), + CL_DEVICE_PROFILING_TIMER_RESOLUTION => cl_prop::(dev.timer_resolution()), 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), diff --git a/src/gallium/frontends/rusticl/api/platform.rs b/src/gallium/frontends/rusticl/api/platform.rs index d89719ee549..7d8a092f4f1 100644 --- a/src/gallium/frontends/rusticl/api/platform.rs +++ b/src/gallium/frontends/rusticl/api/platform.rs @@ -20,7 +20,7 @@ impl CLInfo for cl_platform_id { CL_PLATFORM_EXTENSIONS_WITH_VERSION => { cl_prop::>(PLATFORM_EXTENSIONS.to_vec()) } - CL_PLATFORM_HOST_TIMER_RESOLUTION => cl_prop::(0), + CL_PLATFORM_HOST_TIMER_RESOLUTION => cl_prop::(1), CL_PLATFORM_ICD_SUFFIX_KHR => cl_prop("MESA"), CL_PLATFORM_NAME => cl_prop("rusticl"), CL_PLATFORM_NUMERIC_VERSION => cl_prop::(CLVersion::Cl3_0 as u32),