<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 Jun 21, 2014, at 9:37 AM, Francisco Jerez <<a href="mailto:currojerez@riseup.net">currojerez@riseup.net</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;">Tom Stellard <<a href="mailto:thomas.stellard@amd.com">thomas.stellard@amd.com</a>> writes:<br><br><blockquote type="cite">---<br>src/gallium/state_trackers/clover/api/device.cpp | 4 +++-<br>src/gallium/state_trackers/clover/core/device.cpp | 6 ++++++<br>src/gallium/state_trackers/clover/core/device.hpp | 1 +<br>3 files changed, 10 insertions(+), 1 deletion(-)<br><br>diff --git a/src/gallium/state_trackers/clover/api/device.cpp b/src/gallium/state_trackers/clover/api/device.cpp<br>index dc8e22c..275542d 100644<br>--- a/src/gallium/state_trackers/clover/api/device.cpp<br>+++ b/src/gallium/state_trackers/clover/api/device.cpp<br>@@ -290,7 +290,9 @@ clGetDeviceInfo(cl_device_id d_dev, cl_device_info param,<br> break;<br><br> case CL_DEVICE_EXTENSIONS:<br>- buf.as_string() = "";<br>+ // The trailing space is intentional. It is a spec-ism that there is a<br>+ // trailing space at the end of the list of extensions.<br></blockquote><br>Hm... Really? Where does the spec say that?<br><br></div></blockquote><div><br></div><div>I’m not really sure. I remember reporting a bug before about a trailing space in these outputs, and got the response that it is required by the spec, but never really finding where. I know it’s required for the versions (which also currently fails the conformance test with “A space must appear after the minor version! (returned: OpenCL C 1.1)”</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">+ buf.as_string() = dev.cl_khr_fp64() ? "cl_khr_fp64 " : "";<br> break;<br><br> case CL_DEVICE_PLATFORM:<br>diff --git a/src/gallium/state_trackers/clover/core/device.cpp b/src/gallium/state_trackers/clover/core/device.cpp<br>index 6d52dd4..51b54fa 100644<br>--- a/src/gallium/state_trackers/clover/core/device.cpp<br>+++ b/src/gallium/state_trackers/clover/core/device.cpp<br>@@ -187,6 +187,12 @@ device::half_fp_config() const {<br> return CL_FP_DENORM | CL_FP_INF_NAN | CL_FP_ROUND_TO_NEAREST;<br>}<br><br>+bool<br>+device::cl_khr_fp64() const {<br>+ return pipe->get_shader_param(pipe, PIPE_SHADER_COMPUTE,<br>+ PIPE_SHADER_CAP_DOUBLES);<br>+}<br>+<br></blockquote><br>Can we call this function "has_doubles()" or something similar? The<br>extension name is somewhat cryptic. Or, I don't know, maybe use<br>'device::double_fp_config()' to check if doubles are supported? As<br>Bruno said, it should return 0 if doubles are not supported by the<br>implementation.<br></div></blockquote><div><br></div><div>The extension is also “removed” in 1.2 and doubles become an “optional core extension” whatever that means, and is just required to be reported anyway for compatibility.</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;"><br><blockquote type="cite">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 380029e..38bea54 100644<br>--- a/src/gallium/state_trackers/clover/core/device.hpp<br>+++ b/src/gallium/state_trackers/clover/core/device.hpp<br>@@ -65,6 +65,7 @@ namespace clover {<br> cl_device_fp_config single_fp_config() const;<br> cl_device_fp_config double_fp_config() const;<br> cl_device_fp_config half_fp_config() const;<br>+ bool cl_khr_fp64() 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.4<br></blockquote>_______________________________________________<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</div></blockquote></div><br></body></html>