blob: e2db9025d481fff8bd278f1b219df305260825aa [file] [log] [blame]
Anthony Barbier6ff3b192017-09-04 18:44:23 +01001/*******************************************************************************
Viet-Hoa Do633ebd12023-08-11 12:27:59 +01002 * Copyright (c) 2008-2023 The Khronos Group Inc.
Anthony Barbier6ff3b192017-09-04 18:44:23 +01003 *
Sheri Zhang79cb9452021-09-07 14:51:49 +01004 * 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 Barbier6ff3b192017-09-04 18:44:23 +01007 *
Sheri Zhang79cb9452021-09-07 14:51:49 +01008 * http://www.apache.org/licenses/LICENSE-2.0
Anthony Barbier6ff3b192017-09-04 18:44:23 +01009 *
Sheri Zhang79cb9452021-09-07 14:51:49 +010010 * 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 Barbier6ff3b192017-09-04 18:44:23 +010015 ******************************************************************************/
16
Viet-Hoa Do633ebd12023-08-11 12:27:59 +010017#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 Barbier6ff3b192017-09-04 18:44:23 +010023
Anthony Barbier6ff3b192017-09-04 18:44:23 +010024#include <CL/cl.h>
Anthony Barbier6ff3b192017-09-04 18:44:23 +010025
Viet-Hoa Do633ebd12023-08-11 12:27:59 +010026/* 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 Barbier6ff3b192017-09-04 18:44:23 +010043#ifdef __cplusplus
44extern "C" {
45#endif
46
Viet-Hoa Do633ebd12023-08-11 12:27:59 +010047/***************************************************************
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 Barbier6ff3b192017-09-04 18:44:23 +010053
54/* Command type for events created with clEnqueueAcquireEGLObjectsKHR */
Viet-Hoa Do633ebd12023-08-11 12:27:59 +010055#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 Barbier6ff3b192017-09-04 18:44:23 +010058
59/* Error type for clCreateFromEGLImageKHR */
Viet-Hoa Do633ebd12023-08-11 12:27:59 +010060#define CL_INVALID_EGL_OBJECT_KHR -1093
61#define CL_EGL_RESOURCE_NOT_ACQUIRED_KHR -1092
Anthony Barbier6ff3b192017-09-04 18:44:23 +010062
63/* CLeglImageKHR is an opaque handle to an EGLImage */
Viet-Hoa Do633ebd12023-08-11 12:27:59 +010064typedef void* CLeglImageKHR;
Anthony Barbier6ff3b192017-09-04 18:44:23 +010065
66/* CLeglDisplayKHR is an opaque handle to an EGLDisplay */
Viet-Hoa Do633ebd12023-08-11 12:27:59 +010067typedef void* CLeglDisplayKHR;
Pablo Telloe86a09f2018-01-11 15:44:48 +000068
Anthony Barbier6ff3b192017-09-04 18:44:23 +010069/* properties passed to clCreateFromEGLImageKHR */
Viet-Hoa Do633ebd12023-08-11 12:27:59 +010070typedef intptr_t cl_egl_image_properties_khr;
Anthony Barbier6ff3b192017-09-04 18:44:23 +010071
72
Viet-Hoa Do633ebd12023-08-11 12:27:59 +010073typedef cl_mem (CL_API_CALL *
74clCreateFromEGLImageKHR_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
82typedef cl_int (CL_API_CALL *
83clEnqueueAcquireEGLObjectsKHR_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
91typedef cl_int (CL_API_CALL *
92clEnqueueReleaseEGLObjectsKHR_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 Barbier6ff3b192017-09-04 18:44:23 +0100101
102extern CL_API_ENTRY cl_mem CL_API_CALL
Viet-Hoa Do633ebd12023-08-11 12:27:59 +0100103clCreateFromEGLImageKHR(
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 Barbier6ff3b192017-09-04 18:44:23 +0100110
111extern CL_API_ENTRY cl_int CL_API_CALL
Viet-Hoa Do633ebd12023-08-11 12:27:59 +0100112clEnqueueAcquireEGLObjectsKHR(
Sheri Zhang67354e02021-06-30 16:08:29 +0100113 cl_command_queue command_queue,
Viet-Hoa Do633ebd12023-08-11 12:27:59 +0100114 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 Barbier6ff3b192017-09-04 18:44:23 +0100119
120extern CL_API_ENTRY cl_int CL_API_CALL
Viet-Hoa Do633ebd12023-08-11 12:27:59 +0100121clEnqueueReleaseEGLObjectsKHR(
Sheri Zhang67354e02021-06-30 16:08:29 +0100122 cl_command_queue command_queue,
Viet-Hoa Do633ebd12023-08-11 12:27:59 +0100123 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 Barbier6ff3b192017-09-04 18:44:23 +0100128
Viet-Hoa Do633ebd12023-08-11 12:27:59 +0100129#endif /* !defined(CL_NO_ICD_DISPATCH_EXTENSION_PROTOTYPES) */
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100130
Viet-Hoa Do633ebd12023-08-11 12:27:59 +0100131/***************************************************************
132* cl_khr_egl_event
133***************************************************************/
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100134#define cl_khr_egl_event 1
Viet-Hoa Do633ebd12023-08-11 12:27:59 +0100135#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 */
142typedef void* CLeglSyncKHR;
143
144
145typedef cl_event (CL_API_CALL *
146clCreateEventFromEGLSyncKHR_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 Barbier6ff3b192017-09-04 18:44:23 +0100153
154extern CL_API_ENTRY cl_event CL_API_CALL
Viet-Hoa Do633ebd12023-08-11 12:27:59 +0100155clCreateEventFromEGLSyncKHR(
156 cl_context context,
157 CLeglSyncKHR sync,
Sheri Zhang67354e02021-06-30 16:08:29 +0100158 CLeglDisplayKHR display,
Viet-Hoa Do633ebd12023-08-11 12:27:59 +0100159 cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_0;
160
161#endif /* !defined(CL_NO_ICD_DISPATCH_EXTENSION_PROTOTYPES) */
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100162
163#ifdef __cplusplus
164}
165#endif
166
Viet-Hoa Do633ebd12023-08-11 12:27:59 +0100167#endif /* OPENCL_CL_EGL_H_ */