Path: blob/master/3rdparty/include/opencl/1.2/CL/cl_egl.h
16348 views
/*******************************************************************************1* Copyright (c) 2008-2010 The Khronos Group Inc.2*3* Permission is hereby granted, free of charge, to any person obtaining a4* copy of this software and/or associated documentation files (the5* "Materials"), to deal in the Materials without restriction, including6* without limitation the rights to use, copy, modify, merge, publish,7* distribute, sublicense, and/or sell copies of the Materials, and to8* permit persons to whom the Materials are furnished to do so, subject to9* the following conditions:10*11* The above copyright notice and this permission notice shall be included12* in all copies or substantial portions of the Materials.13*14* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,15* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF16* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.17* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY18* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,19* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE20* MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.21******************************************************************************/2223#ifndef __OPENCL_CL_EGL_H24#define __OPENCL_CL_EGL_H2526#ifdef __APPLE__2728#else29#include <CL/cl.h>30#include <EGL/egl.h>31#include <EGL/eglext.h>32#endif3334#ifdef __cplusplus35extern "C" {36#endif373839/* Command type for events created with clEnqueueAcquireEGLObjectsKHR */40#define CL_COMMAND_EGL_FENCE_SYNC_OBJECT_KHR 0x202F41#define CL_COMMAND_ACQUIRE_EGL_OBJECTS_KHR 0x202D42#define CL_COMMAND_RELEASE_EGL_OBJECTS_KHR 0x202E4344/* Error type for clCreateFromEGLImageKHR */45#define CL_INVALID_EGL_OBJECT_KHR -109346#define CL_EGL_RESOURCE_NOT_ACQUIRED_KHR -10924748/* CLeglImageKHR is an opaque handle to an EGLImage */49typedef void* CLeglImageKHR;5051/* CLeglDisplayKHR is an opaque handle to an EGLDisplay */52typedef void* CLeglDisplayKHR;5354/* properties passed to clCreateFromEGLImageKHR */55typedef intptr_t cl_egl_image_properties_khr;565758#define cl_khr_egl_image 15960extern CL_API_ENTRY cl_mem CL_API_CALL61clCreateFromEGLImageKHR(cl_context /* context */,62CLeglDisplayKHR /* egldisplay */,63CLeglImageKHR /* eglimage */,64cl_mem_flags /* flags */,65const cl_egl_image_properties_khr * /* properties */,66cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0;6768typedef CL_API_ENTRY cl_mem (CL_API_CALL *clCreateFromEGLImageKHR_fn)(69cl_context context,70CLeglDisplayKHR egldisplay,71CLeglImageKHR eglimage,72cl_mem_flags flags,73const cl_egl_image_properties_khr * properties,74cl_int * errcode_ret);757677extern CL_API_ENTRY cl_int CL_API_CALL78clEnqueueAcquireEGLObjectsKHR(cl_command_queue /* command_queue */,79cl_uint /* num_objects */,80const cl_mem * /* mem_objects */,81cl_uint /* num_events_in_wait_list */,82const cl_event * /* event_wait_list */,83cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0;8485typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueAcquireEGLObjectsKHR_fn)(86cl_command_queue command_queue,87cl_uint num_objects,88const cl_mem * mem_objects,89cl_uint num_events_in_wait_list,90const cl_event * event_wait_list,91cl_event * event);929394extern CL_API_ENTRY cl_int CL_API_CALL95clEnqueueReleaseEGLObjectsKHR(cl_command_queue /* command_queue */,96cl_uint /* num_objects */,97const cl_mem * /* mem_objects */,98cl_uint /* num_events_in_wait_list */,99const cl_event * /* event_wait_list */,100cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0;101102typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueReleaseEGLObjectsKHR_fn)(103cl_command_queue command_queue,104cl_uint num_objects,105const cl_mem * mem_objects,106cl_uint num_events_in_wait_list,107const cl_event * event_wait_list,108cl_event * event);109110111#define cl_khr_egl_event 1112113extern CL_API_ENTRY cl_event CL_API_CALL114clCreateEventFromEGLSyncKHR(cl_context /* context */,115EGLSyncKHR /* sync */,116EGLDisplay /* display */,117cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0;118119typedef CL_API_ENTRY cl_event (CL_API_CALL *clCreateEventFromEGLSyncKHR_fn)(120cl_context context,121EGLSyncKHR sync,122EGLDisplay display,123cl_int * errcode_ret);124125126#ifdef __cplusplus127}128#endif129130#endif /* __OPENCL_CL_EGL_H */131132133