clover: Return the minimum required value for CL_DEVICE_SINGLE_FP_CONFIG v2
authorTom Stellard <thomas.stellard@amd.com>
Thu, 5 Mar 2015 14:30:57 +0000 (14:30 +0000)
committerTom Stellard <thomas.stellard@amd.com>
Mon, 9 Mar 2015 13:53:33 +0000 (13:53 +0000)
This means dropping CL_FP_DENORM from the current return value.

v2:
  - Add comments about minimum values for OpenCL 1.2.

Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Reviewed-by: Jan Vesely <jan.vesely@rutgers.edu>
src/gallium/state_trackers/clover/api/device.cpp

index b1f556fac568aaf618b612e6d24e9bff2ab477fb..5d1f4ab4c9dddbb0a625444b13d74600198cb6c0 100644 (file)
@@ -201,8 +201,11 @@ clGetDeviceInfo(cl_device_id d_dev, cl_device_info param,
       break;
 
    case CL_DEVICE_SINGLE_FP_CONFIG:
+      // This is the "mandated minimum single precision floating-point
+      // capability" for OpenCL 1.1.  In OpenCL 1.2, nothing is required for
+      // custom devices.
       buf.as_scalar<cl_device_fp_config>() =
-         CL_FP_DENORM | CL_FP_INF_NAN | CL_FP_ROUND_TO_NEAREST;
+         CL_FP_INF_NAN | CL_FP_ROUND_TO_NEAREST;
       break;
 
    case CL_DEVICE_DOUBLE_FP_CONFIG: