Debian Codegraph @

include/CL/cl_gl.h

raw symbols SCIP
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_GL_H_
18 #define OPENCL_CL_GL_H_
19
20 /*
21 ** This header is generated from the Khronos OpenCL XML API Registry.
22 */
23
24 #include <CL/cl.h>
25
26 /* CL_NO_PROTOTYPES implies CL_NO_EXTENSION_PROTOTYPES: */
27 #if defined(CL_NO_PROTOTYPES) && !defined(CL_NO_EXTENSION_PROTOTYPES)
28 #define CL_NO_EXTENSION_PROTOTYPES
29 #endif
30
31 /* CL_NO_EXTENSION_PROTOTYPES implies
32 CL_NO_ICD_DISPATCH_EXTENSION_PROTOTYPES and
33 CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES: */
34 #if defined(CL_NO_EXTENSION_PROTOTYPES) && \
35 !defined(CL_NO_ICD_DISPATCH_EXTENSION_PROTOTYPES)
36 #define CL_NO_ICD_DISPATCH_EXTENSION_PROTOTYPES
37 #endif
38 #if defined(CL_NO_EXTENSION_PROTOTYPES) && \
39 !defined(CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES)
40 #define CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES
41 #endif
42
43 #ifdef __cplusplus
44 extern "C" {
45 #endif
46
47 /***************************************************************
48 * cl_khr_gl_sharing
49 ***************************************************************/
50 #define cl_khr_gl_sharing 1
51 #define CL_KHR_GL_SHARING_EXTENSION_NAME \
52 "cl_khr_gl_sharing"
53
54 typedef cl_uint cl_gl_context_info;
55
56 /* Error codes */
57 #define CL_INVALID_GL_SHAREGROUP_REFERENCE_KHR -1000
58
59 /* cl_gl_context_info */
60 #define CL_CURRENT_DEVICE_FOR_GL_CONTEXT_KHR 0x2006
61 #define CL_DEVICES_FOR_GL_CONTEXT_KHR 0x2007
62
63 /* Additional cl_context_properties */
64 #define CL_GL_CONTEXT_KHR 0x2008
65 #define CL_EGL_DISPLAY_KHR 0x2009
66 #define CL_GLX_DISPLAY_KHR 0x200A
67 #define CL_WGL_HDC_KHR 0x200B
68 #define CL_CGL_SHAREGROUP_KHR 0x200C
69
70 typedef cl_uint cl_gl_object_type;
71 typedef cl_uint cl_gl_texture_info;
72 typedef cl_uint cl_gl_platform_info;
73
74 /* cl_gl_object_type */
75 #define CL_GL_OBJECT_BUFFER 0x2000
76 #define CL_GL_OBJECT_TEXTURE2D 0x2001
77 #define CL_GL_OBJECT_TEXTURE3D 0x2002
78 #define CL_GL_OBJECT_RENDERBUFFER 0x2003
79
80 #if defined(CL_VERSION_1_2)
81 /* cl_gl_object_type */
82 #define CL_GL_OBJECT_TEXTURE2D_ARRAY 0x200E
83 #define CL_GL_OBJECT_TEXTURE1D 0x200F
84 #define CL_GL_OBJECT_TEXTURE1D_ARRAY 0x2010
85 #define CL_GL_OBJECT_TEXTURE_BUFFER 0x2011
86
87 #endif /* defined(CL_VERSION_1_2) */
88
89 /* cl_gl_texture_info */
90 #define CL_GL_TEXTURE_TARGET 0x2004
91 #define CL_GL_MIPMAP_LEVEL 0x2005
92
93
94 typedef cl_int (CL_API_CALL *
95 clGetGLContextInfoKHR_fn)(
96 const cl_context_properties* properties,
97 cl_gl_context_info param_name,
98 size_t param_value_size,
99 void* param_value,
100 size_t* param_value_size_ret) CL_API_SUFFIX__VERSION_1_0;
101
102 typedef cl_mem (CL_API_CALL *
103 clCreateFromGLBuffer_fn)(
104 cl_context context,
105 cl_mem_flags flags,
106 cl_GLuint bufobj,
107 cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_0;
108
109 #if !defined(CL_NO_ICD_DISPATCH_EXTENSION_PROTOTYPES)
110
111 extern CL_API_ENTRY cl_int CL_API_CALL
112 clGetGLContextInfoKHR(
113 const cl_context_properties* properties,
114 cl_gl_context_info param_name,
115 size_t param_value_size,
116 void* param_value,
117 size_t* param_value_size_ret) CL_API_SUFFIX__VERSION_1_0;
118
119 extern CL_API_ENTRY cl_mem CL_API_CALL
120 clCreateFromGLBuffer(
121 cl_context context,
122 cl_mem_flags flags,
123 cl_GLuint bufobj,
124 cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_0;
125
126 #endif /* !defined(CL_NO_ICD_DISPATCH_EXTENSION_PROTOTYPES) */
127
128 #if defined(CL_VERSION_1_2)
129
130 typedef cl_mem (CL_API_CALL *
131 clCreateFromGLTexture_fn)(
132 cl_context context,
133 cl_mem_flags flags,
134 cl_GLenum target,
135 cl_GLint miplevel,
136 cl_GLuint texture,
137 cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_2;
138
139 #if !defined(CL_NO_ICD_DISPATCH_EXTENSION_PROTOTYPES)
140
141 extern CL_API_ENTRY cl_mem CL_API_CALL
142 clCreateFromGLTexture(
143 cl_context context,
144 cl_mem_flags flags,
145 cl_GLenum target,
146 cl_GLint miplevel,
147 cl_GLuint texture,
148 cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_2;
149
150 #endif /* !defined(CL_NO_ICD_DISPATCH_EXTENSION_PROTOTYPES) */
151
152 #endif /* defined(CL_VERSION_1_2) */
153
154
155 typedef cl_mem (CL_API_CALL *
156 clCreateFromGLRenderbuffer_fn)(
157 cl_context context,
158 cl_mem_flags flags,
159 cl_GLuint renderbuffer,
160 cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_0;
161
162 typedef cl_int (CL_API_CALL *
163 clGetGLObjectInfo_fn)(
164 cl_mem memobj,
165 cl_gl_object_type* gl_object_type,
166 cl_GLuint* gl_object_name) CL_API_SUFFIX__VERSION_1_0;
167
168 typedef cl_int (CL_API_CALL *
169 clGetGLTextureInfo_fn)(
170 cl_mem memobj,
171 cl_gl_texture_info param_name,
172 size_t param_value_size,
173 void* param_value,
174 size_t* param_value_size_ret) CL_API_SUFFIX__VERSION_1_0;
175
176 typedef cl_int (CL_API_CALL *
177 clEnqueueAcquireGLObjects_fn)(
178 cl_command_queue command_queue,
179 cl_uint num_objects,
180 const cl_mem* mem_objects,
181 cl_uint num_events_in_wait_list,
182 const cl_event* event_wait_list,
183 cl_event* event) CL_API_SUFFIX__VERSION_1_0;
184
185 typedef cl_int (CL_API_CALL *
186 clEnqueueReleaseGLObjects_fn)(
187 cl_command_queue command_queue,
188 cl_uint num_objects,
189 const cl_mem* mem_objects,
190 cl_uint num_events_in_wait_list,
191 const cl_event* event_wait_list,
192 cl_event* event) CL_API_SUFFIX__VERSION_1_0;
193
194 #if !defined(CL_NO_ICD_DISPATCH_EXTENSION_PROTOTYPES)
195
196 extern CL_API_ENTRY cl_mem CL_API_CALL
197 clCreateFromGLRenderbuffer(
198 cl_context context,
199 cl_mem_flags flags,
200 cl_GLuint renderbuffer,
201 cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_0;
202
203 extern CL_API_ENTRY cl_int CL_API_CALL
204 clGetGLObjectInfo(
205 cl_mem memobj,
206 cl_gl_object_type* gl_object_type,
207 cl_GLuint* gl_object_name) CL_API_SUFFIX__VERSION_1_0;
208
209 extern CL_API_ENTRY cl_int CL_API_CALL
210 clGetGLTextureInfo(
211 cl_mem memobj,
212 cl_gl_texture_info param_name,
213 size_t param_value_size,
214 void* param_value,
215 size_t* param_value_size_ret) CL_API_SUFFIX__VERSION_1_0;
216
217 extern CL_API_ENTRY cl_int CL_API_CALL
218 clEnqueueAcquireGLObjects(
219 cl_command_queue command_queue,
220 cl_uint num_objects,
221 const cl_mem* mem_objects,
222 cl_uint num_events_in_wait_list,
223 const cl_event* event_wait_list,
224 cl_event* event) CL_API_SUFFIX__VERSION_1_0;
225
226 extern CL_API_ENTRY cl_int CL_API_CALL
227 clEnqueueReleaseGLObjects(
228 cl_command_queue command_queue,
229 cl_uint num_objects,
230 const cl_mem* mem_objects,
231 cl_uint num_events_in_wait_list,
232 const cl_event* event_wait_list,
233 cl_event* event) CL_API_SUFFIX__VERSION_1_0;
234
235 #endif /* !defined(CL_NO_ICD_DISPATCH_EXTENSION_PROTOTYPES) */
236
237 /* OpenCL 1.0 APIs that were deprecated in OpenCL 1.2 */
238
239 typedef cl_mem (CL_API_CALL *
240 clCreateFromGLTexture2D_fn)(
241 cl_context context,
242 cl_mem_flags flags,
243 cl_GLenum target,
244 cl_GLint miplevel,
245 cl_GLuint texture,
246 cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_1_DEPRECATED;
247
248 typedef cl_mem (CL_API_CALL *
249 clCreateFromGLTexture3D_fn)(
250 cl_context context,
251 cl_mem_flags flags,
252 cl_GLenum target,
253 cl_GLint miplevel,
254 cl_GLuint texture,
255 cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_1_DEPRECATED;
256
257 #if !defined(CL_NO_ICD_DISPATCH_EXTENSION_PROTOTYPES)
258
259 extern CL_API_ENTRY cl_mem CL_API_CALL
260 clCreateFromGLTexture2D(
261 cl_context context,
262 cl_mem_flags flags,
263 cl_GLenum target,
264 cl_GLint miplevel,
265 cl_GLuint texture,
266 cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_1_DEPRECATED;
267
268 extern CL_API_ENTRY cl_mem CL_API_CALL
269 clCreateFromGLTexture3D(
270 cl_context context,
271 cl_mem_flags flags,
272 cl_GLenum target,
273 cl_GLint miplevel,
274 cl_GLuint texture,
275 cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_1_DEPRECATED;
276
277 #endif /* !defined(CL_NO_ICD_DISPATCH_EXTENSION_PROTOTYPES) */
278
279 /***************************************************************
280 * cl_khr_gl_event
281 ***************************************************************/
282 #define cl_khr_gl_event 1
283 #define CL_KHR_GL_EVENT_EXTENSION_NAME \
284 "cl_khr_gl_event"
285
286 typedef struct __GLsync * cl_GLsync;
287
288 /* cl_command_type */
289 #define CL_COMMAND_GL_FENCE_SYNC_OBJECT_KHR 0x200D
290
291
292 typedef cl_event (CL_API_CALL *
293 clCreateEventFromGLsyncKHR_fn)(
294 cl_context context,
295 cl_GLsync sync,
296 cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_1;
297
298 #if !defined(CL_NO_ICD_DISPATCH_EXTENSION_PROTOTYPES)
299
300 extern CL_API_ENTRY cl_event CL_API_CALL
301 clCreateEventFromGLsyncKHR(
302 cl_context context,
303 cl_GLsync sync,
304 cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_1;
305
306 #endif /* !defined(CL_NO_ICD_DISPATCH_EXTENSION_PROTOTYPES) */
307
308 /***************************************************************
309 * cl_khr_gl_depth_images
310 ***************************************************************/
311 #define cl_khr_gl_depth_images 1
312 #define CL_KHR_GL_DEPTH_IMAGES_EXTENSION_NAME \
313 "cl_khr_gl_depth_images"
314
315 #if !defined(CL_VERSION_1_2)
316 /* cl_channel_order - defined in CL.h for OpenCL 1.2 and newer */
317 #define CL_DEPTH_STENCIL 0x10BE
318
319 #endif /* !defined(CL_VERSION_1_2) */
320
321 #if !defined(CL_VERSION_1_2)
322 /* cl_channel_type - defined in CL.h for OpenCL 1.2 and newer */
323 #define CL_UNORM_INT24 0x10DF
324
325 #endif /* !defined(CL_VERSION_1_2) */
326
327 /***************************************************************
328 * cl_khr_gl_msaa_sharing
329 ***************************************************************/
330 #define cl_khr_gl_msaa_sharing 1
331 #define CL_KHR_GL_MSAA_SHARING_EXTENSION_NAME \
332 "cl_khr_gl_msaa_sharing"
333
334 /* cl_gl_texture_info */
335 #define CL_GL_NUM_SAMPLES 0x2012
336
337 /***************************************************************
338 * cl_intel_sharing_format_query_gl
339 ***************************************************************/
340 #define cl_intel_sharing_format_query_gl 1
341 #define CL_INTEL_SHARING_FORMAT_QUERY_GL_EXTENSION_NAME \
342 "cl_intel_sharing_format_query_gl"
343
344 /* when cl_khr_gl_sharing is supported */
345
346 typedef cl_int (CL_API_CALL *
347 clGetSupportedGLTextureFormatsINTEL_fn)(
348 cl_context context,
349 cl_mem_flags flags,
350 cl_mem_object_type image_type,
351 cl_uint num_entries,
352 cl_GLenum* gl_formats,
353 cl_uint* num_texture_formats) ;
354
355 #if !defined(CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES)
356
357 extern CL_API_ENTRY cl_int CL_API_CALL
358 clGetSupportedGLTextureFormatsINTEL(
359 cl_context context,
360 cl_mem_flags flags,
361 cl_mem_object_type image_type,
362 cl_uint num_entries,
363 cl_GLenum* gl_formats,
364 cl_uint* num_texture_formats) ;
365
366 #endif /* !defined(CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES) */
367
368 #ifdef __cplusplus
369 }
370 #endif
371
372 #endif /* OPENCL_CL_GL_H_ */