Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 1 | /******************************************************************************* |
Viet-Hoa Do | 633ebd1 | 2023-08-11 12:27:59 +0100 | [diff] [blame] | 2 | * Copyright (c) 2008-2023 The Khronos Group Inc. |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 3 | * |
Sheri Zhang | 79cb945 | 2021-09-07 14:51:49 +0100 | [diff] [blame] | 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 |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 7 | * |
Sheri Zhang | 79cb945 | 2021-09-07 14:51:49 +0100 | [diff] [blame] | 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 9 | * |
Sheri Zhang | 79cb945 | 2021-09-07 14:51:49 +0100 | [diff] [blame] | 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. |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 15 | ******************************************************************************/ |
| 16 | |
Viet-Hoa Do | 633ebd1 | 2023-08-11 12:27:59 +0100 | [diff] [blame] | 17 | #ifndef OPENCL_CL_EGL_H_ |
| 18 | #define OPENCL_CL_EGL_H_ |
| 19 | |
| 20 | /* |
| 21 | ** This header is generated from the Khronos OpenCL XML API Registry. |
| 22 | */ |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 23 | |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 24 | #include <CL/cl.h> |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 25 | |
Viet-Hoa Do | 633ebd1 | 2023-08-11 12:27:59 +0100 | [diff] [blame] | 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 | |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 43 | #ifdef __cplusplus |
| 44 | extern "C" { |
| 45 | #endif |
| 46 | |
Viet-Hoa Do | 633ebd1 | 2023-08-11 12:27:59 +0100 | [diff] [blame] | 47 | /*************************************************************** |
| 48 | * cl_khr_egl_image |
| 49 | ***************************************************************/ |
| 50 | #define cl_khr_egl_image 1 |
| 51 | #define CL_KHR_EGL_IMAGE_EXTENSION_NAME \ |
| 52 | "cl_khr_egl_image" |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 53 | |
| 54 | /* Command type for events created with clEnqueueAcquireEGLObjectsKHR */ |
Viet-Hoa Do | 633ebd1 | 2023-08-11 12:27:59 +0100 | [diff] [blame] | 55 | #define CL_COMMAND_EGL_FENCE_SYNC_OBJECT_KHR 0x202F |
| 56 | #define CL_COMMAND_ACQUIRE_EGL_OBJECTS_KHR 0x202D |
| 57 | #define CL_COMMAND_RELEASE_EGL_OBJECTS_KHR 0x202E |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 58 | |
| 59 | /* Error type for clCreateFromEGLImageKHR */ |
Viet-Hoa Do | 633ebd1 | 2023-08-11 12:27:59 +0100 | [diff] [blame] | 60 | #define CL_INVALID_EGL_OBJECT_KHR -1093 |
| 61 | #define CL_EGL_RESOURCE_NOT_ACQUIRED_KHR -1092 |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 62 | |
| 63 | /* CLeglImageKHR is an opaque handle to an EGLImage */ |
Viet-Hoa Do | 633ebd1 | 2023-08-11 12:27:59 +0100 | [diff] [blame] | 64 | typedef void* CLeglImageKHR; |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 65 | |
| 66 | /* CLeglDisplayKHR is an opaque handle to an EGLDisplay */ |
Viet-Hoa Do | 633ebd1 | 2023-08-11 12:27:59 +0100 | [diff] [blame] | 67 | typedef void* CLeglDisplayKHR; |
Pablo Tello | e86a09f | 2018-01-11 15:44:48 +0000 | [diff] [blame] | 68 | |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 69 | /* properties passed to clCreateFromEGLImageKHR */ |
Viet-Hoa Do | 633ebd1 | 2023-08-11 12:27:59 +0100 | [diff] [blame] | 70 | typedef intptr_t cl_egl_image_properties_khr; |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 71 | |
| 72 | |
Viet-Hoa Do | 633ebd1 | 2023-08-11 12:27:59 +0100 | [diff] [blame] | 73 | typedef cl_mem (CL_API_CALL * |
| 74 | clCreateFromEGLImageKHR_fn)( |
| 75 | cl_context context, |
| 76 | CLeglDisplayKHR egldisplay, |
| 77 | CLeglImageKHR eglimage, |
| 78 | cl_mem_flags flags, |
| 79 | const cl_egl_image_properties_khr* properties, |
| 80 | cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_0; |
| 81 | |
| 82 | typedef cl_int (CL_API_CALL * |
| 83 | clEnqueueAcquireEGLObjectsKHR_fn)( |
| 84 | cl_command_queue command_queue, |
| 85 | cl_uint num_objects, |
| 86 | const cl_mem* mem_objects, |
| 87 | cl_uint num_events_in_wait_list, |
| 88 | const cl_event* event_wait_list, |
| 89 | cl_event* event) CL_API_SUFFIX__VERSION_1_0; |
| 90 | |
| 91 | typedef cl_int (CL_API_CALL * |
| 92 | clEnqueueReleaseEGLObjectsKHR_fn)( |
| 93 | cl_command_queue command_queue, |
| 94 | cl_uint num_objects, |
| 95 | const cl_mem* mem_objects, |
| 96 | cl_uint num_events_in_wait_list, |
| 97 | const cl_event* event_wait_list, |
| 98 | cl_event* event) CL_API_SUFFIX__VERSION_1_0; |
| 99 | |
| 100 | #if !defined(CL_NO_ICD_DISPATCH_EXTENSION_PROTOTYPES) |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 101 | |
| 102 | extern CL_API_ENTRY cl_mem CL_API_CALL |
Viet-Hoa Do | 633ebd1 | 2023-08-11 12:27:59 +0100 | [diff] [blame] | 103 | clCreateFromEGLImageKHR( |
| 104 | cl_context context, |
| 105 | CLeglDisplayKHR egldisplay, |
| 106 | CLeglImageKHR eglimage, |
| 107 | cl_mem_flags flags, |
| 108 | const cl_egl_image_properties_khr* properties, |
| 109 | cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_0; |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 110 | |
| 111 | extern CL_API_ENTRY cl_int CL_API_CALL |
Viet-Hoa Do | 633ebd1 | 2023-08-11 12:27:59 +0100 | [diff] [blame] | 112 | clEnqueueAcquireEGLObjectsKHR( |
Sheri Zhang | 67354e0 | 2021-06-30 16:08:29 +0100 | [diff] [blame] | 113 | cl_command_queue command_queue, |
Viet-Hoa Do | 633ebd1 | 2023-08-11 12:27:59 +0100 | [diff] [blame] | 114 | cl_uint num_objects, |
| 115 | const cl_mem* mem_objects, |
| 116 | cl_uint num_events_in_wait_list, |
| 117 | const cl_event* event_wait_list, |
| 118 | cl_event* event) CL_API_SUFFIX__VERSION_1_0; |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 119 | |
| 120 | extern CL_API_ENTRY cl_int CL_API_CALL |
Viet-Hoa Do | 633ebd1 | 2023-08-11 12:27:59 +0100 | [diff] [blame] | 121 | clEnqueueReleaseEGLObjectsKHR( |
Sheri Zhang | 67354e0 | 2021-06-30 16:08:29 +0100 | [diff] [blame] | 122 | cl_command_queue command_queue, |
Viet-Hoa Do | 633ebd1 | 2023-08-11 12:27:59 +0100 | [diff] [blame] | 123 | cl_uint num_objects, |
| 124 | const cl_mem* mem_objects, |
| 125 | cl_uint num_events_in_wait_list, |
| 126 | const cl_event* event_wait_list, |
| 127 | cl_event* event) CL_API_SUFFIX__VERSION_1_0; |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 128 | |
Viet-Hoa Do | 633ebd1 | 2023-08-11 12:27:59 +0100 | [diff] [blame] | 129 | #endif /* !defined(CL_NO_ICD_DISPATCH_EXTENSION_PROTOTYPES) */ |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 130 | |
Viet-Hoa Do | 633ebd1 | 2023-08-11 12:27:59 +0100 | [diff] [blame] | 131 | /*************************************************************** |
| 132 | * cl_khr_egl_event |
| 133 | ***************************************************************/ |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 134 | #define cl_khr_egl_event 1 |
Viet-Hoa Do | 633ebd1 | 2023-08-11 12:27:59 +0100 | [diff] [blame] | 135 | #define CL_KHR_EGL_EVENT_EXTENSION_NAME \ |
| 136 | "cl_khr_egl_event" |
| 137 | |
| 138 | /* CLeglDisplayKHR is an opaque handle to an EGLDisplay */ |
| 139 | /* type CLeglDisplayKHR */ |
| 140 | |
| 141 | /* CLeglSyncKHR is an opaque handle to an EGLSync object */ |
| 142 | typedef void* CLeglSyncKHR; |
| 143 | |
| 144 | |
| 145 | typedef cl_event (CL_API_CALL * |
| 146 | clCreateEventFromEGLSyncKHR_fn)( |
| 147 | cl_context context, |
| 148 | CLeglSyncKHR sync, |
| 149 | CLeglDisplayKHR display, |
| 150 | cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_0; |
| 151 | |
| 152 | #if !defined(CL_NO_ICD_DISPATCH_EXTENSION_PROTOTYPES) |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 153 | |
| 154 | extern CL_API_ENTRY cl_event CL_API_CALL |
Viet-Hoa Do | 633ebd1 | 2023-08-11 12:27:59 +0100 | [diff] [blame] | 155 | clCreateEventFromEGLSyncKHR( |
| 156 | cl_context context, |
| 157 | CLeglSyncKHR sync, |
Sheri Zhang | 67354e0 | 2021-06-30 16:08:29 +0100 | [diff] [blame] | 158 | CLeglDisplayKHR display, |
Viet-Hoa Do | 633ebd1 | 2023-08-11 12:27:59 +0100 | [diff] [blame] | 159 | cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_0; |
| 160 | |
| 161 | #endif /* !defined(CL_NO_ICD_DISPATCH_EXTENSION_PROTOTYPES) */ |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 162 | |
| 163 | #ifdef __cplusplus |
| 164 | } |
| 165 | #endif |
| 166 | |
Viet-Hoa Do | 633ebd1 | 2023-08-11 12:27:59 +0100 | [diff] [blame] | 167 | #endif /* OPENCL_CL_EGL_H_ */ |