summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/clover
diff options
context:
space:
mode:
authorPierre Moreau <[email protected]>2018-01-18 23:42:51 +0100
committerKarol Herbst <[email protected]>2019-02-26 21:02:07 +0100
commit8f9b4a2be673c6b398caa62149828013a81039e4 (patch)
tree7651e2e47d5b0a64cc1e9b648fe66b2b29243692 /src/gallium/state_trackers/clover
parentb033620abf7ed96fcdc9fef272829bd8688a5ae4 (diff)
clover: Move platform extensions definitions to clover/platform.cpp
Reviewed-by: Francisco Jerez <[email protected]> Reviewed-by: Aaron Watry <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers/clover')
-rw-r--r--src/gallium/state_trackers/clover/api/platform.cpp4
-rw-r--r--src/gallium/state_trackers/clover/core/platform.cpp5
-rw-r--r--src/gallium/state_trackers/clover/core/platform.hpp2
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 fddbbecaa59..a684d34ba44 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:
@@ -74,7 +74,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 489e8dc5a83..ddd63fc5a0d 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 e849645bbed..b94434c983c 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;
};