HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
cl_egl.h
Go to the documentation of this file.
1 /*******************************************************************************
2  * Copyright (c) 2008-2020 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_EGL_H
18 #define __OPENCL_CL_EGL_H
19 
20 #include <CL/cl.h>
21 
22 #ifdef __cplusplus
23 extern "C" {
24 #endif
25 
26 
27 /* Command type for events created with clEnqueueAcquireEGLObjectsKHR */
28 #define CL_COMMAND_EGL_FENCE_SYNC_OBJECT_KHR 0x202F
29 #define CL_COMMAND_ACQUIRE_EGL_OBJECTS_KHR 0x202D
30 #define CL_COMMAND_RELEASE_EGL_OBJECTS_KHR 0x202E
31 
32 /* Error type for clCreateFromEGLImageKHR */
33 #define CL_INVALID_EGL_OBJECT_KHR -1093
34 #define CL_EGL_RESOURCE_NOT_ACQUIRED_KHR -1092
35 
36 /* CLeglImageKHR is an opaque handle to an EGLImage */
37 typedef void* CLeglImageKHR;
38 
39 /* CLeglDisplayKHR is an opaque handle to an EGLDisplay */
40 typedef void* CLeglDisplayKHR;
41 
42 /* CLeglSyncKHR is an opaque handle to an EGLSync object */
43 typedef void* CLeglSyncKHR;
44 
45 /* properties passed to clCreateFromEGLImageKHR */
46 typedef intptr_t cl_egl_image_properties_khr;
47 
48 
49 #define cl_khr_egl_image 1
50 
53  CLeglDisplayKHR egldisplay,
54  CLeglImageKHR eglimage,
56  const cl_egl_image_properties_khr * properties,
57  cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_0;
58 
60  cl_context context,
61  CLeglDisplayKHR egldisplay,
62  CLeglImageKHR eglimage,
64  const cl_egl_image_properties_khr * properties,
65  cl_int * errcode_ret);
66 
67 
70  cl_uint num_objects,
71  const cl_mem * mem_objects,
72  cl_uint num_events_in_wait_list,
73  const cl_event * event_wait_list,
75 
77  cl_command_queue command_queue,
78  cl_uint num_objects,
79  const cl_mem * mem_objects,
80  cl_uint num_events_in_wait_list,
81  const cl_event * event_wait_list,
82  cl_event * event);
83 
84 
87  cl_uint num_objects,
88  const cl_mem * mem_objects,
89  cl_uint num_events_in_wait_list,
90  const cl_event * event_wait_list,
92 
94  cl_command_queue command_queue,
95  cl_uint num_objects,
96  const cl_mem * mem_objects,
97  cl_uint num_events_in_wait_list,
98  const cl_event * event_wait_list,
99  cl_event * event);
100 
101 
102 #define cl_khr_egl_event 1
103 
106  CLeglSyncKHR sync,
107  CLeglDisplayKHR display,
108  cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_0;
109 
111  cl_context context,
112  CLeglSyncKHR sync,
113  CLeglDisplayKHR display,
114  cl_int * errcode_ret);
115 
116 #ifdef __cplusplus
117 }
118 #endif
119 
120 #endif /* __OPENCL_CL_EGL_H */
uint32_t cl_uint
Definition: cl_platform.h:261
CL_API_ENTRY cl_int CL_API_CALL clEnqueueAcquireEGLObjectsKHR(cl_command_queue command_queue, cl_uint num_objects, const cl_mem *mem_objects, cl_uint num_events_in_wait_list, const cl_event *event_wait_list, cl_event *event) CL_API_SUFFIX__VERSION_1_0
cl_mem(CL_API_CALL * clCreateFromEGLImageKHR_fn)(cl_context context, CLeglDisplayKHR egldisplay, CLeglImageKHR eglimage, cl_mem_flags flags, const cl_egl_image_properties_khr *properties, cl_int *errcode_ret)
Definition: cl_egl.h:59
GLbitfield flags
Definition: glcorearb.h:1596
struct _cl_context * cl_context
Definition: cl.h:31
CL_API_ENTRY cl_mem CL_API_CALL clCreateFromEGLImageKHR(cl_context context, CLeglDisplayKHR egldisplay, CLeglImageKHR eglimage, cl_mem_flags flags, const cl_egl_image_properties_khr *properties, cl_int *errcode_ret) CL_API_SUFFIX__VERSION_1_0
void * CLeglImageKHR
Definition: cl_egl.h:37
int32_t cl_int
Definition: cl_platform.h:260
cl_int(CL_API_CALL * clEnqueueAcquireEGLObjectsKHR_fn)(cl_command_queue command_queue, cl_uint num_objects, const cl_mem *mem_objects, cl_uint num_events_in_wait_list, const cl_event *event_wait_list, cl_event *event)
Definition: cl_egl.h:76
void * CLeglDisplayKHR
Definition: cl_egl.h:40
CL_API_ENTRY cl_event CL_API_CALL clCreateEventFromEGLSyncKHR(cl_context context, CLeglSyncKHR sync, CLeglDisplayKHR display, cl_int *errcode_ret) CL_API_SUFFIX__VERSION_1_0
struct _cl_event * event
Definition: glcorearb.h:2961
#define CL_API_ENTRY
Definition: cl_platform.h:38
cl_int(CL_API_CALL * clEnqueueReleaseEGLObjectsKHR_fn)(cl_command_queue command_queue, cl_uint num_objects, const cl_mem *mem_objects, cl_uint num_events_in_wait_list, const cl_event *event_wait_list, cl_event *event)
Definition: cl_egl.h:93
struct _cl_mem * cl_mem
Definition: cl.h:33
cl_event(CL_API_CALL * clCreateEventFromEGLSyncKHR_fn)(cl_context context, CLeglSyncKHR sync, CLeglDisplayKHR display, cl_int *errcode_ret)
Definition: cl_egl.h:110
CL_API_ENTRY cl_int CL_API_CALL clEnqueueReleaseEGLObjectsKHR(cl_command_queue command_queue, cl_uint num_objects, const cl_mem *mem_objects, cl_uint num_events_in_wait_list, const cl_event *event_wait_list, cl_event *event) CL_API_SUFFIX__VERSION_1_0
struct _cl_event * cl_event
Definition: cl.h:36
struct _cl_command_queue * cl_command_queue
Definition: cl.h:32
void * CLeglSyncKHR
Definition: cl_egl.h:43
#define CL_API_SUFFIX__VERSION_1_0
Definition: cl_platform.h:67
#define CL_API_CALL
Definition: cl_platform.h:41
intptr_t cl_egl_image_properties_khr
Definition: cl_egl.h:46
cl_bitfield cl_mem_flags
Definition: cl.h:66