Path: blob/21.2-virgl/include/CL/cl_va_api_media_sharing_intel.h
4550 views
/**********************************************************************************1* Copyright (c) 2008-2019 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* MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS15* KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS16* SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT17* https://www.khronos.org/registry/18*19* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,20* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF21* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.22* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY23* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,24* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE25* MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.26**********************************************************************************/27/*****************************************************************************\2829Copyright (c) 2013-2019 Intel Corporation All Rights Reserved.3031THESE MATERIALS ARE PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS32"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT33LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR34A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS35CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,36EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,37PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR38PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY39OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING40NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THESE41MATERIALS, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.4243File Name: cl_va_api_media_sharing_intel.h4445Abstract:4647Notes:4849\*****************************************************************************/505152#ifndef __OPENCL_CL_VA_API_MEDIA_SHARING_INTEL_H53#define __OPENCL_CL_VA_API_MEDIA_SHARING_INTEL_H5455#include <CL/cl.h>56#include <CL/cl_platform.h>57#include <va/va.h>5859#ifdef __cplusplus60extern "C" {61#endif6263/******************************************64* cl_intel_va_api_media_sharing extension *65*******************************************/6667#define cl_intel_va_api_media_sharing 16869/* error codes */70#define CL_INVALID_VA_API_MEDIA_ADAPTER_INTEL -109871#define CL_INVALID_VA_API_MEDIA_SURFACE_INTEL -109972#define CL_VA_API_MEDIA_SURFACE_ALREADY_ACQUIRED_INTEL -110073#define CL_VA_API_MEDIA_SURFACE_NOT_ACQUIRED_INTEL -11017475/* cl_va_api_device_source_intel */76#define CL_VA_API_DISPLAY_INTEL 0x40947778/* cl_va_api_device_set_intel */79#define CL_PREFERRED_DEVICES_FOR_VA_API_INTEL 0x409580#define CL_ALL_DEVICES_FOR_VA_API_INTEL 0x40968182/* cl_context_info */83#define CL_CONTEXT_VA_API_DISPLAY_INTEL 0x40978485/* cl_mem_info */86#define CL_MEM_VA_API_MEDIA_SURFACE_INTEL 0x40988788/* cl_image_info */89#define CL_IMAGE_VA_API_PLANE_INTEL 0x40999091/* cl_command_type */92#define CL_COMMAND_ACQUIRE_VA_API_MEDIA_SURFACES_INTEL 0x409A93#define CL_COMMAND_RELEASE_VA_API_MEDIA_SURFACES_INTEL 0x409B9495typedef cl_uint cl_va_api_device_source_intel;96typedef cl_uint cl_va_api_device_set_intel;9798extern CL_API_ENTRY cl_int CL_API_CALL99clGetDeviceIDsFromVA_APIMediaAdapterINTEL(100cl_platform_id platform,101cl_va_api_device_source_intel media_adapter_type,102void* media_adapter,103cl_va_api_device_set_intel media_adapter_set,104cl_uint num_entries,105cl_device_id* devices,106cl_uint* num_devices) CL_EXT_SUFFIX__VERSION_1_2;107108typedef CL_API_ENTRY cl_int (CL_API_CALL * clGetDeviceIDsFromVA_APIMediaAdapterINTEL_fn)(109cl_platform_id platform,110cl_va_api_device_source_intel media_adapter_type,111void* media_adapter,112cl_va_api_device_set_intel media_adapter_set,113cl_uint num_entries,114cl_device_id* devices,115cl_uint* num_devices) CL_EXT_SUFFIX__VERSION_1_2;116117extern CL_API_ENTRY cl_mem CL_API_CALL118clCreateFromVA_APIMediaSurfaceINTEL(119cl_context context,120cl_mem_flags flags,121VASurfaceID* surface,122cl_uint plane,123cl_int* errcode_ret) CL_EXT_SUFFIX__VERSION_1_2;124125typedef CL_API_ENTRY cl_mem (CL_API_CALL * clCreateFromVA_APIMediaSurfaceINTEL_fn)(126cl_context context,127cl_mem_flags flags,128VASurfaceID* surface,129cl_uint plane,130cl_int* errcode_ret) CL_EXT_SUFFIX__VERSION_1_2;131132extern CL_API_ENTRY cl_int CL_API_CALL133clEnqueueAcquireVA_APIMediaSurfacesINTEL(134cl_command_queue command_queue,135cl_uint num_objects,136const cl_mem* mem_objects,137cl_uint num_events_in_wait_list,138const cl_event* event_wait_list,139cl_event* event) CL_EXT_SUFFIX__VERSION_1_2;140141typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueAcquireVA_APIMediaSurfacesINTEL_fn)(142cl_command_queue command_queue,143cl_uint num_objects,144const cl_mem* mem_objects,145cl_uint num_events_in_wait_list,146const cl_event* event_wait_list,147cl_event* event) CL_EXT_SUFFIX__VERSION_1_2;148149extern CL_API_ENTRY cl_int CL_API_CALL150clEnqueueReleaseVA_APIMediaSurfacesINTEL(151cl_command_queue command_queue,152cl_uint num_objects,153const cl_mem* mem_objects,154cl_uint num_events_in_wait_list,155const cl_event* event_wait_list,156cl_event* event) CL_EXT_SUFFIX__VERSION_1_2;157158typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueReleaseVA_APIMediaSurfacesINTEL_fn)(159cl_command_queue command_queue,160cl_uint num_objects,161const cl_mem* mem_objects,162cl_uint num_events_in_wait_list,163const cl_event* event_wait_list,164cl_event* event) CL_EXT_SUFFIX__VERSION_1_2;165166#ifdef __cplusplus167}168#endif169170#endif /* __OPENCL_CL_VA_API_MEDIA_SHARING_INTEL_H */171172173174