[Pkg-opencl-devel] [beignet] 13/66: Imported Debian patch 0.1+git20130419+9c11c18-1
Andreas Beckmann
anbe at moszumanska.debian.org
Fri Oct 31 07:27:03 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 cf6b77b3f988f12c3382fdb9744b46d09d9d9e3c
Merge: 1761152 9b9ec80
Author: Simon Richter <sjr at debian.org>
Date: Fri Apr 19 14:14:39 2013 +0200
Imported Debian patch 0.1+git20130419+9c11c18-1
debian/changelog | 7 ++++
debian/patches/driver_version | 86 +++++++++++++++++++++++++++++++++++++++++++
debian/patches/gdi | 76 ++++++++++++++++++++++++++++++++++++++
debian/patches/gmoi | 36 +++++++++---------
debian/patches/pitch2d | 4 +-
debian/patches/series | 4 +-
src/cl_api.c | 7 +++-
src/cl_mem.c | 66 ++++++++++++++++++++++++++++++++-
src/cl_mem.h | 3 ++
9 files changed, 264 insertions(+), 25 deletions(-)
diff --cc debian/changelog
index 3b2ac76,0000000..982239f
mode 100644,000000..100644
--- a/debian/changelog
+++ b/debian/changelog
@@@ -1,48 -1,0 +1,55 @@@
++beignet (0.1+git20130419+9c11c18-1) experimental; urgency=low
++
++ * Add more functionality patches
++ * New upstream release
++
++ -- Simon Richter <sjr at debian.org> Fri, 19 Apr 2013 14:14:39 +0200
++
+beignet (0.1+git20130418+0546d2e-2) experimental; urgency=low
+
+ * Add functionality patches
+ * Use clang 3.0 command line syntax
+
+ -- Simon Richter <sjr at debian.org> Fri, 19 Apr 2013 09:53:23 +0200
+
+beignet (0.1+git20130418+0546d2e-1) experimental; urgency=low
+
+ * New upstream release
+
+ -- Simon Richter <sjr at debian.org> Thu, 18 Apr 2013 11:51:37 +0200
+
+beignet (0.1-1) unstable; urgency=low
+
+ * New upstream release
+
+ -- Simon Richter <sjr at debian.org> Tue, 16 Apr 2013 17:16:18 +0200
+
+beignet (0.0.0+git2013.04.11+e6b503e-1) unstable; urgency=low
+
+ * New upstream release
+
+ -- Simon Richter <sjr at debian.org> Mon, 15 Apr 2013 18:22:45 +0200
+
+beignet (0.0.0+git2013.04.01+d1b234c-4) unstable; urgency=low
+
+ * Build fix for kfreebsd-*
+
+ -- Simon Richter <sjr at debian.org> Fri, 12 Apr 2013 11:22:36 +0200
+
+beignet (0.0.0+git2013.04.01+d1b234c-3) unstable; urgency=low
+
+ * Adjust Build-Depends, Architecture list
+
+ -- Simon Richter <sjr at debian.org> Fri, 12 Apr 2013 10:32:36 +0200
+
+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.
+
+ -- Simon Richter <sjr at debian.org> Tue, 09 Apr 2013 17:14:00 +0200
diff --cc debian/patches/driver_version
index 0000000,0000000..89f448d
new file mode 100644
--- /dev/null
+++ b/debian/patches/driver_version
@@@ -1,0 -1,0 +1,86 @@@
++commit 7f79b7428cb40bc6c915ce0b7d746c9d6658f6b9
++Author: Simon Richter <Simon.Richter at hogyros.de>
++Date: Fri Apr 19 12:48:00 2013 +0200
++
++ Implement clGetDeviceInfo(..., CL_DRIVER_VERSION, ...)
++
++diff --git a/src/cl_device_id.c b/src/cl_device_id.c
++index 114a0ce..6300b41 100644
++--- a/src/cl_device_id.c
+++++ b/src/cl_device_id.c
++@@ -230,6 +230,18 @@ cl_get_device_info(cl_device_id device,
++ DECL_STRING_FIELD(PROFILE, profile)
++ DECL_STRING_FIELD(OPENCL_C_VERSION, opencl_c_version)
++ DECL_STRING_FIELD(EXTENSIONS, extensions);
+++
+++ case CL_DRIVER_VERSION:
+++ if (param_value_size_ret) {
+++ *param_value_size_ret = device->driver_version_sz;
+++ if (!param_value)
+++ return CL_SUCCESS;
+++ }
+++ if (param_value_size < device->driver_version_sz)
+++ return CL_INVALID_VALUE;
+++ memcpy(param_value, device->driver_version, device->driver_version_sz);
+++ return CL_SUCCESS;
+++
++ default: return CL_INVALID_VALUE;
++ };
++ }
++diff --git a/src/cl_device_id.h b/src/cl_device_id.h
++index 610eaf6..d199ecb 100644
++--- a/src/cl_device_id.h
+++++ b/src/cl_device_id.h
++@@ -83,12 +83,14 @@ struct _cl_device_id {
++ const char *profile;
++ const char *opencl_c_version;
++ const char *extensions;
+++ const char *driver_version;
++ size_t name_sz;
++ size_t vendor_sz;
++ size_t version_sz;
++ size_t profile_sz;
++ size_t opencl_c_version_sz;
++ size_t extensions_sz;
+++ size_t driver_version_sz;
++ /* Kernel specific info that we're assigning statically */
++ size_t wg_sz;
++ size_t compile_wg_sz[3];
++diff --git a/src/cl_gt_device.h b/src/cl_gt_device.h
++index 993017b..f26cd8a 100644
++--- a/src/cl_gt_device.h
+++++ b/src/cl_gt_device.h
++@@ -72,6 +72,7 @@ DECL_INFO_STRING(version, OCL_VERSION_STRING)
++ DECL_INFO_STRING(profile, "FULL_PROFILE")
++ DECL_INFO_STRING(opencl_c_version, "OpenCL 1.10")
++ DECL_INFO_STRING(extensions, "")
+++DECL_INFO_STRING(driver_version, LIBCL_VERSION_STRING)
++ #undef DECL_INFO_STRING
++
++
++diff --git a/src/cl_platform_id.h b/src/cl_platform_id.h
++index edd3aae..3a74028 100644
++--- a/src/cl_platform_id.h
+++++ b/src/cl_platform_id.h
++@@ -25,6 +25,8 @@
++ #include "cl_khr_icd.h"
++ #include "CL/cl.h"
++
+++#include "src/OCLConfig.h"
+++
++ struct _cl_platform_id {
++ DEFINE_ICD(dispatch)
++ const char *profile;
++@@ -61,9 +63,10 @@ extern cl_int cl_get_platform_info(cl_platform_id platform,
++ #define OCL_VERSION_MINOR 0
++
++ #define _STR(x) #x
++-#define _JOINT(x, y) "OpenCL " _STR(x) "." _STR(y)
+++#define _JOINT(x, y) _STR(x) "." _STR(y)
++
++-#define OCL_VERSION_STRING _JOINT(OCL_VERSION_MAJOR, OCL_VERSION_MINOR)
+++#define OCL_VERSION_STRING "OpenCL " _JOINT(OCL_VERSION_MAJOR, OCL_VERSION_MINOR)
+++#define LIBCL_VERSION_STRING _JOINT(LIBCL_VERSION_MAJOR, LIBCL_VERSION_MINOR)
++
++ #endif /* __CL_PLATFORM_ID_H__ */
++
diff --cc debian/patches/gdi
index 0000000,0000000..f707901
new file mode 100644
--- /dev/null
+++ b/debian/patches/gdi
@@@ -1,0 -1,0 +1,76 @@@
++commit 8f07d9ad35e0313c615c836d42b613ca0d9e9c90
++Author: Simon Richter <Simon.Richter at hogyros.de>
++Date: Fri Apr 19 11:11:21 2013 +0200
++
++ Handle size queries in clGetDeviceInfo better
++
++ This allows size queries on all fields.
++
++Index: beignet-0.1+git20130418+0546d2e/src/cl_device_id.c
++===================================================================
++--- beignet-0.1+git20130418+0546d2e.orig/src/cl_device_id.c 2013-04-19 12:25:33.606705836 +0200
+++++ beignet-0.1+git20130418+0546d2e/src/cl_device_id.c 2013-04-19 12:25:55.978704839 +0200
++@@ -135,30 +135,28 @@
++
++ #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);\
++- memcpy(param_value, \
++- &device->FIELD, \
++- sizeof(((cl_device_id)NULL)->FIELD)); \
++- return CL_SUCCESS;
+++ if (param_value_size_ret) { \
+++ *param_value_size_ret = sizeof device->FIELD; \
+++ if (!param_value) \
+++ return CL_SUCCESS; \
+++ } \
+++ if (param_value_size < sizeof device->FIELD) \
+++ return CL_INVALID_VALUE; \
+++ memcpy(param_value, &device->FIELD, sizeof device->FIELD); \
+++ return CL_SUCCESS;
++
++ #define DECL_STRING_FIELD(CASE,FIELD) \
++ case JOIN(CL_DEVICE_,CASE): \
+++ if (param_value_size_ret) { \
+++ *param_value_size_ret = device->JOIN(FIELD,_sz); \
+++ if (!param_value) \
+++ return CL_SUCCESS; \
+++ } \
++ 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); \
++ memcpy(param_value, device->FIELD, device->JOIN(FIELD,_sz)); \
++ return CL_SUCCESS;
++
++-#define GET_STRING_FIELD_SIZE(CASE,FIELD) \
++- case JOIN(CL_DEVICE_,CASE): \
++- if (param_value_size_ret != NULL) \
++- *param_value_size_ret = device->JOIN(FIELD,_sz); \
++- return CL_SUCCESS;
++-
++ LOCAL cl_int
++ cl_get_device_info(cl_device_id device,
++ cl_device_info param_name,
++@@ -171,18 +169,6 @@
++ device != &intel_hsw_device))
++ return CL_INVALID_DEVICE;
++
++- if (param_value == NULL) {
++- switch (param_name) {
++- GET_STRING_FIELD_SIZE(NAME, name)
++- GET_STRING_FIELD_SIZE(VENDOR, vendor)
++- GET_STRING_FIELD_SIZE(VERSION, version)
++- GET_STRING_FIELD_SIZE(PROFILE, profile)
++- GET_STRING_FIELD_SIZE(OPENCL_C_VERSION, opencl_c_version)
++- GET_STRING_FIELD_SIZE(EXTENSIONS, extensions)
++- default: return CL_INVALID_VALUE;
++- }
++- }
++-
++ /* Find the correct parameter */
++ switch (param_name) {
++ DECL_FIELD(TYPE, device_type)
diff --cc debian/patches/gmoi
index 7d29528,0000000..200ba8f
mode 100644,000000..100644
--- a/debian/patches/gmoi
+++ b/debian/patches/gmoi
@@@ -1,117 -1,0 +1,117 @@@
+commit c60c0bfa3347aa4f89877743cbeeb1ae998ebb12
+Author: Simon Richter <Simon.Richter at hogyros.de>
+Date: Thu Apr 18 20:01:35 2013 +0200
+
+ Implement clGetMemObjectInfo
+
+ Currently, only the properties
+
+ - CL_MEM_TYPE
+ - CL_MEM_FLAGS
+ - CL_MEM_SIZE
+
+ are implemented.
+
- Index: beignet-0.1+git20130418+0546d2e/src/cl_api.c
++Index: beignet-0.1+git20130419+9c11c18/src/cl_api.c
+===================================================================
- --- beignet-0.1+git20130418+0546d2e.orig/src/cl_api.c 2013-04-19 10:04:52.127082193 +0200
- +++ beignet-0.1+git20130418+0546d2e/src/cl_api.c 2013-04-19 10:04:56.359082005 +0200
- @@ -386,8 +386,11 @@
- void * param_value,
- size_t * param_value_size_ret)
++--- beignet-0.1+git20130419+9c11c18.orig/src/cl_api.c 2013-04-19 14:15:05.000000000 +0200
+++++ beignet-0.1+git20130419+9c11c18/src/cl_api.c 2013-04-19 14:17:57.190405178 +0200
++@@ -400,8 +400,11 @@
++ void * param_value,
++ size_t * param_value_size_ret)
+ {
+- NOT_IMPLEMENTED;
+- return 0;
++ return cl_get_mem_object_info(memobj,
++ param_name,
++ param_value_size,
++ param_value,
++ param_value_size_ret);
+ }
+
+ cl_int
- Index: beignet-0.1+git20130418+0546d2e/src/cl_mem.c
++Index: beignet-0.1+git20130419+9c11c18/src/cl_mem.c
+===================================================================
- --- beignet-0.1+git20130418+0546d2e.orig/src/cl_mem.c 2013-04-19 10:04:52.127082193 +0200
- +++ beignet-0.1+git20130418+0546d2e/src/cl_mem.c 2013-04-19 10:04:56.359082005 +0200
- @@ -31,6 +31,66 @@
- #include <assert.h>
- #include <stdio.h>
++--- beignet-0.1+git20130419+9c11c18.orig/src/cl_mem.c 2013-04-19 10:28:49.000000000 +0200
+++++ beignet-0.1+git20130419+9c11c18/src/cl_mem.c 2013-04-19 14:17:57.190405178 +0200
++@@ -91,6 +91,66 @@
++
++ #undef FIELD_SIZE
+
++#define FIELD_SIZE(CASE,TYPE) \
++ case JOIN(CL_,CASE): \
++ if(param_value_size_ret) \
++ *param_value_size_ret = sizeof(TYPE); \
++ if(!param_value) \
++ return CL_SUCCESS; \
++ if(param_value_size < sizeof(TYPE)) \
++ return CL_INVALID_VALUE; \
++ break;
++
++LOCAL cl_int
++cl_get_mem_object_info(cl_mem mem,
++ cl_mem_info param_name,
++ size_t param_value_size,
++ void *param_value,
++ size_t *param_value_size_ret)
++{
++ switch(param_name)
++ {
++ FIELD_SIZE(MEM_TYPE, cl_mem_object_type);
++ FIELD_SIZE(MEM_FLAGS, cl_mem_flags);
++ FIELD_SIZE(MEM_SIZE, size_t);
++ FIELD_SIZE(MEM_HOST_PTR, void *);
++ FIELD_SIZE(MEM_MAP_COUNT, cl_uint);
++ FIELD_SIZE(MEM_REFERENCE_COUNT, cl_uint);
++ FIELD_SIZE(MEM_CONTEXT, cl_context);
++ default:
++ return CL_INVALID_VALUE;
++ }
++
++ switch(param_name)
++ {
++ case CL_MEM_TYPE:
++ *((cl_mem_object_type *)param_value) = mem->type;
++ break;
++ case CL_MEM_FLAGS:
++ *((cl_mem_flags *)param_value) = mem->flags;
++ break;
++ case CL_MEM_SIZE:
++ *((size_t *)param_value) = cl_buffer_get_size(mem->bo);
++ break;
++ case CL_MEM_HOST_PTR:
++ NOT_IMPLEMENTED;
++ break;
++ case CL_MEM_MAP_COUNT:
++ NOT_IMPLEMENTED;
++ break;
++ case CL_MEM_REFERENCE_COUNT:
++ NOT_IMPLEMENTED;
++ break;
++ case CL_MEM_CONTEXT:
++ NOT_IMPLEMENTED;
++ break;
++ }
++
++ return CL_SUCCESS;
++}
++
++#undef FIELD_SIZE
++
+ static cl_mem
+ cl_mem_allocate(cl_context ctx,
+ cl_mem_flags flags,
- Index: beignet-0.1+git20130418+0546d2e/src/cl_mem.h
++Index: beignet-0.1+git20130419+9c11c18/src/cl_mem.h
+===================================================================
- --- beignet-0.1+git20130418+0546d2e.orig/src/cl_mem.h 2013-04-19 10:04:52.127082193 +0200
- +++ beignet-0.1+git20130418+0546d2e/src/cl_mem.h 2013-04-19 10:04:56.359082005 +0200
- @@ -48,6 +48,9 @@
- cl_image_tiling_t tiling; /* only IVB+ supports TILE_[X,Y] (image only) */
- };
++--- beignet-0.1+git20130419+9c11c18.orig/src/cl_mem.h 2013-04-19 10:28:49.000000000 +0200
+++++ beignet-0.1+git20130419+9c11c18/src/cl_mem.h 2013-04-19 14:17:57.190405178 +0200
++@@ -51,6 +51,9 @@
++ /* Query information about a memory object */
++ extern cl_int cl_get_mem_object_info(cl_mem, cl_mem_info, size_t, void *, size_t *);
+
++/* Query information about a memory object */
++extern cl_int cl_get_mem_object_info(cl_mem, cl_mem_info, size_t, void *, size_t *);
++
+ /* Create a new memory object and initialize it with possible user data */
+ extern cl_mem cl_mem_new(cl_context, cl_mem_flags, size_t, void*, cl_int*);
+
diff --cc debian/patches/pitch2d
index 82b563b,0000000..7ebf5b8
mode 100644,000000..100644
--- a/debian/patches/pitch2d
+++ b/debian/patches/pitch2d
@@@ -1,30 -1,0 +1,30 @@@
+commit ab57856a5278c25748d8a2d261f31b8c29f146f9
+Author: Simon Richter <Simon.Richter at hogyros.de>
+Date: Thu Apr 18 17:50:05 2013 +0200
+
+ Fix pitch parameter in clCreateImage2D
+
+ If the host_ptr is NULL, the pitch parameter must be 0.
+
+ The pitch parameter gives the number of bytes per scanline. Specifying 0
+ selects the minimum possible.
+
+Index: beignet-0.1+git20130418+0546d2e/src/cl_mem.c
+===================================================================
+--- beignet-0.1+git20130418+0546d2e.orig/src/cl_mem.c 2013-04-18 05:21:35.000000000 +0200
++++ beignet-0.1+git20130418+0546d2e/src/cl_mem.c 2013-04-18 17:54:09.970688265 +0200
+@@ -284,9 +284,13 @@
+ if (UNLIKELY(h == 0)) DO_IMAGE_ERROR;
+
+ if (image_type == CL_MEM_OBJECT_IMAGE2D) {
- + size_t min_pitch = ((bpp * w) + 7) / 8;
- + if (pitch == 0)
+++ size_t min_pitch = bpp * w;
+++ if (data && pitch == 0)
++ pitch = min_pitch;
+ if (UNLIKELY(w > ctx->device->image2d_max_width)) DO_IMAGE_ERROR;
+ if (UNLIKELY(h > ctx->device->image2d_max_height)) DO_IMAGE_ERROR;
+- if (UNLIKELY(data && (bpp*w > pitch))) DO_IMAGE_ERROR;
++ if (UNLIKELY(data && min_pitch > pitch)) DO_IMAGE_ERROR;
++ if (UNLIKELY(!data && pitch != 0)) DO_IMAGE_ERROR;
+
+ /* Pick up tiling mode (we do only linear on SNB) */
+ if (cl_driver_get_ver(ctx->drv) != 6)
diff --cc debian/patches/series
index edd4c1f,0000000..742c689
mode 100644,000000..100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@@ -1,9 -1,0 +1,9 @@@
+khronos
+verbose
+implement-gefa
+missing-header
+soname
+respect-flags
- pitch2d
- gmoi
+clang-3.0
++gdi
++driver_version
--
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