cl_sys/
cl_egl_h.rs

1//! OpenGL EGL Sharing.
2
3#![allow(non_camel_case_types)]
4
5use libc::{c_void, intptr_t};
6
7// /* CLeglImageKHR is an opaque handle to an EGLImage */
8// typedef void* CLeglImageKHR;
9pub type CLeglImageKHR = *mut c_void;
10
11// /* CLeglDisplayKHR is an opaque handle to an EGLDisplay */
12// typedef void* CLeglDisplayKHR;
13pub type CLeglDisplayKHR = *mut c_void;
14
15// /* CLeglSyncKHR is an opaque handle to an EGLSync object */
16// typedef void* CLeglSyncKHR;
17pub type CLeglSyncKHR = *mut c_void;
18
19// /* properties passed to clCreateFromEGLImageKHR */
20// typedef intptr_t cl_egl_image_properties_khr;
21pub type cl_egl_image_properties_khr = intptr_t;
22
23// /*******************************************************************************
24//  * Copyright (c) 2008-2015 The Khronos Group Inc.
25//  *
26//  * Permission is hereby granted, free of charge, to any person obtaining a
27//  * copy of this software and/or associated documentation files (the
28//  * "Materials"), to deal in the Materials without restriction, including
29//  * without limitation the rights to use, copy, modify, merge, publish,
30//  * distribute, sublicense, and/or sell copies of the Materials, and to
31//  * permit persons to whom the Materials are furnished to do so, subject to
32//  * the following conditions:
33//  *
34//  * The above copyright notice and this permission notice shall be included
35//  * in all copies or substantial portions of the Materials.
36//  *
37//  * MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS
38//  * KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS
39//  * SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT
40//  *    https://www.khronos.org/registry/
41//  *
42//  * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
43//  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
44//  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
45//  * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
46//  * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
47//  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
48//  * MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
49//  ******************************************************************************/
50// #ifndef __OPENCL_CL_EGL_H
51// #define __OPENCL_CL_EGL_H
52
53// #ifdef __APPLE__
54
55// #else
56// #include <CL/cl.h>
57// #endif
58
59// #ifdef __cplusplus
60// extern "C" {
61// #endif
62
63// /* Command type for events created with clEnqueueAcquireEGLObjectsKHR */
64// #define CL_COMMAND_EGL_FENCE_SYNC_OBJECT_KHR  0x202F
65// #define CL_COMMAND_ACQUIRE_EGL_OBJECTS_KHR    0x202D
66// #define CL_COMMAND_RELEASE_EGL_OBJECTS_KHR    0x202E
67
68// /* Error type for clCreateFromEGLImageKHR */
69// #define CL_INVALID_EGL_OBJECT_KHR             -1093
70// #define CL_EGL_RESOURCE_NOT_ACQUIRED_KHR      -1092
71
72// /* CLeglImageKHR is an opaque handle to an EGLImage */
73// typedef void* CLeglImageKHR;
74
75// /* CLeglDisplayKHR is an opaque handle to an EGLDisplay */
76// typedef void* CLeglDisplayKHR;
77
78// /* CLeglSyncKHR is an opaque handle to an EGLSync object */
79// typedef void* CLeglSyncKHR;
80
81// /* properties passed to clCreateFromEGLImageKHR */
82// typedef intptr_t cl_egl_image_properties_khr;
83
84// #define cl_khr_egl_image 1
85
86// extern CL_API_ENTRY cl_mem CL_API_CALL
87// clCreateFromEGLImageKHR(cl_context                  /* context */,
88//                         CLeglDisplayKHR             /* egldisplay */,
89//                         CLeglImageKHR               /* eglimage */,
90//                         cl_mem_flags                /* flags */,
91//                         const cl_egl_image_properties_khr * /* properties */,
92//                         cl_int *                    /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0;
93
94// typedef CL_API_ENTRY cl_mem (CL_API_CALL *clCreateFromEGLImageKHR_fn)(
95// 	cl_context                  context,
96// 	CLeglDisplayKHR             egldisplay,
97// 	CLeglImageKHR               eglimage,
98// 	cl_mem_flags                flags,
99// 	const cl_egl_image_properties_khr * properties,
100// 	cl_int *                    errcode_ret);
101
102// extern CL_API_ENTRY cl_int CL_API_CALL
103// clEnqueueAcquireEGLObjectsKHR(cl_command_queue /* command_queue */,
104//                               cl_uint          /* num_objects */,
105//                               const cl_mem *   /* mem_objects */,
106//                               cl_uint          /* num_events_in_wait_list */,
107//                               const cl_event * /* event_wait_list */,
108//                               cl_event *       /* event */) CL_API_SUFFIX__VERSION_1_0;
109
110// typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueAcquireEGLObjectsKHR_fn)(
111// 	cl_command_queue command_queue,
112// 	cl_uint          num_objects,
113// 	const cl_mem *   mem_objects,
114// 	cl_uint          num_events_in_wait_list,
115// 	const cl_event * event_wait_list,
116// 	cl_event *       event);
117
118// extern CL_API_ENTRY cl_int CL_API_CALL
119// clEnqueueReleaseEGLObjectsKHR(cl_command_queue /* command_queue */,
120//                               cl_uint          /* num_objects */,
121//                               const cl_mem *   /* mem_objects */,
122//                               cl_uint          /* num_events_in_wait_list */,
123//                               const cl_event * /* event_wait_list */,
124//                               cl_event *       /* event */) CL_API_SUFFIX__VERSION_1_0;
125
126// typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueReleaseEGLObjectsKHR_fn)(
127// 	cl_command_queue command_queue,
128// 	cl_uint          num_objects,
129// 	const cl_mem *   mem_objects,
130// 	cl_uint          num_events_in_wait_list,
131// 	const cl_event * event_wait_list,
132// 	cl_event *       event);
133
134// #define cl_khr_egl_event 1
135
136// extern CL_API_ENTRY cl_event CL_API_CALL
137// clCreateEventFromEGLSyncKHR(cl_context      /* context */,
138//                             CLeglSyncKHR    /* sync */,
139//                             CLeglDisplayKHR /* display */,
140//                             cl_int *        /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0;
141
142// typedef CL_API_ENTRY cl_event (CL_API_CALL *clCreateEventFromEGLSyncKHR_fn)(
143// 	cl_context      context,
144// 	CLeglSyncKHR    sync,
145// 	CLeglDisplayKHR display,
146// 	cl_int *        errcode_ret);
147
148// #ifdef __cplusplus
149// }
150// #endif
151
152// #endif /* __OPENCL_CL_EGL_H */