1 /**********************************************************************************
2 * Copyright (c) 2008-2015 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 * MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS
16 * KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS
17 * SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT
18 * https://www.khronos.org/registry/
20 * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
22 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
23 * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
24 * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
25 * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
26 * MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
27 **********************************************************************************/
29 /* $Revision: 11708 $ on $Date: 2010-06-13 23:36:24 -0700 (Sun, 13 Jun 2010) $ */
31 #ifndef __OPENCL_CL_DX9_MEDIA_SHARING_H
32 #define __OPENCL_CL_DX9_MEDIA_SHARING_H
35 #include <CL/cl_platform.h>
41 /******************************************************************************/
42 /* cl_khr_dx9_media_sharing */
43 #define cl_khr_dx9_media_sharing 1
45 typedef cl_uint cl_dx9_media_adapter_type_khr
;
46 typedef cl_uint cl_dx9_media_adapter_set_khr
;
50 typedef struct _cl_dx9_surface_info_khr
52 IDirect3DSurface9
*resource
;
54 } cl_dx9_surface_info_khr
;
58 /******************************************************************************/
61 #define CL_INVALID_DX9_MEDIA_ADAPTER_KHR -1010
62 #define CL_INVALID_DX9_MEDIA_SURFACE_KHR -1011
63 #define CL_DX9_MEDIA_SURFACE_ALREADY_ACQUIRED_KHR -1012
64 #define CL_DX9_MEDIA_SURFACE_NOT_ACQUIRED_KHR -1013
66 /* cl_media_adapter_type_khr */
67 #define CL_ADAPTER_D3D9_KHR 0x2020
68 #define CL_ADAPTER_D3D9EX_KHR 0x2021
69 #define CL_ADAPTER_DXVA_KHR 0x2022
71 /* cl_media_adapter_set_khr */
72 #define CL_PREFERRED_DEVICES_FOR_DX9_MEDIA_ADAPTER_KHR 0x2023
73 #define CL_ALL_DEVICES_FOR_DX9_MEDIA_ADAPTER_KHR 0x2024
76 #define CL_CONTEXT_ADAPTER_D3D9_KHR 0x2025
77 #define CL_CONTEXT_ADAPTER_D3D9EX_KHR 0x2026
78 #define CL_CONTEXT_ADAPTER_DXVA_KHR 0x2027
81 #define CL_MEM_DX9_MEDIA_ADAPTER_TYPE_KHR 0x2028
82 #define CL_MEM_DX9_MEDIA_SURFACE_INFO_KHR 0x2029
85 #define CL_IMAGE_DX9_MEDIA_PLANE_KHR 0x202A
88 #define CL_COMMAND_ACQUIRE_DX9_MEDIA_SURFACES_KHR 0x202B
89 #define CL_COMMAND_RELEASE_DX9_MEDIA_SURFACES_KHR 0x202C
91 /******************************************************************************/
93 typedef CL_API_ENTRY
cl_int (CL_API_CALL
*clGetDeviceIDsFromDX9MediaAdapterKHR_fn
)(
94 cl_platform_id platform
,
95 cl_uint num_media_adapters
,
96 cl_dx9_media_adapter_type_khr
* media_adapter_type
,
97 void * media_adapters
,
98 cl_dx9_media_adapter_set_khr media_adapter_set
,
100 cl_device_id
* devices
,
101 cl_uint
* num_devices
) CL_API_SUFFIX__VERSION_1_2
;
103 typedef CL_API_ENTRY
cl_mem (CL_API_CALL
*clCreateFromDX9MediaSurfaceKHR_fn
)(
106 cl_dx9_media_adapter_type_khr adapter_type
,
109 cl_int
* errcode_ret
) CL_API_SUFFIX__VERSION_1_2
;
111 typedef CL_API_ENTRY
cl_int (CL_API_CALL
*clEnqueueAcquireDX9MediaSurfacesKHR_fn
)(
112 cl_command_queue command_queue
,
114 const cl_mem
* mem_objects
,
115 cl_uint num_events_in_wait_list
,
116 const cl_event
* event_wait_list
,
117 cl_event
* event
) CL_API_SUFFIX__VERSION_1_2
;
119 typedef CL_API_ENTRY
cl_int (CL_API_CALL
*clEnqueueReleaseDX9MediaSurfacesKHR_fn
)(
120 cl_command_queue command_queue
,
122 const cl_mem
* mem_objects
,
123 cl_uint num_events_in_wait_list
,
124 const cl_event
* event_wait_list
,
125 cl_event
* event
) CL_API_SUFFIX__VERSION_1_2
;
131 #endif /* __OPENCL_CL_DX9_MEDIA_SHARING_H */