From 5c18f39b0947ee2ec200387f6711cf8b9d6ac7d0 Mon Sep 17 00:00:00 2001 From: Karol Herbst Date: Fri, 18 Mar 2022 01:21:48 +0100 Subject: [PATCH] rusticl/device: set required double fp config values Signed-off-by: Karol Herbst Acked-by: Alyssa Rosenzweig Part-of: --- src/gallium/frontends/rusticl/api/device.rs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/gallium/frontends/rusticl/api/device.rs b/src/gallium/frontends/rusticl/api/device.rs index 97adf53d28b..fd1cde9684f 100644 --- a/src/gallium/frontends/rusticl/api/device.rs +++ b/src/gallium/frontends/rusticl/api/device.rs @@ -29,7 +29,18 @@ impl CLInfo for cl_device_id { CL_DEVICE_DEVICE_ENQUEUE_CAPABILITIES => { cl_prop::(0) } - CL_DEVICE_DOUBLE_FP_CONFIG => cl_prop::(0), + CL_DEVICE_DOUBLE_FP_CONFIG => { + cl_prop::(if dev.doubles_supported() { + (CL_FP_FMA + | CL_FP_ROUND_TO_NEAREST + | CL_FP_ROUND_TO_ZERO + | CL_FP_ROUND_TO_INF + | CL_FP_INF_NAN + | CL_FP_DENORM) as cl_device_fp_config + } else { + 0 + }) + } CL_DEVICE_ENDIAN_LITTLE => cl_prop::(dev.little_endian()), CL_DEVICE_ERROR_CORRECTION_SUPPORT => cl_prop::(false), CL_DEVICE_EXECUTION_CAPABILITIES => {