17 #ifndef __OPENCL_CL_EGL_H
18 #define __OPENCL_CL_EGL_H
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
33 #define CL_INVALID_EGL_OBJECT_KHR -1093
34 #define CL_EGL_RESOURCE_NOT_ACQUIRED_KHR -1092
37 typedef void* CLeglImageKHR;
40 typedef void* CLeglDisplayKHR;
43 typedef void* CLeglSyncKHR;
46 typedef intptr_t cl_egl_image_properties_khr;
49 #define cl_khr_egl_image 1
51 extern CL_API_ENTRY cl_mem CL_API_CALL
52 clCreateFromEGLImageKHR(cl_context context,
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;
59 typedef CL_API_ENTRY cl_mem (CL_API_CALL *clCreateFromEGLImageKHR_fn)(
61 CLeglDisplayKHR egldisplay,
62 CLeglImageKHR eglimage,
64 const cl_egl_image_properties_khr * properties,
65 cl_int * errcode_ret);
68 extern CL_API_ENTRY cl_int CL_API_CALL
69 clEnqueueAcquireEGLObjectsKHR(cl_command_queue command_queue,
71 const cl_mem * mem_objects,
72 cl_uint num_events_in_wait_list,
73 const cl_event * event_wait_list,
74 cl_event * event) CL_API_SUFFIX__VERSION_1_0;
76 typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueAcquireEGLObjectsKHR_fn)(
77 cl_command_queue command_queue,
79 const cl_mem * mem_objects,
80 cl_uint num_events_in_wait_list,
81 const cl_event * event_wait_list,
85 extern CL_API_ENTRY cl_int CL_API_CALL
86 clEnqueueReleaseEGLObjectsKHR(cl_command_queue command_queue,
88 const cl_mem * mem_objects,
89 cl_uint num_events_in_wait_list,
90 const cl_event * event_wait_list,
91 cl_event * event) CL_API_SUFFIX__VERSION_1_0;
93 typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueReleaseEGLObjectsKHR_fn)(
94 cl_command_queue command_queue,
96 const cl_mem * mem_objects,
97 cl_uint num_events_in_wait_list,
98 const cl_event * event_wait_list,
102 #define cl_khr_egl_event 1
104 extern CL_API_ENTRY cl_event CL_API_CALL
105 clCreateEventFromEGLSyncKHR(cl_context context,
107 CLeglDisplayKHR display,
108 cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_0;
110 typedef CL_API_ENTRY cl_event (CL_API_CALL *clCreateEventFromEGLSyncKHR_fn)(
113 CLeglDisplayKHR display,
114 cl_int * errcode_ret);