[beignet] 02/05: Add clGetKernelSubGroupInfoKHR to _cl_icd_dispatch table
Rebecca Palmer
rnpalmer-guest at moszumanska.debian.org
Sat Oct 8 11:32:31 UTC 2016
This is an automated email from the git hooks/post-receive script.
rnpalmer-guest pushed a commit to branch master
in repository beignet.
commit 9bd6b524e3ade0a14a30bd67a3e9ccc5c3afc98d
Author: Rebecca N. Palmer <rebecca_palmer at zoho.com>
Date: Sat Oct 8 12:18:21 2016 +0100
Add clGetKernelSubGroupInfoKHR to _cl_icd_dispatch table
(fixes crash on using this function with ocl-icd >=2.2.8)
---
debian/changelog | 1 +
debian/patches/extend_cl_icd_dispatch.patch | 47 +++++++++++++++++++++++++++++
debian/patches/series | 1 +
3 files changed, 49 insertions(+)
diff --git a/debian/changelog b/debian/changelog
index d3b0b4d..60b3697 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -7,6 +7,7 @@ beignet (1.2.0-2) UNRELEASED; urgency=medium
* Ship and document testing tool. Remove Enable-tests-debug.patch
for upstream compatibility, and enable PIE.
* Update documentation.
+ * Add clGetKernelSubGroupInfoKHR to _cl_icd_dispatch table.
-- Rebecca N. Palmer <rebecca_palmer at zoho.com> Sun, 25 Sep 2016 21:58:07 +0100
diff --git a/debian/patches/extend_cl_icd_dispatch.patch b/debian/patches/extend_cl_icd_dispatch.patch
new file mode 100644
index 0000000..4d86154
--- /dev/null
+++ b/debian/patches/extend_cl_icd_dispatch.patch
@@ -0,0 +1,47 @@
+Description: Add clGetKernelSubGroupInfoKHR to _cl_icd_dispatch table
+
+As ocl-icd-libopencl1's clGetExtensionFunctionAddress(forPlatform)
+tries the dispatch table before the ICD's clGetExtensionFunctionAddress,
+attempting to call functions that are in ocl-icd-libopencl1's table
+but not the ICD's table will usually crash.
+
+Author: Rebecca N. Palmer <rebecca_palmer at zoho.com>
+Forwarded: todo
+
+--- 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
+ (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
+ };
+
diff --git a/debian/patches/series b/debian/patches/series
index 7651ecc..93e427b 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -11,3 +11,4 @@ cl_accelerator_intel.patch
support-python3.patch
pow-powr-tests.patch
llvm39-support.patch
+extend_cl_icd_dispatch.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-opencl/beignet.git
More information about the Pkg-opencl-commits
mailing list