diff options
author | Rebecca N. Palmer <rebecca_palmer@zoho.com> | 2016-10-08 14:11:16 +0100 |
---|---|---|
committer | Yang Rong <rong.r.yang@intel.com> | 2016-10-21 12:45:17 +0800 |
commit | c389349b654ce0a7aff136426dbbce0d9a0a0514 (patch) | |
tree | 2d22cfdfbbb91a1f3aa6cd923e3bf35858ad8101 | |
parent | 9bc95cb554dde76b4446e1d5d04a081dcc6f0b52 (diff) |
Add clGetKernelSubGroupInfoKHR to _cl_icd_dispatch table
ocl-icd >= 2.2.8 has this function in its table; as the lookup process
tries the dispatch table before the ICD's clGetExtensionFunctionAddress,
requesting a function that is in the ICD loader's table but off the end
of the ICD's table will return a garbage pointer.
Signed-off-by: Rebecca N. Palmer <rebecca_palmer@zoho.com>
Reviewed-by: Yang Rong <rong.r.yang@intel.com>
-rw-r--r-- | src/cl_khr_icd.c | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/src/cl_khr_icd.c b/src/cl_khr_icd.c index 8715bbd4..84b4beba 100644 --- a/src/cl_khr_icd.c +++ b/src/cl_khr_icd.c @@ -17,7 +17,7 @@ #include <ocl_icd.h> #include "cl_platform_id.h" - +#include "CL/cl_intel.h" // for clGetKernelSubGroupInfoKHR /* The interop functions are not implemented in Beignet */ #define CL_GL_INTEROP(x) NULL /* OpenCL 1.2 is not implemented in Beignet */ @@ -168,7 +168,24 @@ struct _cl_icd_dispatch const cl_khr_icd_dispatch = { (void *) NULL, (void *) NULL, (void *) NULL, - (void *) NULL + (void *) NULL, +#if (OCL_ICD_IDENTIFIED_FUNCTIONS > 110) + (void *) NULL, + (void *) NULL, + (void *) NULL, + (void *) NULL, + (void *) NULL, + (void *) NULL, + (void *) NULL, + (void *) NULL, + (void *) NULL, + (void *) NULL, + (void *) NULL, + (void *) NULL, + (void *) NULL, + (void *) NULL, + (void *) clGetKernelSubGroupInfoKHR, +#endif #endif }; |