Reviewed-by: Francisco Jerez <curroje...@riseup.net>
Reviewed-by: Aaron Watry <awa...@gmail.com>
Signed-off-by: Pierre Moreau <pierre.mor...@free.fr>
---
 src/gallium/state_trackers/clover/api/platform.cpp  | 4 ++--
 src/gallium/state_trackers/clover/core/platform.cpp | 5 +++++
 src/gallium/state_trackers/clover/core/platform.hpp | 2 ++
 3 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/src/gallium/state_trackers/clover/api/platform.cpp 
b/src/gallium/state_trackers/clover/api/platform.cpp
index 3b96b03fde..94d883c1f0 100644
--- a/src/gallium/state_trackers/clover/api/platform.cpp
+++ b/src/gallium/state_trackers/clover/api/platform.cpp
@@ -51,7 +51,7 @@ clover::GetPlatformInfo(cl_platform_id d_platform, 
cl_platform_info param,
                         size_t size, void *r_buf, size_t *r_size) try {
    property_buffer buf { r_buf, size, r_size };
 
-   obj(d_platform);
+   auto &platform = obj(d_platform);
 
    switch (param) {
    case CL_PLATFORM_PROFILE:
@@ -78,7 +78,7 @@ clover::GetPlatformInfo(cl_platform_id d_platform, 
cl_platform_info param,
       break;
 
    case CL_PLATFORM_EXTENSIONS:
-      buf.as_string() = "cl_khr_icd";
+      buf.as_string() = platform.supported_extensions();
       break;
 
    case CL_PLATFORM_ICD_SUFFIX_KHR:
diff --git a/src/gallium/state_trackers/clover/core/platform.cpp 
b/src/gallium/state_trackers/clover/core/platform.cpp
index 489e8dc5a8..ddd63fc5a0 100644
--- a/src/gallium/state_trackers/clover/core/platform.cpp
+++ b/src/gallium/state_trackers/clover/core/platform.cpp
@@ -39,3 +39,8 @@ platform::platform() : adaptor_range(evals(), devs) {
       }
    }
 }
+
+std::string
+platform::supported_extensions() const {
+   return "cl_khr_icd";
+}
diff --git a/src/gallium/state_trackers/clover/core/platform.hpp 
b/src/gallium/state_trackers/clover/core/platform.hpp
index e849645bbe..b94434c983 100644
--- a/src/gallium/state_trackers/clover/core/platform.hpp
+++ b/src/gallium/state_trackers/clover/core/platform.hpp
@@ -40,6 +40,8 @@ namespace clover {
       platform &
       operator=(const platform &platform) = delete;
 
+      std::string supported_extensions() const;
+
    protected:
       std::vector<intrusive_ref<device>> devs;
    };
-- 
2.16.2

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to