1 /**********************************************************************************
2 * Copyright (c) 2008-2012 The Khronos Group Inc.
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and/or associated documentation files (the
6 * "Materials"), to deal in the Materials without restriction, including
7 * without limitation the rights to use, copy, modify, merge, publish,
8 * distribute, sublicense, and/or sell copies of the Materials, and to
9 * permit persons to whom the Materials are furnished to do so, subject to
10 * the following conditions:
12 * The above copyright notice and this permission notice shall be included
13 * in all copies or substantial portions of the Materials.
15 * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
18 * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
19 * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
20 * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
21 * MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
22 **********************************************************************************/
24 /* $Revision: 11708 $ on $Date: 2010-06-13 23:36:24 -0700 (Sun, 13 Jun 2010) $ */
26 #ifndef __OPENCL_CL_DX9_MEDIA_SHARING_H
27 #define __OPENCL_CL_DX9_MEDIA_SHARING_H
30 #include <CL/cl_platform.h>
36 /******************************************************************************
37 /* cl_khr_dx9_media_sharing */
38 #define cl_khr_dx9_media_sharing 1
40 typedef cl_uint cl_dx9_media_adapter_type_khr
;
41 typedef cl_uint cl_dx9_media_adapter_set_khr
;
45 typedef struct _cl_dx9_surface_info_khr
47 IDirect3DSurface9
*resource
;
49 } cl_dx9_surface_info_khr
;
53 /******************************************************************************/
56 #define CL_INVALID_DX9_MEDIA_ADAPTER_KHR -1010
57 #define CL_INVALID_DX9_MEDIA_SURFACE_KHR -1011
58 #define CL_DX9_MEDIA_SURFACE_ALREADY_ACQUIRED_KHR -1012
59 #define CL_DX9_MEDIA_SURFACE_NOT_ACQUIRED_KHR -1013
61 /* cl_media_adapter_type_khr */
62 #define CL_ADAPTER_D3D9_KHR 0x2020
63 #define CL_ADAPTER_D3D9EX_KHR 0x2021
64 #define CL_ADAPTER_DXVA_KHR 0x2022
66 /* cl_media_adapter_set_khr */
67 #define CL_PREFERRED_DEVICES_FOR_DX9_MEDIA_ADAPTER_KHR 0x2023
68 #define CL_ALL_DEVICES_FOR_DX9_MEDIA_ADAPTER_KHR 0x2024
71 #define CL_CONTEXT_ADAPTER_D3D9_KHR 0x2025
72 #define CL_CONTEXT_ADAPTER_D3D9EX_KHR 0x2026
73 #define CL_CONTEXT_ADAPTER_DXVA_KHR 0x2027
76 #define CL_MEM_DX9_MEDIA_ADAPTER_TYPE_KHR 0x2028
77 #define CL_MEM_DX9_MEDIA_SURFACE_INFO_KHR 0x2029
80 #define CL_IMAGE_DX9_MEDIA_PLANE_KHR 0x202A
83 #define CL_COMMAND_ACQUIRE_DX9_MEDIA_SURFACES_KHR 0x202B
84 #define CL_COMMAND_RELEASE_DX9_MEDIA_SURFACES_KHR 0x202C
86 /******************************************************************************/
88 typedef CL_API_ENTRY
cl_int (CL_API_CALL
*clGetDeviceIDsFromDX9MediaAdapterKHR_fn
)(
89 cl_platform_id platform
,
90 cl_uint num_media_adapters
,
91 cl_dx9_media_adapter_type_khr
* media_adapter_type
,
92 void * media_adapters
,
93 cl_dx9_media_adapter_set_khr media_adapter_set
,
95 cl_device_id
* devices
,
96 cl_uint
* num_devices
) CL_API_SUFFIX__VERSION_1_2
;
98 typedef CL_API_ENTRY
cl_mem (CL_API_CALL
*clCreateFromDX9MediaSurfaceKHR_fn
)(
101 cl_dx9_media_adapter_type_khr adapter_type
,
104 cl_int
* errcode_ret
) CL_API_SUFFIX__VERSION_1_2
;
106 typedef CL_API_ENTRY
cl_int (CL_API_CALL
*clEnqueueAcquireDX9MediaSurfacesKHR_fn
)(
107 cl_command_queue command_queue
,
109 const cl_mem
* mem_objects
,
110 cl_uint num_events_in_wait_list
,
111 const cl_event
* event_wait_list
,
112 cl_event
* event
) CL_API_SUFFIX__VERSION_1_2
;
114 typedef CL_API_ENTRY
cl_int (CL_API_CALL
*clEnqueueReleaseDX9MediaSurfacesKHR_fn
)(
115 cl_command_queue command_queue
,
117 const cl_mem
* mem_objects
,
118 cl_uint num_events_in_wait_list
,
119 const cl_event
* event_wait_list
,
120 cl_event
* event
) CL_API_SUFFIX__VERSION_1_2
;
126 #endif /* __OPENCL_CL_DX9_MEDIA_SHARING_H */