Path: blob/master/3rdparty/include/opencl/1.2/CL/cl_dx9_media_sharing.h
16348 views
/**********************************************************************************1* Copyright (c) 2008-2012 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/* $Revision: 11708 $ on $Date: 2010-06-13 23:36:24 -0700 (Sun, 13 Jun 2010) $ */2425#ifndef __OPENCL_CL_DX9_MEDIA_SHARING_H26#define __OPENCL_CL_DX9_MEDIA_SHARING_H2728#include <CL/cl.h>29#include <CL/cl_platform.h>3031#ifdef __cplusplus32extern "C" {33#endif3435/******************************************************************************36/* cl_khr_dx9_media_sharing */37#define cl_khr_dx9_media_sharing 13839typedef cl_uint cl_dx9_media_adapter_type_khr;40typedef cl_uint cl_dx9_media_adapter_set_khr;4142#if defined(_WIN32)43#include <d3d9.h>44typedef struct _cl_dx9_surface_info_khr45{46IDirect3DSurface9 *resource;47HANDLE shared_handle;48} cl_dx9_surface_info_khr;49#endif505152/******************************************************************************/5354// Error Codes55#define CL_INVALID_DX9_MEDIA_ADAPTER_KHR -101056#define CL_INVALID_DX9_MEDIA_SURFACE_KHR -101157#define CL_DX9_MEDIA_SURFACE_ALREADY_ACQUIRED_KHR -101258#define CL_DX9_MEDIA_SURFACE_NOT_ACQUIRED_KHR -10135960// cl_media_adapter_type_khr61#define CL_ADAPTER_D3D9_KHR 0x202062#define CL_ADAPTER_D3D9EX_KHR 0x202163#define CL_ADAPTER_DXVA_KHR 0x20226465// cl_media_adapter_set_khr66#define CL_PREFERRED_DEVICES_FOR_DX9_MEDIA_ADAPTER_KHR 0x202367#define CL_ALL_DEVICES_FOR_DX9_MEDIA_ADAPTER_KHR 0x20246869// cl_context_info70#define CL_CONTEXT_ADAPTER_D3D9_KHR 0x202571#define CL_CONTEXT_ADAPTER_D3D9EX_KHR 0x202672#define CL_CONTEXT_ADAPTER_DXVA_KHR 0x20277374// cl_mem_info75#define CL_MEM_DX9_MEDIA_ADAPTER_TYPE_KHR 0x202876#define CL_MEM_DX9_MEDIA_SURFACE_INFO_KHR 0x20297778// cl_image_info79#define CL_IMAGE_DX9_MEDIA_PLANE_KHR 0x202A8081// cl_command_type82#define CL_COMMAND_ACQUIRE_DX9_MEDIA_SURFACES_KHR 0x202B83#define CL_COMMAND_RELEASE_DX9_MEDIA_SURFACES_KHR 0x202C8485/******************************************************************************/8687typedef CL_API_ENTRY cl_int (CL_API_CALL *clGetDeviceIDsFromDX9MediaAdapterKHR_fn)(88cl_platform_id platform,89cl_uint num_media_adapters,90cl_dx9_media_adapter_type_khr * media_adapter_type,91void * media_adapters,92cl_dx9_media_adapter_set_khr media_adapter_set,93cl_uint num_entries,94cl_device_id * devices,95cl_uint * num_devices) CL_API_SUFFIX__VERSION_1_2;9697typedef CL_API_ENTRY cl_mem (CL_API_CALL *clCreateFromDX9MediaSurfaceKHR_fn)(98cl_context context,99cl_mem_flags flags,100cl_dx9_media_adapter_type_khr adapter_type,101void * surface_info,102cl_uint plane,103cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_2;104105typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueAcquireDX9MediaSurfacesKHR_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;112113typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueReleaseDX9MediaSurfacesKHR_fn)(114cl_command_queue command_queue,115cl_uint num_objects,116const cl_mem * mem_objects,117cl_uint num_events_in_wait_list,118const cl_event * event_wait_list,119cl_event * event) CL_API_SUFFIX__VERSION_1_2;120121#ifdef __cplusplus122}123#endif124125#endif // __OPENCL_CL_DX9_MEDIA_SHARING_H126127128129