[Pkg-opencl-devel] [beignet] 03/66: Imported Debian patch 0.0.0+git2013.04.01+d1b234c-2
Andreas Beckmann
anbe at moszumanska.debian.org
Fri Oct 31 07:27:01 UTC 2014
This is an automated email from the git hooks/post-receive script.
anbe pushed a commit to branch master
in repository beignet.
commit fca552089eb09b3eb3f1157c4cb463436d96be05
Author: Simon Richter <sjr at debian.org>
Date: Thu Apr 11 14:00:59 2013 +0200
Imported Debian patch 0.0.0+git2013.04.01+d1b234c-2
---
debian/changelog | 6 +++++
debian/patches/device-info-query | 54 ++++++++++++++++++++++++++++++++++++++++
debian/patches/series | 1 +
3 files changed, 61 insertions(+)
diff --git a/debian/changelog b/debian/changelog
index ae6de27..427fdfe 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+beignet (0.0.0+git2013.04.01+d1b234c-2) unstable; urgency=low
+
+ * Add patch to support size queries in device info
+
+ -- Simon Richter <sjr at debian.org> Thu, 11 Apr 2013 14:00:59 +0200
+
beignet (0.0.0+git2013.04.01+d1b234c-1) unstable; urgency=low
* Initial release.
diff --git a/debian/patches/device-info-query b/debian/patches/device-info-query
new file mode 100644
index 0000000..c54ba9e
--- /dev/null
+++ b/debian/patches/device-info-query
@@ -0,0 +1,54 @@
+commit ab7af52f7e9cd4d6b5a7f1fce4552c3e97b49099
+Author: Simon Richter <Simon.Richter at hogyros.de>
+Date: Thu Apr 11 13:59:30 2013 +0200
+
+ Allow size queries in device_id accessors
+
+ Query functions with variable output length can be called with an output
+ buffer length and address of zero to find out the number of elements
+ available.
+
+Index: beignet-0.0.0+git2013.04.01+d1b234c/src/cl_device_id.c
+===================================================================
+--- beignet-0.0.0+git2013.04.01+d1b234c.orig/src/cl_device_id.c 2013-04-11 14:38:02.730759888 +0200
++++ beignet-0.0.0+git2013.04.01+d1b234c/src/cl_device_id.c 2013-04-11 14:38:25.486758873 +0200
+@@ -128,21 +128,25 @@
+
+ #define DECL_FIELD(CASE,FIELD) \
+ case JOIN(CL_DEVICE_,CASE): \
+- if (param_value_size < sizeof(((cl_device_id)NULL)->FIELD)) \
+- return CL_INVALID_VALUE; \
+ if (param_value_size_ret != NULL) \
+ *param_value_size_ret = sizeof(((cl_device_id)NULL)->FIELD);\
++ if (param_value == NULL) \
++ return CL_SUCCESS; \
++ if (param_value_size < sizeof(((cl_device_id)NULL)->FIELD)) \
++ return CL_INVALID_VALUE; \
+ memcpy(param_value, \
+ &device->FIELD, \
+ sizeof(((cl_device_id)NULL)->FIELD)); \
+- return CL_SUCCESS;
++ return CL_SUCCESS;
+
+ #define DECL_STRING_FIELD(CASE,FIELD) \
+ case JOIN(CL_DEVICE_,CASE): \
+- if (param_value_size < device->JOIN(FIELD,_sz)) \
+- return CL_INVALID_VALUE; \
+ if (param_value_size_ret != NULL) \
+ *param_value_size_ret = device->JOIN(FIELD,_sz); \
++ if (param_value == NULL) \
++ return CL_SUCCESS; \
++ if (param_value_size < device->JOIN(FIELD,_sz)) \
++ return CL_INVALID_VALUE; \
+ memcpy(param_value, device->FIELD, device->JOIN(FIELD,_sz)); \
+ return CL_SUCCESS;
+
+@@ -157,8 +161,6 @@
+ device != &intel_ivb_gt2_device &&
+ device != &intel_hsw_device))
+ return CL_INVALID_DEVICE;
+- if (UNLIKELY(param_value == NULL))
+- return CL_INVALID_VALUE;
+
+ /* Find the correct parameter */
+ switch (param_name) {
diff --git a/debian/patches/series b/debian/patches/series
index c49ca45..29353dc 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -7,3 +7,4 @@ clang-from-path
implement-gefa
missing-header
respect-flags
+device-info-query
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-opencl/beignet.git
More information about the Pkg-opencl-devel
mailing list