aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGil Pitney <gil.pitney@linaro.org>2015-04-29 18:01:11 +0000
committerGil Pitney <gil.pitney@linaro.org>2015-04-29 18:01:11 +0000
commite51d1d7936b6ef10aa1bf6a1769a1d4953ce66df (patch)
tree10c9d814f8776919a5785fa3197a69e256f7108c
parente12ad5167ccd954d224e53372f1836d092dc6e43 (diff)
Added v1.2 clGetExtensionFunctionAddressForPlatform() API
Simply check the platform ID, and call the existing clGetExtensionFunctionAddress() v1.1 API. Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
-rw-r--r--src/api/api_platform.cpp11
-rw-r--r--src/core/icd.cpp2
2 files changed, 12 insertions, 1 deletions
diff --git a/src/api/api_platform.cpp b/src/api/api_platform.cpp
index cf064ef..eb562a8 100644
--- a/src/api/api_platform.cpp
+++ b/src/api/api_platform.cpp
@@ -87,3 +87,14 @@ void * clGetExtensionFunctionAddress(const char *funcname)
return NULL;
}
+/******************************************************************************
+* New for v1.2: Just devolve to clGetExtensionFunctionAddress()
+******************************************************************************/
+void * clGetExtensionFunctionAddressForPlatform(cl_platform_id platform, const char *funcname)
+{
+
+ if (platform != &the_platform) return NULL;
+
+ return clGetExtensionFunctionAddress(funcname);
+}
+
diff --git a/src/core/icd.cpp b/src/core/icd.cpp
index 5c79d0e..cab1609 100644
--- a/src/core/icd.cpp
+++ b/src/core/icd.cpp
@@ -138,7 +138,7 @@ void * dispatch_table[] =
(void *) 0, // clEnqueueMigrateMemObjects;
(void *) clEnqueueMarkerWithWaitList,
(void *) clEnqueueBarrierWithWaitList,
- (void *) 0, // clGetExtensionFunctionAddressForPlatform;
+ (void *) clGetExtensionFunctionAddressForPlatform,
(void *) 0, // clCreateFromGLTexture;
(void *) 0, // clGetDeviceIDsFromD3D11KHR;