]> git.pld-linux.org Git - packages/beignet.git/blame - beignet-cl_accelerator_intel.patch
- merged some Debian patches
[packages/beignet.git] / beignet-cl_accelerator_intel.patch
CommitLineData
7d3d7cb5
JB
1Description: Move cl_intel_accelerator to cl_intel.h
2
3Beignet's own headers define cl_intel_accelerator etc directly in
4cl_ext.h, but khronos-opencl-headers 2.2~ places these in a separate
5file cl_ext_intel.h, and older versions do not include it at all.
6
7Author: Rebecca N. Palmer <rebecca_palmer@zoho.com>
8Forwarded: https://lists.freedesktop.org/archives/beignet/2018-July/009217.html
9
10--- a/include/CL/cl_intel.h
11+++ b/include/CL/cl_intel.h
12@@ -26,6 +26,115 @@
13 extern "C" {
14 #endif
15
16+#if defined(__CL_EXT_H) && !defined(cl_intel_accelerator)
17+#ifdef CL_VERSION_2_2
18+#include "CL/cl_ext_intel.h"
19+#else
20+/*********************************
21+* cl_intel_accelerator extension *
22+*********************************/
23+#define cl_intel_accelerator 1
24+#define cl_intel_motion_estimation 1
25+
26+typedef struct _cl_accelerator_intel* cl_accelerator_intel;
27+typedef cl_uint cl_accelerator_type_intel;
28+typedef cl_uint cl_accelerator_info_intel;
29+
30+typedef struct _cl_motion_estimation_desc_intel {
31+ cl_uint mb_block_type;
32+ cl_uint subpixel_mode;
33+ cl_uint sad_adjust_mode;
34+ cl_uint search_path_type;
35+} cl_motion_estimation_desc_intel;
36+
37+/* Error Codes */
38+#define CL_INVALID_ACCELERATOR_INTEL -1094
39+#define CL_INVALID_ACCELERATOR_TYPE_INTEL -1095
40+#define CL_INVALID_ACCELERATOR_DESCRIPTOR_INTEL -1096
41+#define CL_ACCELERATOR_TYPE_NOT_SUPPORTED_INTEL -1097
42+
43+/* Deprecated Error Codes */
44+#define CL_INVALID_ACCELERATOR_INTEL_DEPRECATED -6000
45+#define CL_INVALID_ACCELERATOR_TYPE_INTEL_DEPRECATED -6001
46+#define CL_INVALID_ACCELERATOR_DESCRIPTOR_INTEL_DEPRECATED -6002
47+#define CL_ACCELERATOR_TYPE_NOT_SUPPORTED_INTEL_DEPRECATED -6003
48+
49+/* cl_accelerator_type_intel */
50+#define CL_ACCELERATOR_TYPE_MOTION_ESTIMATION_INTEL 0x0
51+
52+/* cl_accelerator_info_intel */
53+#define CL_ACCELERATOR_DESCRIPTOR_INTEL 0x4090
54+#define CL_ACCELERATOR_REFERENCE_COUNT_INTEL 0x4091
55+#define CL_ACCELERATOR_CONTEXT_INTEL 0x4092
56+#define CL_ACCELERATOR_TYPE_INTEL 0x4093
57+
58+/*cl_motion_detect_desc_intel flags */
59+#define CL_ME_MB_TYPE_16x16_INTEL 0x0
60+#define CL_ME_MB_TYPE_8x8_INTEL 0x1
61+#define CL_ME_MB_TYPE_4x4_INTEL 0x2
62+
63+#define CL_ME_SUBPIXEL_MODE_INTEGER_INTEL 0x0
64+#define CL_ME_SUBPIXEL_MODE_HPEL_INTEL 0x1
65+#define CL_ME_SUBPIXEL_MODE_QPEL_INTEL 0x2
66+
67+#define CL_ME_SAD_ADJUST_MODE_NONE_INTEL 0x0
68+#define CL_ME_SAD_ADJUST_MODE_HAAR_INTEL 0x1
69+
70+#define CL_ME_SEARCH_PATH_RADIUS_2_2_INTEL 0x0
71+#define CL_ME_SEARCH_PATH_RADIUS_4_4_INTEL 0x1
72+#define CL_ME_SEARCH_PATH_RADIUS_16_12_INTEL 0x5
73+
74+extern CL_API_ENTRY cl_accelerator_intel CL_API_CALL
75+clCreateAcceleratorINTEL(
76+ cl_context /* context */,
77+ cl_accelerator_type_intel /* accelerator_type */,
78+ size_t /* descriptor_size */,
79+ const void* /* descriptor */,
80+ cl_int* /* errcode_ret */ ) CL_EXT_SUFFIX__VERSION_1_2;
81+
82+typedef CL_API_ENTRY cl_accelerator_intel
83+ (CL_API_CALL *clCreateAcceleratorINTEL_fn)(
84+ cl_context /* context */,
85+ cl_accelerator_type_intel /* accelerator_type */,
86+ size_t /* descriptor_size */,
87+ const void* /* descriptor */,
88+ cl_int* /* errcode_ret */ ) CL_EXT_SUFFIX__VERSION_1_2;
89+
90+extern CL_API_ENTRY cl_int CL_API_CALL
91+clGetAcceleratorInfoINTEL
92+(
93+ cl_accelerator_intel /* accelerator */,
94+ cl_accelerator_info_intel /* param_name */,
95+ size_t /* param_value_size */,
96+ void* /* param_value */,
97+ size_t* /* param_value_size_ret */ ) CL_EXT_SUFFIX__VERSION_1_2;
98+
99+typedef CL_API_ENTRY cl_int
100+ (CL_API_CALL *clGetAcceleratorInfoINTEL_fn)(
101+ cl_accelerator_intel /* accelerator */,
102+ cl_accelerator_info_intel /* param_name */,
103+ size_t /* param_value_size */,
104+ void* /* param_value */,
105+ size_t* /* param_value_size_ret */ ) CL_EXT_SUFFIX__VERSION_1_2;
106+
107+extern CL_API_ENTRY cl_int CL_API_CALL
108+clRetainAcceleratorINTEL(
109+ cl_accelerator_intel /* accelerator */ ) CL_EXT_SUFFIX__VERSION_1_2;
110+
111+typedef CL_API_ENTRY cl_int
112+ (CL_API_CALL *clRetainAcceleratorINTEL_fn)(
113+ cl_accelerator_intel /* accelerator */ ) CL_EXT_SUFFIX__VERSION_1_2;
114+
115+extern CL_API_ENTRY cl_int CL_API_CALL
116+clReleaseAcceleratorINTEL(
117+ cl_accelerator_intel /* accelerator */ ) CL_EXT_SUFFIX__VERSION_1_2;
118+
119+typedef CL_API_ENTRY cl_int
120+ (CL_API_CALL *clReleaseAcceleratorINTEL_fn)(
121+ cl_accelerator_intel /* accelerator */ ) CL_EXT_SUFFIX__VERSION_1_2;
122+#endif
123+#endif
124+
125 #define CL_MEM_PINNABLE (1 << 10)
126
127 /* Track allocations and report current number of unfreed allocations */
128--- a/src/cl_accelerator_intel.h
129+++ b/src/cl_accelerator_intel.h
130@@ -4,6 +4,7 @@
131 #include "cl_base_object.h"
132 #include "CL/cl.h"
133 #include "CL/cl_ext.h"
134+#include "CL/cl_intel.h"
135 #include <stdint.h>
136
137 struct _cl_accelerator_intel {
138--- a/src/cl_driver.h
139+++ b/src/cl_driver.h
140@@ -24,6 +24,7 @@
141 #include <stdlib.h>
142 #include "cl_driver_type.h"
143 #include "CL/cl_ext.h"
144+#include "CL/cl_intel.h"
145 /* Various limitations we should remove actually */
146 #define GEN_MAX_SURFACES 256
147 #define GEN_MAX_SAMPLERS 16
This page took 0.129848 seconds and 4 git commands to generate.