summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/clover/api
diff options
context:
space:
mode:
authorSerge Martin <[email protected]>2015-09-27 11:15:14 +0200
committerFrancisco Jerez <[email protected]>2016-10-30 12:53:03 -0700
commitcb0879985a40bcde1516e5341c5a3e5ea0968b87 (patch)
tree6ece7426503f1cdebbe1112226d113a021dd1cdd /src/gallium/state_trackers/clover/api
parent2fba72046da09dd28f54df02794b358773899d13 (diff)
clover: Implement clGetExtensionFunctionAddressForPlatform.
Add clGetExtensionFunctionAddressForPlatform (CL 1.2). Reviewed-by: Francisco Jerez <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers/clover/api')
-rw-r--r--src/gallium/state_trackers/clover/api/dispatch.cpp2
-rw-r--r--src/gallium/state_trackers/clover/api/dispatch.hpp4
-rw-r--r--src/gallium/state_trackers/clover/api/platform.cpp16
3 files changed, 21 insertions, 1 deletions
diff --git a/src/gallium/state_trackers/clover/api/dispatch.cpp b/src/gallium/state_trackers/clover/api/dispatch.cpp
index f10babe31a0..8f4cfdc7fb2 100644
--- a/src/gallium/state_trackers/clover/api/dispatch.cpp
+++ b/src/gallium/state_trackers/clover/api/dispatch.cpp
@@ -131,7 +131,7 @@ namespace clover {
clEnqueueMigrateMemObjects,
clEnqueueMarkerWithWaitList,
clEnqueueBarrierWithWaitList,
- NULL, // clGetExtensionFunctionAddressForPlatform
+ GetExtensionFunctionAddressForPlatform,
NULL, // clCreateFromGLTexture
NULL, // clGetDeviceIDsFromD3D11KHR
NULL, // clCreateFromD3D11BufferKHR
diff --git a/src/gallium/state_trackers/clover/api/dispatch.hpp b/src/gallium/state_trackers/clover/api/dispatch.hpp
index 7f622822ef9..0ec1b51fa6d 100644
--- a/src/gallium/state_trackers/clover/api/dispatch.hpp
+++ b/src/gallium/state_trackers/clover/api/dispatch.hpp
@@ -777,6 +777,10 @@ namespace clover {
void *
GetExtensionFunctionAddress(const char *p_name);
+ void *
+ GetExtensionFunctionAddressForPlatform(cl_platform_id d_platform,
+ const char *p_name);
+
cl_int
IcdGetPlatformIDsKHR(cl_uint num_entries, cl_platform_id *rd_platforms,
cl_uint *rnum_platforms);
diff --git a/src/gallium/state_trackers/clover/api/platform.cpp b/src/gallium/state_trackers/clover/api/platform.cpp
index b1b1fdfb6f2..ed861633116 100644
--- a/src/gallium/state_trackers/clover/api/platform.cpp
+++ b/src/gallium/state_trackers/clover/api/platform.cpp
@@ -92,6 +92,16 @@ clover::GetPlatformInfo(cl_platform_id d_platform, cl_platform_info param,
}
void *
+clover::GetExtensionFunctionAddressForPlatform(cl_platform_id d_platform,
+ const char *p_name) try {
+ obj(d_platform);
+ return GetExtensionFunctionAddress(p_name);
+
+} catch (error &e) {
+ return NULL;
+}
+
+void *
clover::GetExtensionFunctionAddress(const char *p_name) {
std::string name { p_name };
@@ -118,6 +128,12 @@ clGetExtensionFunctionAddress(const char *p_name) {
return GetExtensionFunctionAddress(p_name);
}
+CLOVER_ICD_API void *
+clGetExtensionFunctionAddressForPlatform(cl_platform_id d_platform,
+ const char *p_name) {
+ return GetExtensionFunctionAddressForPlatform(d_platform, p_name);
+}
+
CLOVER_ICD_API cl_int
clIcdGetPlatformIDsKHR(cl_uint num_entries, cl_platform_id *rd_platforms,
cl_uint *rnum_platforms) {