Debian Codegraph @

include/CL/cl_va_api_media_sharing_intel.h

raw
1 /*******************************************************************************
2 * Copyright (c) 2008-2023 The Khronos Group Inc.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 ******************************************************************************/
16
17 #ifndef OPENCL_CL_VA_API_MEDIA_SHARING_INTEL_H_
18 #define OPENCL_CL_VA_API_MEDIA_SHARING_INTEL_H_
19
20 /*
21 ** This header is generated from the Khronos OpenCL XML API Registry.
22 */
23
24 #include <va/va.h>
25
26 #include <CL/cl.h>
27
28 /* CL_NO_PROTOTYPES implies CL_NO_EXTENSION_PROTOTYPES: */
29 #if defined(CL_NO_PROTOTYPES) && !defined(CL_NO_EXTENSION_PROTOTYPES)
30 #define CL_NO_EXTENSION_PROTOTYPES
31 #endif
32
33 /* CL_NO_EXTENSION_PROTOTYPES implies
34 CL_NO_ICD_DISPATCH_EXTENSION_PROTOTYPES and
35 CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES: */
36 #if defined(CL_NO_EXTENSION_PROTOTYPES) && \
37 !defined(CL_NO_ICD_DISPATCH_EXTENSION_PROTOTYPES)
38 #define CL_NO_ICD_DISPATCH_EXTENSION_PROTOTYPES
39 #endif
40 #if defined(CL_NO_EXTENSION_PROTOTYPES) && \
41 !defined(CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES)
42 #define CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES
43 #endif
44
45 #ifdef __cplusplus
46 extern "C" {
47 #endif
48
49 /***************************************************************
50 * cl_intel_sharing_format_query_va_api
51 ***************************************************************/
52 #define cl_intel_sharing_format_query_va_api 1
53 #define CL_INTEL_SHARING_FORMAT_QUERY_VA_API_EXTENSION_NAME \
54 "cl_intel_sharing_format_query_va_api"
55
56
57 #define CL_INTEL_SHARING_FORMAT_QUERY_VA_API_EXTENSION_VERSION CL_MAKE_VERSION(0, 0, 0)
58
59 /* when cl_intel_va_api_media_sharing is supported */
60
61 typedef cl_int CL_API_CALL
62 clGetSupportedVA_APIMediaSurfaceFormatsINTEL_t(
63 cl_context context,
64 cl_mem_flags flags,
65 cl_mem_object_type image_type,
66 cl_uint plane,
67 cl_uint num_entries,
68 VAImageFormat* va_api_formats,
69 cl_uint* num_surface_formats);
70
71 typedef clGetSupportedVA_APIMediaSurfaceFormatsINTEL_t *
72 clGetSupportedVA_APIMediaSurfaceFormatsINTEL_fn ;
73
74 #if !defined(CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES)
75
76 extern CL_API_ENTRY cl_int CL_API_CALL
77 clGetSupportedVA_APIMediaSurfaceFormatsINTEL(
78 cl_context context,
79 cl_mem_flags flags,
80 cl_mem_object_type image_type,
81 cl_uint plane,
82 cl_uint num_entries,
83 VAImageFormat* va_api_formats,
84 cl_uint* num_surface_formats) ;
85
86 #endif /* !defined(CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES) */
87
88 /***************************************************************
89 * cl_intel_va_api_media_sharing
90 ***************************************************************/
91 #define cl_intel_va_api_media_sharing 1
92 #define CL_INTEL_VA_API_MEDIA_SHARING_EXTENSION_NAME \
93 "cl_intel_va_api_media_sharing"
94
95
96 #define CL_INTEL_VA_API_MEDIA_SHARING_EXTENSION_VERSION CL_MAKE_VERSION(0, 0, 0)
97
98 typedef cl_uint cl_va_api_device_source_intel;
99 typedef cl_uint cl_va_api_device_set_intel;
100
101 /* Error codes */
102 #define CL_INVALID_VA_API_MEDIA_ADAPTER_INTEL -1098
103 #define CL_INVALID_VA_API_MEDIA_SURFACE_INTEL -1099
104 #define CL_VA_API_MEDIA_SURFACE_ALREADY_ACQUIRED_INTEL -1100
105 #define CL_VA_API_MEDIA_SURFACE_NOT_ACQUIRED_INTEL -1101
106
107 /* cl_va_api_device_source_intel */
108 #define CL_VA_API_DISPLAY_INTEL 0x4094
109
110 /* cl_va_api_device_set_intel */
111 #define CL_PREFERRED_DEVICES_FOR_VA_API_INTEL 0x4095
112 #define CL_ALL_DEVICES_FOR_VA_API_INTEL 0x4096
113
114 /* cl_context_info */
115 #define CL_CONTEXT_VA_API_DISPLAY_INTEL 0x4097
116
117 /* cl_mem_info */
118 #define CL_MEM_VA_API_MEDIA_SURFACE_INTEL 0x4098
119
120 /* cl_image_info */
121 #define CL_IMAGE_VA_API_PLANE_INTEL 0x4099
122
123 /* cl_command_type */
124 #define CL_COMMAND_ACQUIRE_VA_API_MEDIA_SURFACES_INTEL 0x409A
125 #define CL_COMMAND_RELEASE_VA_API_MEDIA_SURFACES_INTEL 0x409B
126
127
128 typedef cl_int CL_API_CALL
129 clGetDeviceIDsFromVA_APIMediaAdapterINTEL_t(
130 cl_platform_id platform,
131 cl_va_api_device_source_intel media_adapter_type,
132 void* media_adapter,
133 cl_va_api_device_set_intel media_adapter_set,
134 cl_uint num_entries,
135 cl_device_id* devices,
136 cl_uint* num_devices);
137
138 typedef clGetDeviceIDsFromVA_APIMediaAdapterINTEL_t *
139 clGetDeviceIDsFromVA_APIMediaAdapterINTEL_fn CL_API_SUFFIX__VERSION_1_2;
140
141 typedef cl_mem CL_API_CALL
142 clCreateFromVA_APIMediaSurfaceINTEL_t(
143 cl_context context,
144 cl_mem_flags flags,
145 VASurfaceID* surface,
146 cl_uint plane,
147 cl_int* errcode_ret);
148
149 typedef clCreateFromVA_APIMediaSurfaceINTEL_t *
150 clCreateFromVA_APIMediaSurfaceINTEL_fn CL_API_SUFFIX__VERSION_1_2;
151
152 typedef cl_int CL_API_CALL
153 clEnqueueAcquireVA_APIMediaSurfacesINTEL_t(
154 cl_command_queue command_queue,
155 cl_uint num_objects,
156 const cl_mem* mem_objects,
157 cl_uint num_events_in_wait_list,
158 const cl_event* event_wait_list,
159 cl_event* event);
160
161 typedef clEnqueueAcquireVA_APIMediaSurfacesINTEL_t *
162 clEnqueueAcquireVA_APIMediaSurfacesINTEL_fn CL_API_SUFFIX__VERSION_1_2;
163
164 typedef cl_int CL_API_CALL
165 clEnqueueReleaseVA_APIMediaSurfacesINTEL_t(
166 cl_command_queue command_queue,
167 cl_uint num_objects,
168 const cl_mem* mem_objects,
169 cl_uint num_events_in_wait_list,
170 const cl_event* event_wait_list,
171 cl_event* event);
172
173 typedef clEnqueueReleaseVA_APIMediaSurfacesINTEL_t *
174 clEnqueueReleaseVA_APIMediaSurfacesINTEL_fn CL_API_SUFFIX__VERSION_1_2;
175
176 #if !defined(CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES)
177
178 extern CL_API_ENTRY cl_int CL_API_CALL
179 clGetDeviceIDsFromVA_APIMediaAdapterINTEL(
180 cl_platform_id platform,
181 cl_va_api_device_source_intel media_adapter_type,
182 void* media_adapter,
183 cl_va_api_device_set_intel media_adapter_set,
184 cl_uint num_entries,
185 cl_device_id* devices,
186 cl_uint* num_devices) CL_API_SUFFIX__VERSION_1_2;
187
188 extern CL_API_ENTRY cl_mem CL_API_CALL
189 clCreateFromVA_APIMediaSurfaceINTEL(
190 cl_context context,
191 cl_mem_flags flags,
192 VASurfaceID* surface,
193 cl_uint plane,
194 cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_2;
195
196 extern CL_API_ENTRY cl_int CL_API_CALL
197 clEnqueueAcquireVA_APIMediaSurfacesINTEL(
198 cl_command_queue command_queue,
199 cl_uint num_objects,
200 const cl_mem* mem_objects,
201 cl_uint num_events_in_wait_list,
202 const cl_event* event_wait_list,
203 cl_event* event) CL_API_SUFFIX__VERSION_1_2;
204
205 extern CL_API_ENTRY cl_int CL_API_CALL
206 clEnqueueReleaseVA_APIMediaSurfacesINTEL(
207 cl_command_queue command_queue,
208 cl_uint num_objects,
209 const cl_mem* mem_objects,
210 cl_uint num_events_in_wait_list,
211 const cl_event* event_wait_list,
212 cl_event* event) CL_API_SUFFIX__VERSION_1_2;
213
214 #endif /* !defined(CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES) */
215
216 #ifdef __cplusplus
217 }
218 #endif
219
220 #endif /* OPENCL_CL_VA_API_MEDIA_SHARING_INTEL_H_ */