<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><br><div><div>On Jul 2, 2014, at 12:52 PM, Matt Arsenault <<a href="mailto:arsenm2@gmail.com">arsenm2@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><br>On Jul 2, 2014, at 12:48 PM, Tom Stellard <<a href="mailto:thomas.stellard@amd.com">thomas.stellard@amd.com</a>> wrote:<br><br><blockquote type="cite">---<br>src/gallium/state_trackers/clover/api/device.cpp | 3 +--<br>src/gallium/state_trackers/clover/core/device.cpp | 6 ++++++<br>src/gallium/state_trackers/clover/core/device.hpp | 1 +<br>3 files changed, 8 insertions(+), 2 deletions(-)<br><br>diff --git a/src/gallium/state_trackers/clover/api/device.cpp b/src/gallium/state_trackers/clover/api/device.cpp<br>index 97b2cf9..3b91e9e 100644<br>--- a/src/gallium/state_trackers/clover/api/device.cpp<br>+++ b/src/gallium/state_trackers/clover/api/device.cpp<br>@@ -201,8 +201,7 @@ clGetDeviceInfo(cl_device_id d_dev, cl_device_info param,<br> break;<br><br> case CL_DEVICE_SINGLE_FP_CONFIG:<br>- buf.as_scalar<cl_device_fp_config>() =<br>- CL_FP_DENORM | CL_FP_INF_NAN | CL_FP_ROUND_TO_NEAREST;<br>+ buf.as_scalar<cl_device_fp_config>() = dev.single_fp_config();<br> break;<br><br> case CL_DEVICE_GLOBAL_MEM_CACHE_TYPE:<br>diff --git a/src/gallium/state_trackers/clover/core/device.cpp b/src/gallium/state_trackers/clover/core/device.cpp<br>index b6078db..498e7d9 100644<br>--- a/src/gallium/state_trackers/clover/core/device.cpp<br>+++ b/src/gallium/state_trackers/clover/core/device.cpp<br>@@ -169,6 +169,12 @@ device::max_compute_units() const {<br> PIPE_COMPUTE_CAP_MAX_COMPUTE_UNITS)[0];<br>}<br><br>+cl_device_fp_config<br>+device::single_fp_config() const {<br>+ // TODO: Get these from somewhere.<br>+ return CL_FP_DENORM | CL_FP_INF_NAN | CL_FP_ROUND_TO_NEAREST;<br>+}<br></blockquote><br>Probably shouldn’t include CL_FP_DENORM as the default. It should be false on R600/SI, and probably many other devices<br><br><br></div></blockquote><div><br></div><div>The spec says the mandated minimum for single precision on non-custom devices is CL_FP_ROUND_TO_NEAREST | CL_FP_INF_NAN, so without a device query that should be the default</div><div><br></div><br><blockquote type="cite"><div style="font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><blockquote type="cite">+<br>std::vector<size_t><br>device::max_block_size() const {<br> auto v = get_compute_param<uint64_t>(pipe, PIPE_COMPUTE_CAP_MAX_BLOCK_SIZE);<br>diff --git a/src/gallium/state_trackers/clover/core/device.hpp b/src/gallium/state_trackers/clover/core/device.hpp<br>index 731c31e..93f9091 100644<br>--- a/src/gallium/state_trackers/clover/core/device.hpp<br>+++ b/src/gallium/state_trackers/clover/core/device.hpp<br>@@ -63,6 +63,7 @@ namespace clover {<br> cl_ulong max_mem_alloc_size() const;<br> cl_uint max_clock_frequency() const;<br> cl_uint max_compute_units() const;<br>+ cl_device_fp_config single_fp_config() const;<br><br> std::vector<size_t> max_block_size() const;<br> std::string device_name() const;<br>--<span class="Apple-converted-space"> </span><br>1.8.1.5<br><br>_______________________________________________<br>mesa-dev mailing list<br><a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a><br>http://lists.freedesktop.org/mailman/listinfo/mesa-dev</blockquote></div></blockquote></div><br></body></html>