xref: /aosp_15_r20/external/angle/include/CL/cl_gl.h (revision 8975f5c5ed3d1c378011245431ada316dfb6f244)
1*8975f5c5SAndroid Build Coastguard Worker /*******************************************************************************
2*8975f5c5SAndroid Build Coastguard Worker  * Copyright (c) 2008-2023 The Khronos Group Inc.
3*8975f5c5SAndroid Build Coastguard Worker  *
4*8975f5c5SAndroid Build Coastguard Worker  * Licensed under the Apache License, Version 2.0 (the "License");
5*8975f5c5SAndroid Build Coastguard Worker  * you may not use this file except in compliance with the License.
6*8975f5c5SAndroid Build Coastguard Worker  * You may obtain a copy of the License at
7*8975f5c5SAndroid Build Coastguard Worker  *
8*8975f5c5SAndroid Build Coastguard Worker  *    http://www.apache.org/licenses/LICENSE-2.0
9*8975f5c5SAndroid Build Coastguard Worker  *
10*8975f5c5SAndroid Build Coastguard Worker  * Unless required by applicable law or agreed to in writing, software
11*8975f5c5SAndroid Build Coastguard Worker  * distributed under the License is distributed on an "AS IS" BASIS,
12*8975f5c5SAndroid Build Coastguard Worker  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13*8975f5c5SAndroid Build Coastguard Worker  * See the License for the specific language governing permissions and
14*8975f5c5SAndroid Build Coastguard Worker  * limitations under the License.
15*8975f5c5SAndroid Build Coastguard Worker  ******************************************************************************/
16*8975f5c5SAndroid Build Coastguard Worker 
17*8975f5c5SAndroid Build Coastguard Worker #ifndef OPENCL_CL_GL_H_
18*8975f5c5SAndroid Build Coastguard Worker #define OPENCL_CL_GL_H_
19*8975f5c5SAndroid Build Coastguard Worker 
20*8975f5c5SAndroid Build Coastguard Worker /*
21*8975f5c5SAndroid Build Coastguard Worker ** This header is generated from the Khronos OpenCL XML API Registry.
22*8975f5c5SAndroid Build Coastguard Worker */
23*8975f5c5SAndroid Build Coastguard Worker 
24*8975f5c5SAndroid Build Coastguard Worker #include <CL/cl.h>
25*8975f5c5SAndroid Build Coastguard Worker 
26*8975f5c5SAndroid Build Coastguard Worker /* CL_NO_PROTOTYPES implies CL_NO_EXTENSION_PROTOTYPES: */
27*8975f5c5SAndroid Build Coastguard Worker #if defined(CL_NO_PROTOTYPES) && !defined(CL_NO_EXTENSION_PROTOTYPES)
28*8975f5c5SAndroid Build Coastguard Worker #define CL_NO_EXTENSION_PROTOTYPES
29*8975f5c5SAndroid Build Coastguard Worker #endif
30*8975f5c5SAndroid Build Coastguard Worker 
31*8975f5c5SAndroid Build Coastguard Worker /* CL_NO_EXTENSION_PROTOTYPES implies
32*8975f5c5SAndroid Build Coastguard Worker    CL_NO_ICD_DISPATCH_EXTENSION_PROTOTYPES and
33*8975f5c5SAndroid Build Coastguard Worker    CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES: */
34*8975f5c5SAndroid Build Coastguard Worker #if defined(CL_NO_EXTENSION_PROTOTYPES) && \
35*8975f5c5SAndroid Build Coastguard Worker     !defined(CL_NO_ICD_DISPATCH_EXTENSION_PROTOTYPES)
36*8975f5c5SAndroid Build Coastguard Worker #define CL_NO_ICD_DISPATCH_EXTENSION_PROTOTYPES
37*8975f5c5SAndroid Build Coastguard Worker #endif
38*8975f5c5SAndroid Build Coastguard Worker #if defined(CL_NO_EXTENSION_PROTOTYPES) && \
39*8975f5c5SAndroid Build Coastguard Worker     !defined(CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES)
40*8975f5c5SAndroid Build Coastguard Worker #define CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES
41*8975f5c5SAndroid Build Coastguard Worker #endif
42*8975f5c5SAndroid Build Coastguard Worker 
43*8975f5c5SAndroid Build Coastguard Worker #ifdef __cplusplus
44*8975f5c5SAndroid Build Coastguard Worker extern "C" {
45*8975f5c5SAndroid Build Coastguard Worker #endif
46*8975f5c5SAndroid Build Coastguard Worker 
47*8975f5c5SAndroid Build Coastguard Worker /***************************************************************
48*8975f5c5SAndroid Build Coastguard Worker * cl_khr_gl_sharing
49*8975f5c5SAndroid Build Coastguard Worker ***************************************************************/
50*8975f5c5SAndroid Build Coastguard Worker #define cl_khr_gl_sharing 1
51*8975f5c5SAndroid Build Coastguard Worker #define CL_KHR_GL_SHARING_EXTENSION_NAME \
52*8975f5c5SAndroid Build Coastguard Worker     "cl_khr_gl_sharing"
53*8975f5c5SAndroid Build Coastguard Worker 
54*8975f5c5SAndroid Build Coastguard Worker typedef cl_uint             cl_gl_context_info;
55*8975f5c5SAndroid Build Coastguard Worker 
56*8975f5c5SAndroid Build Coastguard Worker /* Error codes */
57*8975f5c5SAndroid Build Coastguard Worker #define CL_INVALID_GL_SHAREGROUP_REFERENCE_KHR              -1000
58*8975f5c5SAndroid Build Coastguard Worker 
59*8975f5c5SAndroid Build Coastguard Worker /* cl_gl_context_info */
60*8975f5c5SAndroid Build Coastguard Worker #define CL_CURRENT_DEVICE_FOR_GL_CONTEXT_KHR                0x2006
61*8975f5c5SAndroid Build Coastguard Worker #define CL_DEVICES_FOR_GL_CONTEXT_KHR                       0x2007
62*8975f5c5SAndroid Build Coastguard Worker 
63*8975f5c5SAndroid Build Coastguard Worker /* Additional cl_context_properties */
64*8975f5c5SAndroid Build Coastguard Worker #define CL_GL_CONTEXT_KHR                                   0x2008
65*8975f5c5SAndroid Build Coastguard Worker #define CL_EGL_DISPLAY_KHR                                  0x2009
66*8975f5c5SAndroid Build Coastguard Worker #define CL_GLX_DISPLAY_KHR                                  0x200A
67*8975f5c5SAndroid Build Coastguard Worker #define CL_WGL_HDC_KHR                                      0x200B
68*8975f5c5SAndroid Build Coastguard Worker #define CL_CGL_SHAREGROUP_KHR                               0x200C
69*8975f5c5SAndroid Build Coastguard Worker 
70*8975f5c5SAndroid Build Coastguard Worker typedef cl_uint             cl_gl_object_type;
71*8975f5c5SAndroid Build Coastguard Worker typedef cl_uint             cl_gl_texture_info;
72*8975f5c5SAndroid Build Coastguard Worker typedef cl_uint             cl_gl_platform_info;
73*8975f5c5SAndroid Build Coastguard Worker 
74*8975f5c5SAndroid Build Coastguard Worker /* cl_gl_object_type */
75*8975f5c5SAndroid Build Coastguard Worker #define CL_GL_OBJECT_BUFFER                                 0x2000
76*8975f5c5SAndroid Build Coastguard Worker #define CL_GL_OBJECT_TEXTURE2D                              0x2001
77*8975f5c5SAndroid Build Coastguard Worker #define CL_GL_OBJECT_TEXTURE3D                              0x2002
78*8975f5c5SAndroid Build Coastguard Worker #define CL_GL_OBJECT_RENDERBUFFER                           0x2003
79*8975f5c5SAndroid Build Coastguard Worker 
80*8975f5c5SAndroid Build Coastguard Worker #if defined(CL_VERSION_1_2)
81*8975f5c5SAndroid Build Coastguard Worker /* cl_gl_object_type */
82*8975f5c5SAndroid Build Coastguard Worker #define CL_GL_OBJECT_TEXTURE2D_ARRAY                        0x200E
83*8975f5c5SAndroid Build Coastguard Worker #define CL_GL_OBJECT_TEXTURE1D                              0x200F
84*8975f5c5SAndroid Build Coastguard Worker #define CL_GL_OBJECT_TEXTURE1D_ARRAY                        0x2010
85*8975f5c5SAndroid Build Coastguard Worker #define CL_GL_OBJECT_TEXTURE_BUFFER                         0x2011
86*8975f5c5SAndroid Build Coastguard Worker 
87*8975f5c5SAndroid Build Coastguard Worker #endif /* defined(CL_VERSION_1_2) */
88*8975f5c5SAndroid Build Coastguard Worker 
89*8975f5c5SAndroid Build Coastguard Worker /* cl_gl_texture_info */
90*8975f5c5SAndroid Build Coastguard Worker #define CL_GL_TEXTURE_TARGET                                0x2004
91*8975f5c5SAndroid Build Coastguard Worker #define CL_GL_MIPMAP_LEVEL                                  0x2005
92*8975f5c5SAndroid Build Coastguard Worker 
93*8975f5c5SAndroid Build Coastguard Worker 
94*8975f5c5SAndroid Build Coastguard Worker typedef cl_int CL_API_CALL
95*8975f5c5SAndroid Build Coastguard Worker clGetGLContextInfoKHR_t(
96*8975f5c5SAndroid Build Coastguard Worker     const cl_context_properties* properties,
97*8975f5c5SAndroid Build Coastguard Worker     cl_gl_context_info param_name,
98*8975f5c5SAndroid Build Coastguard Worker     size_t param_value_size,
99*8975f5c5SAndroid Build Coastguard Worker     void* param_value,
100*8975f5c5SAndroid Build Coastguard Worker     size_t* param_value_size_ret);
101*8975f5c5SAndroid Build Coastguard Worker 
102*8975f5c5SAndroid Build Coastguard Worker typedef clGetGLContextInfoKHR_t *
103*8975f5c5SAndroid Build Coastguard Worker clGetGLContextInfoKHR_fn CL_API_SUFFIX__VERSION_1_0;
104*8975f5c5SAndroid Build Coastguard Worker 
105*8975f5c5SAndroid Build Coastguard Worker typedef cl_mem CL_API_CALL
106*8975f5c5SAndroid Build Coastguard Worker clCreateFromGLBuffer_t(
107*8975f5c5SAndroid Build Coastguard Worker     cl_context context,
108*8975f5c5SAndroid Build Coastguard Worker     cl_mem_flags flags,
109*8975f5c5SAndroid Build Coastguard Worker     cl_GLuint bufobj,
110*8975f5c5SAndroid Build Coastguard Worker     cl_int* errcode_ret);
111*8975f5c5SAndroid Build Coastguard Worker 
112*8975f5c5SAndroid Build Coastguard Worker typedef clCreateFromGLBuffer_t *
113*8975f5c5SAndroid Build Coastguard Worker clCreateFromGLBuffer_fn CL_API_SUFFIX__VERSION_1_0;
114*8975f5c5SAndroid Build Coastguard Worker 
115*8975f5c5SAndroid Build Coastguard Worker #if !defined(CL_NO_ICD_DISPATCH_EXTENSION_PROTOTYPES)
116*8975f5c5SAndroid Build Coastguard Worker 
117*8975f5c5SAndroid Build Coastguard Worker extern CL_API_ENTRY cl_int CL_API_CALL
118*8975f5c5SAndroid Build Coastguard Worker clGetGLContextInfoKHR(
119*8975f5c5SAndroid Build Coastguard Worker     const cl_context_properties* properties,
120*8975f5c5SAndroid Build Coastguard Worker     cl_gl_context_info param_name,
121*8975f5c5SAndroid Build Coastguard Worker     size_t param_value_size,
122*8975f5c5SAndroid Build Coastguard Worker     void* param_value,
123*8975f5c5SAndroid Build Coastguard Worker     size_t* param_value_size_ret) CL_API_SUFFIX__VERSION_1_0;
124*8975f5c5SAndroid Build Coastguard Worker 
125*8975f5c5SAndroid Build Coastguard Worker extern CL_API_ENTRY cl_mem CL_API_CALL
126*8975f5c5SAndroid Build Coastguard Worker clCreateFromGLBuffer(
127*8975f5c5SAndroid Build Coastguard Worker     cl_context context,
128*8975f5c5SAndroid Build Coastguard Worker     cl_mem_flags flags,
129*8975f5c5SAndroid Build Coastguard Worker     cl_GLuint bufobj,
130*8975f5c5SAndroid Build Coastguard Worker     cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_0;
131*8975f5c5SAndroid Build Coastguard Worker 
132*8975f5c5SAndroid Build Coastguard Worker #endif /* !defined(CL_NO_ICD_DISPATCH_EXTENSION_PROTOTYPES) */
133*8975f5c5SAndroid Build Coastguard Worker 
134*8975f5c5SAndroid Build Coastguard Worker #if defined(CL_VERSION_1_2)
135*8975f5c5SAndroid Build Coastguard Worker 
136*8975f5c5SAndroid Build Coastguard Worker typedef cl_mem CL_API_CALL
137*8975f5c5SAndroid Build Coastguard Worker clCreateFromGLTexture_t(
138*8975f5c5SAndroid Build Coastguard Worker     cl_context context,
139*8975f5c5SAndroid Build Coastguard Worker     cl_mem_flags flags,
140*8975f5c5SAndroid Build Coastguard Worker     cl_GLenum target,
141*8975f5c5SAndroid Build Coastguard Worker     cl_GLint miplevel,
142*8975f5c5SAndroid Build Coastguard Worker     cl_GLuint texture,
143*8975f5c5SAndroid Build Coastguard Worker     cl_int* errcode_ret);
144*8975f5c5SAndroid Build Coastguard Worker 
145*8975f5c5SAndroid Build Coastguard Worker typedef clCreateFromGLTexture_t *
146*8975f5c5SAndroid Build Coastguard Worker clCreateFromGLTexture_fn CL_API_SUFFIX__VERSION_1_2;
147*8975f5c5SAndroid Build Coastguard Worker 
148*8975f5c5SAndroid Build Coastguard Worker #if !defined(CL_NO_ICD_DISPATCH_EXTENSION_PROTOTYPES)
149*8975f5c5SAndroid Build Coastguard Worker 
150*8975f5c5SAndroid Build Coastguard Worker extern CL_API_ENTRY cl_mem CL_API_CALL
151*8975f5c5SAndroid Build Coastguard Worker clCreateFromGLTexture(
152*8975f5c5SAndroid Build Coastguard Worker     cl_context context,
153*8975f5c5SAndroid Build Coastguard Worker     cl_mem_flags flags,
154*8975f5c5SAndroid Build Coastguard Worker     cl_GLenum target,
155*8975f5c5SAndroid Build Coastguard Worker     cl_GLint miplevel,
156*8975f5c5SAndroid Build Coastguard Worker     cl_GLuint texture,
157*8975f5c5SAndroid Build Coastguard Worker     cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_2;
158*8975f5c5SAndroid Build Coastguard Worker 
159*8975f5c5SAndroid Build Coastguard Worker #endif /* !defined(CL_NO_ICD_DISPATCH_EXTENSION_PROTOTYPES) */
160*8975f5c5SAndroid Build Coastguard Worker 
161*8975f5c5SAndroid Build Coastguard Worker #endif /* defined(CL_VERSION_1_2) */
162*8975f5c5SAndroid Build Coastguard Worker 
163*8975f5c5SAndroid Build Coastguard Worker 
164*8975f5c5SAndroid Build Coastguard Worker typedef cl_mem CL_API_CALL
165*8975f5c5SAndroid Build Coastguard Worker clCreateFromGLRenderbuffer_t(
166*8975f5c5SAndroid Build Coastguard Worker     cl_context context,
167*8975f5c5SAndroid Build Coastguard Worker     cl_mem_flags flags,
168*8975f5c5SAndroid Build Coastguard Worker     cl_GLuint renderbuffer,
169*8975f5c5SAndroid Build Coastguard Worker     cl_int* errcode_ret);
170*8975f5c5SAndroid Build Coastguard Worker 
171*8975f5c5SAndroid Build Coastguard Worker typedef clCreateFromGLRenderbuffer_t *
172*8975f5c5SAndroid Build Coastguard Worker clCreateFromGLRenderbuffer_fn CL_API_SUFFIX__VERSION_1_0;
173*8975f5c5SAndroid Build Coastguard Worker 
174*8975f5c5SAndroid Build Coastguard Worker typedef cl_int CL_API_CALL
175*8975f5c5SAndroid Build Coastguard Worker clGetGLObjectInfo_t(
176*8975f5c5SAndroid Build Coastguard Worker     cl_mem memobj,
177*8975f5c5SAndroid Build Coastguard Worker     cl_gl_object_type* gl_object_type,
178*8975f5c5SAndroid Build Coastguard Worker     cl_GLuint* gl_object_name);
179*8975f5c5SAndroid Build Coastguard Worker 
180*8975f5c5SAndroid Build Coastguard Worker typedef clGetGLObjectInfo_t *
181*8975f5c5SAndroid Build Coastguard Worker clGetGLObjectInfo_fn CL_API_SUFFIX__VERSION_1_0;
182*8975f5c5SAndroid Build Coastguard Worker 
183*8975f5c5SAndroid Build Coastguard Worker typedef cl_int CL_API_CALL
184*8975f5c5SAndroid Build Coastguard Worker clGetGLTextureInfo_t(
185*8975f5c5SAndroid Build Coastguard Worker     cl_mem memobj,
186*8975f5c5SAndroid Build Coastguard Worker     cl_gl_texture_info param_name,
187*8975f5c5SAndroid Build Coastguard Worker     size_t param_value_size,
188*8975f5c5SAndroid Build Coastguard Worker     void* param_value,
189*8975f5c5SAndroid Build Coastguard Worker     size_t* param_value_size_ret);
190*8975f5c5SAndroid Build Coastguard Worker 
191*8975f5c5SAndroid Build Coastguard Worker typedef clGetGLTextureInfo_t *
192*8975f5c5SAndroid Build Coastguard Worker clGetGLTextureInfo_fn CL_API_SUFFIX__VERSION_1_0;
193*8975f5c5SAndroid Build Coastguard Worker 
194*8975f5c5SAndroid Build Coastguard Worker typedef cl_int CL_API_CALL
195*8975f5c5SAndroid Build Coastguard Worker clEnqueueAcquireGLObjects_t(
196*8975f5c5SAndroid Build Coastguard Worker     cl_command_queue command_queue,
197*8975f5c5SAndroid Build Coastguard Worker     cl_uint num_objects,
198*8975f5c5SAndroid Build Coastguard Worker     const cl_mem* mem_objects,
199*8975f5c5SAndroid Build Coastguard Worker     cl_uint num_events_in_wait_list,
200*8975f5c5SAndroid Build Coastguard Worker     const cl_event* event_wait_list,
201*8975f5c5SAndroid Build Coastguard Worker     cl_event* event);
202*8975f5c5SAndroid Build Coastguard Worker 
203*8975f5c5SAndroid Build Coastguard Worker typedef clEnqueueAcquireGLObjects_t *
204*8975f5c5SAndroid Build Coastguard Worker clEnqueueAcquireGLObjects_fn CL_API_SUFFIX__VERSION_1_0;
205*8975f5c5SAndroid Build Coastguard Worker 
206*8975f5c5SAndroid Build Coastguard Worker typedef cl_int CL_API_CALL
207*8975f5c5SAndroid Build Coastguard Worker clEnqueueReleaseGLObjects_t(
208*8975f5c5SAndroid Build Coastguard Worker     cl_command_queue command_queue,
209*8975f5c5SAndroid Build Coastguard Worker     cl_uint num_objects,
210*8975f5c5SAndroid Build Coastguard Worker     const cl_mem* mem_objects,
211*8975f5c5SAndroid Build Coastguard Worker     cl_uint num_events_in_wait_list,
212*8975f5c5SAndroid Build Coastguard Worker     const cl_event* event_wait_list,
213*8975f5c5SAndroid Build Coastguard Worker     cl_event* event);
214*8975f5c5SAndroid Build Coastguard Worker 
215*8975f5c5SAndroid Build Coastguard Worker typedef clEnqueueReleaseGLObjects_t *
216*8975f5c5SAndroid Build Coastguard Worker clEnqueueReleaseGLObjects_fn CL_API_SUFFIX__VERSION_1_0;
217*8975f5c5SAndroid Build Coastguard Worker 
218*8975f5c5SAndroid Build Coastguard Worker #if !defined(CL_NO_ICD_DISPATCH_EXTENSION_PROTOTYPES)
219*8975f5c5SAndroid Build Coastguard Worker 
220*8975f5c5SAndroid Build Coastguard Worker extern CL_API_ENTRY cl_mem CL_API_CALL
221*8975f5c5SAndroid Build Coastguard Worker clCreateFromGLRenderbuffer(
222*8975f5c5SAndroid Build Coastguard Worker     cl_context context,
223*8975f5c5SAndroid Build Coastguard Worker     cl_mem_flags flags,
224*8975f5c5SAndroid Build Coastguard Worker     cl_GLuint renderbuffer,
225*8975f5c5SAndroid Build Coastguard Worker     cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_0;
226*8975f5c5SAndroid Build Coastguard Worker 
227*8975f5c5SAndroid Build Coastguard Worker extern CL_API_ENTRY cl_int CL_API_CALL
228*8975f5c5SAndroid Build Coastguard Worker clGetGLObjectInfo(
229*8975f5c5SAndroid Build Coastguard Worker     cl_mem memobj,
230*8975f5c5SAndroid Build Coastguard Worker     cl_gl_object_type* gl_object_type,
231*8975f5c5SAndroid Build Coastguard Worker     cl_GLuint* gl_object_name) CL_API_SUFFIX__VERSION_1_0;
232*8975f5c5SAndroid Build Coastguard Worker 
233*8975f5c5SAndroid Build Coastguard Worker extern CL_API_ENTRY cl_int CL_API_CALL
234*8975f5c5SAndroid Build Coastguard Worker clGetGLTextureInfo(
235*8975f5c5SAndroid Build Coastguard Worker     cl_mem memobj,
236*8975f5c5SAndroid Build Coastguard Worker     cl_gl_texture_info param_name,
237*8975f5c5SAndroid Build Coastguard Worker     size_t param_value_size,
238*8975f5c5SAndroid Build Coastguard Worker     void* param_value,
239*8975f5c5SAndroid Build Coastguard Worker     size_t* param_value_size_ret) CL_API_SUFFIX__VERSION_1_0;
240*8975f5c5SAndroid Build Coastguard Worker 
241*8975f5c5SAndroid Build Coastguard Worker extern CL_API_ENTRY cl_int CL_API_CALL
242*8975f5c5SAndroid Build Coastguard Worker clEnqueueAcquireGLObjects(
243*8975f5c5SAndroid Build Coastguard Worker     cl_command_queue command_queue,
244*8975f5c5SAndroid Build Coastguard Worker     cl_uint num_objects,
245*8975f5c5SAndroid Build Coastguard Worker     const cl_mem* mem_objects,
246*8975f5c5SAndroid Build Coastguard Worker     cl_uint num_events_in_wait_list,
247*8975f5c5SAndroid Build Coastguard Worker     const cl_event* event_wait_list,
248*8975f5c5SAndroid Build Coastguard Worker     cl_event* event) CL_API_SUFFIX__VERSION_1_0;
249*8975f5c5SAndroid Build Coastguard Worker 
250*8975f5c5SAndroid Build Coastguard Worker extern CL_API_ENTRY cl_int CL_API_CALL
251*8975f5c5SAndroid Build Coastguard Worker clEnqueueReleaseGLObjects(
252*8975f5c5SAndroid Build Coastguard Worker     cl_command_queue command_queue,
253*8975f5c5SAndroid Build Coastguard Worker     cl_uint num_objects,
254*8975f5c5SAndroid Build Coastguard Worker     const cl_mem* mem_objects,
255*8975f5c5SAndroid Build Coastguard Worker     cl_uint num_events_in_wait_list,
256*8975f5c5SAndroid Build Coastguard Worker     const cl_event* event_wait_list,
257*8975f5c5SAndroid Build Coastguard Worker     cl_event* event) CL_API_SUFFIX__VERSION_1_0;
258*8975f5c5SAndroid Build Coastguard Worker 
259*8975f5c5SAndroid Build Coastguard Worker #endif /* !defined(CL_NO_ICD_DISPATCH_EXTENSION_PROTOTYPES) */
260*8975f5c5SAndroid Build Coastguard Worker 
261*8975f5c5SAndroid Build Coastguard Worker /* OpenCL 1.0 APIs that were deprecated in OpenCL 1.2 */
262*8975f5c5SAndroid Build Coastguard Worker 
263*8975f5c5SAndroid Build Coastguard Worker typedef cl_mem CL_API_CALL
264*8975f5c5SAndroid Build Coastguard Worker clCreateFromGLTexture2D_t(
265*8975f5c5SAndroid Build Coastguard Worker     cl_context context,
266*8975f5c5SAndroid Build Coastguard Worker     cl_mem_flags flags,
267*8975f5c5SAndroid Build Coastguard Worker     cl_GLenum target,
268*8975f5c5SAndroid Build Coastguard Worker     cl_GLint miplevel,
269*8975f5c5SAndroid Build Coastguard Worker     cl_GLuint texture,
270*8975f5c5SAndroid Build Coastguard Worker     cl_int* errcode_ret);
271*8975f5c5SAndroid Build Coastguard Worker 
272*8975f5c5SAndroid Build Coastguard Worker typedef clCreateFromGLTexture2D_t *
273*8975f5c5SAndroid Build Coastguard Worker clCreateFromGLTexture2D_fn CL_API_SUFFIX__VERSION_1_1_DEPRECATED;
274*8975f5c5SAndroid Build Coastguard Worker 
275*8975f5c5SAndroid Build Coastguard Worker typedef cl_mem CL_API_CALL
276*8975f5c5SAndroid Build Coastguard Worker clCreateFromGLTexture3D_t(
277*8975f5c5SAndroid Build Coastguard Worker     cl_context context,
278*8975f5c5SAndroid Build Coastguard Worker     cl_mem_flags flags,
279*8975f5c5SAndroid Build Coastguard Worker     cl_GLenum target,
280*8975f5c5SAndroid Build Coastguard Worker     cl_GLint miplevel,
281*8975f5c5SAndroid Build Coastguard Worker     cl_GLuint texture,
282*8975f5c5SAndroid Build Coastguard Worker     cl_int* errcode_ret);
283*8975f5c5SAndroid Build Coastguard Worker 
284*8975f5c5SAndroid Build Coastguard Worker typedef clCreateFromGLTexture3D_t *
285*8975f5c5SAndroid Build Coastguard Worker clCreateFromGLTexture3D_fn CL_API_SUFFIX__VERSION_1_1_DEPRECATED;
286*8975f5c5SAndroid Build Coastguard Worker 
287*8975f5c5SAndroid Build Coastguard Worker #if !defined(CL_NO_ICD_DISPATCH_EXTENSION_PROTOTYPES)
288*8975f5c5SAndroid Build Coastguard Worker 
289*8975f5c5SAndroid Build Coastguard Worker extern CL_API_ENTRY cl_mem CL_API_CALL
290*8975f5c5SAndroid Build Coastguard Worker clCreateFromGLTexture2D(
291*8975f5c5SAndroid Build Coastguard Worker     cl_context context,
292*8975f5c5SAndroid Build Coastguard Worker     cl_mem_flags flags,
293*8975f5c5SAndroid Build Coastguard Worker     cl_GLenum target,
294*8975f5c5SAndroid Build Coastguard Worker     cl_GLint miplevel,
295*8975f5c5SAndroid Build Coastguard Worker     cl_GLuint texture,
296*8975f5c5SAndroid Build Coastguard Worker     cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_1_DEPRECATED;
297*8975f5c5SAndroid Build Coastguard Worker 
298*8975f5c5SAndroid Build Coastguard Worker extern CL_API_ENTRY cl_mem CL_API_CALL
299*8975f5c5SAndroid Build Coastguard Worker clCreateFromGLTexture3D(
300*8975f5c5SAndroid Build Coastguard Worker     cl_context context,
301*8975f5c5SAndroid Build Coastguard Worker     cl_mem_flags flags,
302*8975f5c5SAndroid Build Coastguard Worker     cl_GLenum target,
303*8975f5c5SAndroid Build Coastguard Worker     cl_GLint miplevel,
304*8975f5c5SAndroid Build Coastguard Worker     cl_GLuint texture,
305*8975f5c5SAndroid Build Coastguard Worker     cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_1_DEPRECATED;
306*8975f5c5SAndroid Build Coastguard Worker 
307*8975f5c5SAndroid Build Coastguard Worker #endif /* !defined(CL_NO_ICD_DISPATCH_EXTENSION_PROTOTYPES) */
308*8975f5c5SAndroid Build Coastguard Worker 
309*8975f5c5SAndroid Build Coastguard Worker /***************************************************************
310*8975f5c5SAndroid Build Coastguard Worker * cl_khr_gl_event
311*8975f5c5SAndroid Build Coastguard Worker ***************************************************************/
312*8975f5c5SAndroid Build Coastguard Worker #define cl_khr_gl_event 1
313*8975f5c5SAndroid Build Coastguard Worker #define CL_KHR_GL_EVENT_EXTENSION_NAME \
314*8975f5c5SAndroid Build Coastguard Worker     "cl_khr_gl_event"
315*8975f5c5SAndroid Build Coastguard Worker 
316*8975f5c5SAndroid Build Coastguard Worker typedef struct __GLsync *   cl_GLsync;
317*8975f5c5SAndroid Build Coastguard Worker 
318*8975f5c5SAndroid Build Coastguard Worker /* cl_command_type */
319*8975f5c5SAndroid Build Coastguard Worker #define CL_COMMAND_GL_FENCE_SYNC_OBJECT_KHR                 0x200D
320*8975f5c5SAndroid Build Coastguard Worker 
321*8975f5c5SAndroid Build Coastguard Worker 
322*8975f5c5SAndroid Build Coastguard Worker typedef cl_event CL_API_CALL
323*8975f5c5SAndroid Build Coastguard Worker clCreateEventFromGLsyncKHR_t(
324*8975f5c5SAndroid Build Coastguard Worker     cl_context context,
325*8975f5c5SAndroid Build Coastguard Worker     cl_GLsync sync,
326*8975f5c5SAndroid Build Coastguard Worker     cl_int* errcode_ret);
327*8975f5c5SAndroid Build Coastguard Worker 
328*8975f5c5SAndroid Build Coastguard Worker typedef clCreateEventFromGLsyncKHR_t *
329*8975f5c5SAndroid Build Coastguard Worker clCreateEventFromGLsyncKHR_fn CL_API_SUFFIX__VERSION_1_1;
330*8975f5c5SAndroid Build Coastguard Worker 
331*8975f5c5SAndroid Build Coastguard Worker #if !defined(CL_NO_ICD_DISPATCH_EXTENSION_PROTOTYPES)
332*8975f5c5SAndroid Build Coastguard Worker 
333*8975f5c5SAndroid Build Coastguard Worker extern CL_API_ENTRY cl_event CL_API_CALL
334*8975f5c5SAndroid Build Coastguard Worker clCreateEventFromGLsyncKHR(
335*8975f5c5SAndroid Build Coastguard Worker     cl_context context,
336*8975f5c5SAndroid Build Coastguard Worker     cl_GLsync sync,
337*8975f5c5SAndroid Build Coastguard Worker     cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_1;
338*8975f5c5SAndroid Build Coastguard Worker 
339*8975f5c5SAndroid Build Coastguard Worker #endif /* !defined(CL_NO_ICD_DISPATCH_EXTENSION_PROTOTYPES) */
340*8975f5c5SAndroid Build Coastguard Worker 
341*8975f5c5SAndroid Build Coastguard Worker /***************************************************************
342*8975f5c5SAndroid Build Coastguard Worker * cl_khr_gl_depth_images
343*8975f5c5SAndroid Build Coastguard Worker ***************************************************************/
344*8975f5c5SAndroid Build Coastguard Worker #define cl_khr_gl_depth_images 1
345*8975f5c5SAndroid Build Coastguard Worker #define CL_KHR_GL_DEPTH_IMAGES_EXTENSION_NAME \
346*8975f5c5SAndroid Build Coastguard Worker     "cl_khr_gl_depth_images"
347*8975f5c5SAndroid Build Coastguard Worker 
348*8975f5c5SAndroid Build Coastguard Worker /* cl_channel_order */
349*8975f5c5SAndroid Build Coastguard Worker #define CL_DEPTH_STENCIL                                    0x10BE
350*8975f5c5SAndroid Build Coastguard Worker 
351*8975f5c5SAndroid Build Coastguard Worker /* cl_channel_type */
352*8975f5c5SAndroid Build Coastguard Worker #define CL_UNORM_INT24                                      0x10DF
353*8975f5c5SAndroid Build Coastguard Worker 
354*8975f5c5SAndroid Build Coastguard Worker /***************************************************************
355*8975f5c5SAndroid Build Coastguard Worker * cl_khr_gl_msaa_sharing
356*8975f5c5SAndroid Build Coastguard Worker ***************************************************************/
357*8975f5c5SAndroid Build Coastguard Worker #define cl_khr_gl_msaa_sharing 1
358*8975f5c5SAndroid Build Coastguard Worker #define CL_KHR_GL_MSAA_SHARING_EXTENSION_NAME \
359*8975f5c5SAndroid Build Coastguard Worker     "cl_khr_gl_msaa_sharing"
360*8975f5c5SAndroid Build Coastguard Worker 
361*8975f5c5SAndroid Build Coastguard Worker /* cl_gl_texture_info */
362*8975f5c5SAndroid Build Coastguard Worker #define CL_GL_NUM_SAMPLES                                   0x2012
363*8975f5c5SAndroid Build Coastguard Worker 
364*8975f5c5SAndroid Build Coastguard Worker /***************************************************************
365*8975f5c5SAndroid Build Coastguard Worker * cl_intel_sharing_format_query_gl
366*8975f5c5SAndroid Build Coastguard Worker ***************************************************************/
367*8975f5c5SAndroid Build Coastguard Worker #define cl_intel_sharing_format_query_gl 1
368*8975f5c5SAndroid Build Coastguard Worker #define CL_INTEL_SHARING_FORMAT_QUERY_GL_EXTENSION_NAME \
369*8975f5c5SAndroid Build Coastguard Worker     "cl_intel_sharing_format_query_gl"
370*8975f5c5SAndroid Build Coastguard Worker 
371*8975f5c5SAndroid Build Coastguard Worker /* when cl_khr_gl_sharing is supported */
372*8975f5c5SAndroid Build Coastguard Worker 
373*8975f5c5SAndroid Build Coastguard Worker typedef cl_int CL_API_CALL
374*8975f5c5SAndroid Build Coastguard Worker clGetSupportedGLTextureFormatsINTEL_t(
375*8975f5c5SAndroid Build Coastguard Worker     cl_context context,
376*8975f5c5SAndroid Build Coastguard Worker     cl_mem_flags flags,
377*8975f5c5SAndroid Build Coastguard Worker     cl_mem_object_type image_type,
378*8975f5c5SAndroid Build Coastguard Worker     cl_uint num_entries,
379*8975f5c5SAndroid Build Coastguard Worker     cl_GLenum* gl_formats,
380*8975f5c5SAndroid Build Coastguard Worker     cl_uint* num_texture_formats);
381*8975f5c5SAndroid Build Coastguard Worker 
382*8975f5c5SAndroid Build Coastguard Worker typedef clGetSupportedGLTextureFormatsINTEL_t *
383*8975f5c5SAndroid Build Coastguard Worker clGetSupportedGLTextureFormatsINTEL_fn ;
384*8975f5c5SAndroid Build Coastguard Worker 
385*8975f5c5SAndroid Build Coastguard Worker #if !defined(CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES)
386*8975f5c5SAndroid Build Coastguard Worker 
387*8975f5c5SAndroid Build Coastguard Worker extern CL_API_ENTRY cl_int CL_API_CALL
388*8975f5c5SAndroid Build Coastguard Worker clGetSupportedGLTextureFormatsINTEL(
389*8975f5c5SAndroid Build Coastguard Worker     cl_context context,
390*8975f5c5SAndroid Build Coastguard Worker     cl_mem_flags flags,
391*8975f5c5SAndroid Build Coastguard Worker     cl_mem_object_type image_type,
392*8975f5c5SAndroid Build Coastguard Worker     cl_uint num_entries,
393*8975f5c5SAndroid Build Coastguard Worker     cl_GLenum* gl_formats,
394*8975f5c5SAndroid Build Coastguard Worker     cl_uint* num_texture_formats) ;
395*8975f5c5SAndroid Build Coastguard Worker 
396*8975f5c5SAndroid Build Coastguard Worker #endif /* !defined(CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES) */
397*8975f5c5SAndroid Build Coastguard Worker 
398*8975f5c5SAndroid Build Coastguard Worker #ifdef __cplusplus
399*8975f5c5SAndroid Build Coastguard Worker }
400*8975f5c5SAndroid Build Coastguard Worker #endif
401*8975f5c5SAndroid Build Coastguard Worker 
402*8975f5c5SAndroid Build Coastguard Worker #endif /* OPENCL_CL_GL_H_ */
403