Path: blob/21.2-virgl/include/CL/cl_dx9_media_sharing_intel.h
4547 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_dx9_media_sharing_intel.h4445Abstract:4647Notes:4849\*****************************************************************************/5051#ifndef __OPENCL_CL_DX9_MEDIA_SHARING_INTEL_H52#define __OPENCL_CL_DX9_MEDIA_SHARING_INTEL_H5354#include <CL/cl.h>55#include <CL/cl_platform.h>56#include <d3d9.h>57#include <dxvahd.h>58#include <wtypes.h>59#include <d3d9types.h>6061#ifdef __cplusplus62extern "C" {63#endif6465/***************************************66* cl_intel_dx9_media_sharing extension *67****************************************/6869#define cl_intel_dx9_media_sharing 17071typedef cl_uint cl_dx9_device_source_intel;72typedef cl_uint cl_dx9_device_set_intel;7374/* error codes */75#define CL_INVALID_DX9_DEVICE_INTEL -101076#define CL_INVALID_DX9_RESOURCE_INTEL -101177#define CL_DX9_RESOURCE_ALREADY_ACQUIRED_INTEL -101278#define CL_DX9_RESOURCE_NOT_ACQUIRED_INTEL -10137980/* cl_dx9_device_source_intel */81#define CL_D3D9_DEVICE_INTEL 0x402282#define CL_D3D9EX_DEVICE_INTEL 0x407083#define CL_DXVA_DEVICE_INTEL 0x40718485/* cl_dx9_device_set_intel */86#define CL_PREFERRED_DEVICES_FOR_DX9_INTEL 0x402487#define CL_ALL_DEVICES_FOR_DX9_INTEL 0x40258889/* cl_context_info */90#define CL_CONTEXT_D3D9_DEVICE_INTEL 0x402691#define CL_CONTEXT_D3D9EX_DEVICE_INTEL 0x407292#define CL_CONTEXT_DXVA_DEVICE_INTEL 0x40739394/* cl_mem_info */95#define CL_MEM_DX9_RESOURCE_INTEL 0x402796#define CL_MEM_DX9_SHARED_HANDLE_INTEL 0x40749798/* cl_image_info */99#define CL_IMAGE_DX9_PLANE_INTEL 0x4075100101/* cl_command_type */102#define CL_COMMAND_ACQUIRE_DX9_OBJECTS_INTEL 0x402A103#define CL_COMMAND_RELEASE_DX9_OBJECTS_INTEL 0x402B104/******************************************************************************/105106extern CL_API_ENTRY cl_int CL_API_CALL107clGetDeviceIDsFromDX9INTEL(108cl_platform_id platform,109cl_dx9_device_source_intel dx9_device_source,110void* dx9_object,111cl_dx9_device_set_intel dx9_device_set,112cl_uint num_entries,113cl_device_id* devices,114cl_uint* num_devices) CL_EXT_SUFFIX__VERSION_1_1;115116typedef CL_API_ENTRY cl_int (CL_API_CALL* clGetDeviceIDsFromDX9INTEL_fn)(117cl_platform_id platform,118cl_dx9_device_source_intel dx9_device_source,119void* dx9_object,120cl_dx9_device_set_intel dx9_device_set,121cl_uint num_entries,122cl_device_id* devices,123cl_uint* num_devices) CL_EXT_SUFFIX__VERSION_1_1;124125extern CL_API_ENTRY cl_mem CL_API_CALL126clCreateFromDX9MediaSurfaceINTEL(127cl_context context,128cl_mem_flags flags,129IDirect3DSurface9* resource,130HANDLE sharedHandle,131UINT plane,132cl_int* errcode_ret) CL_EXT_SUFFIX__VERSION_1_1;133134typedef CL_API_ENTRY cl_mem (CL_API_CALL *clCreateFromDX9MediaSurfaceINTEL_fn)(135cl_context context,136cl_mem_flags flags,137IDirect3DSurface9* resource,138HANDLE sharedHandle,139UINT plane,140cl_int* errcode_ret) CL_EXT_SUFFIX__VERSION_1_1;141142extern CL_API_ENTRY cl_int CL_API_CALL143clEnqueueAcquireDX9ObjectsINTEL(144cl_command_queue command_queue,145cl_uint num_objects,146const cl_mem* mem_objects,147cl_uint num_events_in_wait_list,148const cl_event* event_wait_list,149cl_event* event) CL_EXT_SUFFIX__VERSION_1_1;150151typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueAcquireDX9ObjectsINTEL_fn)(152cl_command_queue command_queue,153cl_uint num_objects,154const cl_mem* mem_objects,155cl_uint num_events_in_wait_list,156const cl_event* event_wait_list,157cl_event* event) CL_EXT_SUFFIX__VERSION_1_1;158159extern CL_API_ENTRY cl_int CL_API_CALL160clEnqueueReleaseDX9ObjectsINTEL(161cl_command_queue command_queue,162cl_uint num_objects,163cl_mem* mem_objects,164cl_uint num_events_in_wait_list,165const cl_event* event_wait_list,166cl_event* event) CL_EXT_SUFFIX__VERSION_1_1;167168typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueReleaseDX9ObjectsINTEL_fn)(169cl_command_queue command_queue,170cl_uint num_objects,171cl_mem* mem_objects,172cl_uint num_events_in_wait_list,173const cl_event* event_wait_list,174cl_event* event) CL_EXT_SUFFIX__VERSION_1_1;175176#ifdef __cplusplus177}178#endif179180#endif /* __OPENCL_CL_DX9_MEDIA_SHARING_INTEL_H */181182183184