[Beignet] [PATCH] Add clGetKernelSubGroupInfoKHR to _cl_icd_dispatch table
Rebecca N. Palmer
rebecca_palmer at zoho.com
Sat Oct 8 13:11:16 UTC 2016
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 at zoho.com>
---
src/cl_khr_icd.c | 21 +++++++++++++++++++--
1 file changed, 19 insertions(+), 2 deletions(-)
diff --git a/src/cl_khr_icd.c b/src/cl_khr_icd.c
index 8715bbd..2cf4909 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,
+ clGetKernelSubGroupInfoKHR,
+#endif
#endif
};
--
2.1.4
More information about the Beignet
mailing list