Path: blob/main_old/include/CL/cl_va_api_media_sharing_intel.h
1693 views
/*******************************************************************************1* Copyright (c) 2008-2020 The Khronos Group Inc.2*3* Licensed under the Apache License, Version 2.0 (the "License");4* you may not use this file except in compliance with the License.5* You may obtain a copy of the License at6*7* http://www.apache.org/licenses/LICENSE-2.08*9* Unless required by applicable law or agreed to in writing, software10* distributed under the License is distributed on an "AS IS" BASIS,11* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.12* See the License for the specific language governing permissions and13* limitations under the License.14******************************************************************************/1516#ifndef __OPENCL_CL_VA_API_MEDIA_SHARING_INTEL_H17#define __OPENCL_CL_VA_API_MEDIA_SHARING_INTEL_H1819#include <CL/cl.h>20#include <CL/cl_platform.h>21#include <va/va.h>2223#ifdef __cplusplus24extern "C" {25#endif2627/******************************************28* cl_intel_va_api_media_sharing extension *29*******************************************/3031#define cl_intel_va_api_media_sharing 13233/* error codes */34#define CL_INVALID_VA_API_MEDIA_ADAPTER_INTEL -109835#define CL_INVALID_VA_API_MEDIA_SURFACE_INTEL -109936#define CL_VA_API_MEDIA_SURFACE_ALREADY_ACQUIRED_INTEL -110037#define CL_VA_API_MEDIA_SURFACE_NOT_ACQUIRED_INTEL -11013839/* cl_va_api_device_source_intel */40#define CL_VA_API_DISPLAY_INTEL 0x40944142/* cl_va_api_device_set_intel */43#define CL_PREFERRED_DEVICES_FOR_VA_API_INTEL 0x409544#define CL_ALL_DEVICES_FOR_VA_API_INTEL 0x40964546/* cl_context_info */47#define CL_CONTEXT_VA_API_DISPLAY_INTEL 0x40974849/* cl_mem_info */50#define CL_MEM_VA_API_MEDIA_SURFACE_INTEL 0x40985152/* cl_image_info */53#define CL_IMAGE_VA_API_PLANE_INTEL 0x40995455/* cl_command_type */56#define CL_COMMAND_ACQUIRE_VA_API_MEDIA_SURFACES_INTEL 0x409A57#define CL_COMMAND_RELEASE_VA_API_MEDIA_SURFACES_INTEL 0x409B5859typedef cl_uint cl_va_api_device_source_intel;60typedef cl_uint cl_va_api_device_set_intel;6162extern CL_API_ENTRY cl_int CL_API_CALL63clGetDeviceIDsFromVA_APIMediaAdapterINTEL(64cl_platform_id platform,65cl_va_api_device_source_intel media_adapter_type,66void* media_adapter,67cl_va_api_device_set_intel media_adapter_set,68cl_uint num_entries,69cl_device_id* devices,70cl_uint* num_devices) CL_API_SUFFIX__VERSION_1_2;7172typedef cl_int (CL_API_CALL * clGetDeviceIDsFromVA_APIMediaAdapterINTEL_fn)(73cl_platform_id platform,74cl_va_api_device_source_intel media_adapter_type,75void* media_adapter,76cl_va_api_device_set_intel media_adapter_set,77cl_uint num_entries,78cl_device_id* devices,79cl_uint* num_devices) CL_API_SUFFIX__VERSION_1_2;8081extern CL_API_ENTRY cl_mem CL_API_CALL82clCreateFromVA_APIMediaSurfaceINTEL(83cl_context context,84cl_mem_flags flags,85VASurfaceID* surface,86cl_uint plane,87cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_2;8889typedef cl_mem (CL_API_CALL * clCreateFromVA_APIMediaSurfaceINTEL_fn)(90cl_context context,91cl_mem_flags flags,92VASurfaceID* surface,93cl_uint plane,94cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_2;9596extern CL_API_ENTRY cl_int CL_API_CALL97clEnqueueAcquireVA_APIMediaSurfacesINTEL(98cl_command_queue command_queue,99cl_uint num_objects,100const cl_mem* mem_objects,101cl_uint num_events_in_wait_list,102const cl_event* event_wait_list,103cl_event* event) CL_API_SUFFIX__VERSION_1_2;104105typedef cl_int (CL_API_CALL *clEnqueueAcquireVA_APIMediaSurfacesINTEL_fn)(106cl_command_queue command_queue,107cl_uint num_objects,108const cl_mem* mem_objects,109cl_uint num_events_in_wait_list,110const cl_event* event_wait_list,111cl_event* event) CL_API_SUFFIX__VERSION_1_2;112113extern CL_API_ENTRY cl_int CL_API_CALL114clEnqueueReleaseVA_APIMediaSurfacesINTEL(115cl_command_queue command_queue,116cl_uint num_objects,117const cl_mem* mem_objects,118cl_uint num_events_in_wait_list,119const cl_event* event_wait_list,120cl_event* event) CL_API_SUFFIX__VERSION_1_2;121122typedef cl_int (CL_API_CALL *clEnqueueReleaseVA_APIMediaSurfacesINTEL_fn)(123cl_command_queue command_queue,124cl_uint num_objects,125const cl_mem* mem_objects,126cl_uint num_events_in_wait_list,127const cl_event* event_wait_list,128cl_event* event) CL_API_SUFFIX__VERSION_1_2;129130#ifdef __cplusplus131}132#endif133134#endif /* __OPENCL_CL_VA_API_MEDIA_SHARING_INTEL_H */135136137138