Tom Stellard <thomas.stell...@amd.com> writes: > From: Matt Arsenault <arse...@gmail.com> > > v2: > -Fix indentation > --- > src/gallium/state_trackers/clover/api/device.cpp | 11 +++++++++-- > src/gallium/state_trackers/clover/core/device.cpp | 24 > +++++++++++++++++++++++ > src/gallium/state_trackers/clover/core/device.hpp | 3 +++ > 3 files changed, 36 insertions(+), 2 deletions(-) > > diff --git a/src/gallium/state_trackers/clover/api/device.cpp > b/src/gallium/state_trackers/clover/api/device.cpp > index 97b2cf9..7006702 100644 > --- a/src/gallium/state_trackers/clover/api/device.cpp > +++ b/src/gallium/state_trackers/clover/api/device.cpp > @@ -201,8 +201,15 @@ clGetDeviceInfo(cl_device_id d_dev, cl_device_info param, > break; > > case CL_DEVICE_SINGLE_FP_CONFIG: > - buf.as_scalar<cl_device_fp_config>() = > - CL_FP_DENORM | CL_FP_INF_NAN | CL_FP_ROUND_TO_NEAREST; > + buf.as_scalar<cl_device_fp_config>() = dev.single_fp_config(); > + break; > + > + case CL_DEVICE_DOUBLE_FP_CONFIG: > + buf.as_scalar<cl_device_fp_config>() = dev.double_fp_config(); > + break; > + > + case CL_DEVICE_HALF_FP_CONFIG: > + buf.as_scalar<cl_device_fp_config>() = dev.half_fp_config(); > break;
We need some mechanism to find out if the device supports half precision. Until then can you drop this case statement and device::half_fp_config()? > > case CL_DEVICE_GLOBAL_MEM_CACHE_TYPE: > diff --git a/src/gallium/state_trackers/clover/core/device.cpp > b/src/gallium/state_trackers/clover/core/device.cpp > index b6078db..bc6b761 100644 > --- a/src/gallium/state_trackers/clover/core/device.cpp > +++ b/src/gallium/state_trackers/clover/core/device.cpp >[...] > +cl_device_fp_config > +device::double_fp_config() const { > + // TODO: Get these from somewhere. This is the "mandated minimum double > + // precision floating-point capability" > + return 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; This should probably return 0 if the device doesn't support doubles. >[...]
pgpfiOJbzsgmI.pgp
Description: PGP signature
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev