diff --git a/projects/clr/opencl/api/opencl/khronos/icd/OpenCL.rc b/projects/clr/opencl/api/opencl/khronos/icd/OpenCL.rc index 3744e35bb5..005c6395f0 100644 --- a/projects/clr/opencl/api/opencl/khronos/icd/OpenCL.rc +++ b/projects/clr/opencl/api/opencl/khronos/icd/OpenCL.rc @@ -43,8 +43,8 @@ #ifdef RC_INVOKED VS_VERSION_INFO VERSIONINFO -FILEVERSION 2,0,3,0 -PRODUCTVERSION 2,0,3,0 +FILEVERSION 2,0,4,0 +PRODUCTVERSION 2,0,4,0 FILETYPE VFT_DLL BEGIN @@ -55,7 +55,7 @@ BEGIN VALUE "FileDescription" ,"OpenCL Client DLL" VALUE "ProductName" ,"Khronos OpenCL ICD" VALUE "LegalCopyright" ,"Copyright \251 The Khronos Group Inc 2014" - VALUE "FileVersion" ,"2.0.3.0" + VALUE "FileVersion" ,"2.0.4.0" VALUE "CompanyName" ,"Khronos Group" VALUE "InternalName" ,"OpenCL" diff --git a/projects/clr/opencl/api/opencl/khronos/icd/icd.c b/projects/clr/opencl/api/opencl/khronos/icd/icd.c index 08465f7baa..150c2a94f4 100644 --- a/projects/clr/opencl/api/opencl/khronos/icd/icd.c +++ b/projects/clr/opencl/api/opencl/khronos/icd/icd.c @@ -43,7 +43,7 @@ #include #include -KHRicdState khrIcdState = {0}; +KHRicdState khrIcdState = {0, NULL}; // entrypoint to initialize the ICD and add all vendors void khrIcdInitialize(void) @@ -83,7 +83,7 @@ void khrIcdVendorAdd(const char *libraryName) } // get the library's clGetExtensionFunctionAddress pointer - p_clGetExtensionFunctionAddress = khrIcdOsLibraryGetFunctionAddress(library, "clGetExtensionFunctionAddress"); + p_clGetExtensionFunctionAddress = (pfn_clGetExtensionFunctionAddress)(size_t)khrIcdOsLibraryGetFunctionAddress(library, "clGetExtensionFunctionAddress"); if (!p_clGetExtensionFunctionAddress) { KHR_ICD_TRACE("failed to get function address clGetExtensionFunctionAddress\n"); @@ -91,7 +91,7 @@ void khrIcdVendorAdd(const char *libraryName) } // use that function to get the clIcdGetPlatformIDsKHR function pointer - p_clIcdGetPlatformIDs = p_clGetExtensionFunctionAddress("clIcdGetPlatformIDsKHR"); + p_clIcdGetPlatformIDs = (pfn_clIcdGetPlatformIDs)(size_t)p_clGetExtensionFunctionAddress("clIcdGetPlatformIDsKHR"); if (!p_clIcdGetPlatformIDs) { KHR_ICD_TRACE("failed to get extension function address clIcdGetPlatformIDsKHR\n"); diff --git a/projects/clr/opencl/api/opencl/khronos/icd/icd_dispatch.c b/projects/clr/opencl/api/opencl/khronos/icd/icd_dispatch.c index 174c349c4d..113dee5304 100644 --- a/projects/clr/opencl/api/opencl/khronos/icd/icd_dispatch.c +++ b/projects/clr/opencl/api/opencl/khronos/icd/icd_dispatch.c @@ -1359,7 +1359,7 @@ clGetExtensionFunctionAddressForPlatform(cl_platform_id platform, khrIcdInitialize(); // return any ICD-aware extensions - #define CL_COMMON_EXTENSION_ENTRYPOINT_ADD(name) if (!strcmp(function_name, #name) ) return (void *)&name + #define CL_COMMON_EXTENSION_ENTRYPOINT_ADD(name) if (!strcmp(function_name, #name) ) return (void *)(size_t)&name // Are these core or ext? This is unclear, but they appear to be // independent from cl_khr_gl_sharing. @@ -1567,7 +1567,7 @@ clGetExtensionFunctionAddress(const char *function_name) CL_EXT_SUFFIX__VERSION_ khrIcdInitialize(); // return any ICD-aware extensions - #define CL_COMMON_EXTENSION_ENTRYPOINT_ADD(name) if (!strcmp(function_name, #name) ) return (void *)&name + #define CL_COMMON_EXTENSION_ENTRYPOINT_ADD(name) if (!strcmp(function_name, #name) ) return (void *)(size_t)&name // Are these core or ext? This is unclear, but they appear to be // independent from cl_khr_gl_sharing. diff --git a/projects/clr/opencl/api/opencl/khronos/icd/icd_dispatch.h b/projects/clr/opencl/api/opencl/khronos/icd/icd_dispatch.h index baff2b1f43..f58c6c0c05 100644 --- a/projects/clr/opencl/api/opencl/khronos/icd/icd_dispatch.h +++ b/projects/clr/opencl/api/opencl/khronos/icd/icd_dispatch.h @@ -61,7 +61,11 @@ #include #include #endif +#if !defined(__ANDROID__) #include +#else +#include +#endif #include #include #include diff --git a/projects/clr/opencl/api/opencl/khronos/icd/icd_linux.c b/projects/clr/opencl/api/opencl/khronos/icd/icd_linux.c index cbee92da76..0a00508959 100644 --- a/projects/clr/opencl/api/opencl/khronos/icd/icd_linux.c +++ b/projects/clr/opencl/api/opencl/khronos/icd/icd_linux.c @@ -64,7 +64,11 @@ void khrIcdOsVendorsEnumerateCallBack(void) vendorPath = getenv("OPENCL_VENDOR_PATH"); if (vendorPath == NULL) { - vendorPath = "/etc/OpenCL/vendors"; +#ifdef __ANDROID__ + vendorPath = "/system/vendor/Khronos/OpenCL/vendors/"; +#else + vendorPath = "/etc/OpenCL/vendors/"; +#endif // ANDROID } // open the directory