[khronos-opencl-headers] 43/94: add AMD extensions and other fixes, patch prepared by Vincent Danjean
Andreas Beckmann
anbe at moszumanska.debian.org
Mon Sep 21 02:39:05 UTC 2015
This is an automated email from the git hooks/post-receive script.
anbe pushed a commit to branch master
in repository khronos-opencl-headers.
commit ddb0972b7010969186562a52feceba7b172bba63
Author: Andreas Beckmann <debian at abeckmann.de>
Date: Fri Dec 7 09:39:04 2012 +0000
add AMD extensions and other fixes, patch prepared by Vincent Danjean
git-svn-id: svn://svn.debian.org/svn/pkg-nvidia/packages/khronos-opencl-headers/trunk@3534 b6a4b1ba-b714-0410-8a2d-fc0b36c6496e
---
debian/changelog | 4 ++
debian/patches/AMD_extensions.patch | 76 ++++++++++++++++++++++++++++++++
debian/patches/clSetPrintfCallback.patch | 21 +++++++++
debian/patches/series | 2 +
debian/t/Makefile | 6 +--
5 files changed, 106 insertions(+), 3 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index f726e24..4596365 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -3,6 +3,10 @@ khronos-opencl-headers (1.2-2012.11.30-1) UNRELEASED; urgency=low
* New upstream release. (Closes: #695124, #684444)
* Run some trivial compile tests during package build.
* CL_EXT_SUFFIX__VERSION_1_2.diff: New, fix typo in macro name.
+ * clSetPrintfCallback.patch: New, add missing declaration.
+ * AMD_extensions.patch: New, add a few extensions from AMD that are not yet
+ in the headers published by khronos. Thanks Vincent Danjean!
+ (Closes: #695136)
-- Andreas Beckmann <debian at abeckmann.de> Fri, 07 Dec 2012 09:08:53 +0100
diff --git a/debian/patches/AMD_extensions.patch b/debian/patches/AMD_extensions.patch
new file mode 100644
index 0000000..359bed9
--- /dev/null
+++ b/debian/patches/AMD_extensions.patch
@@ -0,0 +1,76 @@
+Author: Vincent Danjean <vdanjean at debian.org>
+Subject: include AMD extensions in opencl-headers
+Bug-Debian: http://bugs.debian.org/695136
+
+--- a/cl_ext.h
++++ b/cl_ext.h
+@@ -40,6 +40,9 @@
+ #include <CL/cl.h>
+ #endif
+
++/* cl_khr_fp64 extension - no extension #define since it has no functions */
++#define CL_DEVICE_DOUBLE_FP_CONFIG 0x1032
++
+ /* cl_khr_fp16 extension - no extension #define since it has no functions */
+ #define CL_DEVICE_HALF_FP_CONFIG 0x1033
+
+@@ -169,11 +172,46 @@
+ #define CL_DEVICE_KERNEL_EXEC_TIMEOUT_NV 0x4005
+ #define CL_DEVICE_INTEGRATED_MEMORY_NV 0x4006
+
++/*********************************
++* cl_amd_device_memory_flags *
++*********************************/
++#define cl_amd_device_memory_flags 1
++
++#define CL_MEM_USE_PERSISTENT_MEM_AMD (1 << 6) // Alloc from GPU's CPU visible heap
++
++/* cl_device_info */
++#define CL_DEVICE_MAX_ATOMIC_COUNTERS_EXT 0x4032
+
+ /*********************************
+ * cl_amd_device_attribute_query *
+ *********************************/
+ #define CL_DEVICE_PROFILING_TIMER_OFFSET_AMD 0x4036
++#define CL_DEVICE_TOPOLOGY_AMD 0x4037
++#define CL_DEVICE_BOARD_NAME_AMD 0x4038
++#define CL_DEVICE_GLOBAL_FREE_MEMORY_AMD 0x4039
++#define CL_DEVICE_SIMD_PER_COMPUTE_UNIT_AMD 0x4040
++#define CL_DEVICE_SIMD_WIDTH_AMD 0x4041
++#define CL_DEVICE_SIMD_INSTRUCTION_WIDTH_AMD 0x4042
++#define CL_DEVICE_WAVEFRONT_WIDTH_AMD 0x4043
++#define CL_DEVICE_GLOBAL_MEM_CHANNELS_AMD 0x4044
++#define CL_DEVICE_GLOBAL_MEM_CHANNEL_BANKS_AMD 0x4045
++#define CL_DEVICE_GLOBAL_MEM_CHANNEL_BANK_WIDTH_AMD 0x4046
++#define CL_DEVICE_LOCAL_MEM_SIZE_PER_COMPUTE_UNIT_AMD 0x4047
++#define CL_DEVICE_LOCAL_MEM_BANKS_AMD 0x4048
++
++typedef union
++{
++ struct { cl_uint type; cl_uint data[5]; } raw;
++ struct { cl_uint type; cl_char unused[17]; cl_char bus; cl_char device; cl_char function; } pcie;
++} cl_device_topology_amd;
++
++#define CL_DEVICE_TOPOLOGY_TYPE_PCIE_AMD 1
++
++
++/**************************
++* cl_amd_offline_devices *
++**************************/
++#define CL_CONTEXT_OFFLINE_DEVICES_AMD 0x403F
+
+ #ifdef CL_VERSION_1_1
+ /***********************************
+@@ -239,7 +277,11 @@
+ #define CL_PARTITION_BY_COUNTS_LIST_END_EXT ((cl_device_partition_property_ext) 0)
+ #define CL_PARTITION_BY_NAMES_LIST_END_EXT ((cl_device_partition_property_ext) 0 - 1)
+
+-
++ /* cl_ext_atomic_counters_32 and cl_ext_atomic_counters_64 extensions
++ * no extension #define since they have no functions
++ */
++ #define CL_DEVICE_MAX_ATOMIC_COUNTERS_EXT 0x4032
++
+
+ #endif /* CL_VERSION_1_1 */
+
diff --git a/debian/patches/clSetPrintfCallback.patch b/debian/patches/clSetPrintfCallback.patch
new file mode 100644
index 0000000..e834c57
--- /dev/null
+++ b/debian/patches/clSetPrintfCallback.patch
@@ -0,0 +1,21 @@
+Author: Vincent Danjean <vdanjean at debian.org>
+Subject: add missing clSetPrintfCallback declaration
+
+--- a/cl.h
++++ b/cl.h
+@@ -1152,6 +1152,15 @@
+ const cl_event * /* event_wait_list */,
+ cl_event * /* event */) CL_API_SUFFIX__VERSION_1_2;
+
++extern CL_API_ENTRY cl_int CL_API_CALL
++clSetPrintfCallback(cl_context /* context */,
++ void (CL_CALLBACK * /* pfn_notify */)(cl_context /* program */,
++ cl_uint /*printf_data_len */,
++ char * /* printf_data_ptr */,
++ void * /* user_data */),
++ void * /* user_data */) CL_API_SUFFIX__VERSION_1_2;
++
++
+
+ /* Extension function access
+ *
diff --git a/debian/patches/series b/debian/patches/series
index c3e4326..7fdd1ec 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,3 @@
CL_EXT_SUFFIX__VERSION_1_2.diff
+clSetPrintfCallback.patch
+AMD_extensions.patch
diff --git a/debian/t/Makefile b/debian/t/Makefile
index 086c13b..1fa7b6c 100644
--- a/debian/t/Makefile
+++ b/debian/t/Makefile
@@ -5,9 +5,9 @@ check:
$(MAKE) compile_opencl_h
$(MAKE) compile_opencl_h OPENCLFLAGS=-DCL_USE_DEPRECATED_OPENCL_1_1_APIS
$(MAKE) compile_opencl_h OPENCLFLAGS=-DCL_USE_DEPRECATED_OPENCL_1_0_APIS
- -$(MAKE) compile_cl_hpp
- -$(MAKE) compile_cl_hpp OPENCLFLAGS=-DCL_USE_DEPRECATED_OPENCL_1_1_APIS
- -$(MAKE) compile_cl_hpp OPENCLFLAGS=-DCL_USE_DEPRECATED_OPENCL_1_0_APIS
+ $(MAKE) compile_cl_hpp
+ $(MAKE) compile_cl_hpp OPENCLFLAGS=-DCL_USE_DEPRECATED_OPENCL_1_1_APIS
+ $(MAKE) compile_cl_hpp OPENCLFLAGS=-DCL_USE_DEPRECATED_OPENCL_1_0_APIS
compile_opencl_h:
$(CC) $(CFLAGS) -c opencl_h.c
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-opencl/khronos-opencl-headers.git
More information about the Pkg-opencl-commits
mailing list