summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Richter <Simon.Richter@hogyros.de>2013-04-22 11:26:26 +0200
committerZhigang Gong <zhigang.gong@linux.intel.com>2013-04-22 18:04:24 +0800
commitb98a213e7bcb750c25139d43e9f85c3ef4ed65b5 (patch)
tree8728b5a89fc0970b57a0885dd9641f20d9ae02ad
parent1c018c6fd12efce72f1dfada72fb3ae10ac5114a (diff)
Add cl*Intel to extension function lookup
This allows applications to look up the extension functions when going through the ICD loader. Signed-off-by: Simon Richter <Simon.Richter@hogyros.de> Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
-rw-r--r--src/cl_api.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/src/cl_api.c b/src/cl_api.c
index 00036da6..03cc0e6f 100644
--- a/src/cl_api.c
+++ b/src/cl_api.c
@@ -1170,6 +1170,10 @@ clEnqueueBarrier(cl_command_queue command_queue)
return 0;
}
+#define EXTFUNC(x) \
+ if (strcmp(#x, func_name) == 0) \
+ return (void *)x;
+
void*
clGetExtensionFunctionAddress(const char *func_name)
{
@@ -1177,12 +1181,22 @@ clGetExtensionFunctionAddress(const char *func_name)
return NULL;
#ifdef HAS_OCLIcd
/* cl_khr_icd */
- if (strcmp("clIcdGetPlatformIDsKHR", func_name) == 0)
- return (void *)clIcdGetPlatformIDsKHR;
+ EXTFUNC(clIcdGetPlatformIDsKHR)
#endif
+ EXTFUNC(clCreateProgramWithLLVMIntel)
+ EXTFUNC(clGetGenVersionIntel)
+ EXTFUNC(clMapBufferIntel)
+ EXTFUNC(clUnmapBufferIntel)
+ EXTFUNC(clMapBufferGTTIntel)
+ EXTFUNC(clUnmapBufferGTTIntel)
+ EXTFUNC(clPinBufferIntel)
+ EXTFUNC(clUnpinBufferIntel)
+ EXTFUNC(clReportUnfreedIntel)
return NULL;
}
+#undef EXTFUNC
+
cl_int
clReportUnfreedIntel(void)
{