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_D3D10_H
27 #define __OPENCL_CL_D3D10_H
31 #include <CL/cl_platform.h>
37 /******************************************************************************
38 * cl_khr_d3d10_sharing */
39 #define cl_khr_d3d10_sharing 1
41 typedef cl_uint cl_d3d10_device_source_khr
;
42 typedef cl_uint cl_d3d10_device_set_khr
;
44 /******************************************************************************/
47 #define CL_INVALID_D3D10_DEVICE_KHR -1002
48 #define CL_INVALID_D3D10_RESOURCE_KHR -1003
49 #define CL_D3D10_RESOURCE_ALREADY_ACQUIRED_KHR -1004
50 #define CL_D3D10_RESOURCE_NOT_ACQUIRED_KHR -1005
52 /* cl_d3d10_device_source_nv */
53 #define CL_D3D10_DEVICE_KHR 0x4010
54 #define CL_D3D10_DXGI_ADAPTER_KHR 0x4011
56 /* cl_d3d10_device_set_nv */
57 #define CL_PREFERRED_DEVICES_FOR_D3D10_KHR 0x4012
58 #define CL_ALL_DEVICES_FOR_D3D10_KHR 0x4013
61 #define CL_CONTEXT_D3D10_DEVICE_KHR 0x4014
62 #define CL_CONTEXT_D3D10_PREFER_SHARED_RESOURCES_KHR 0x402C
65 #define CL_MEM_D3D10_RESOURCE_KHR 0x4015
68 #define CL_IMAGE_D3D10_SUBRESOURCE_KHR 0x4016
71 #define CL_COMMAND_ACQUIRE_D3D10_OBJECTS_KHR 0x4017
72 #define CL_COMMAND_RELEASE_D3D10_OBJECTS_KHR 0x4018
74 /******************************************************************************/
76 typedef CL_API_ENTRY
cl_int (CL_API_CALL
*clGetDeviceIDsFromD3D10KHR_fn
)(
77 cl_platform_id platform
,
78 cl_d3d10_device_source_khr d3d_device_source
,
80 cl_d3d10_device_set_khr d3d_device_set
,
82 cl_device_id
* devices
,
83 cl_uint
* num_devices
) CL_API_SUFFIX__VERSION_1_0
;
85 typedef CL_API_ENTRY
cl_mem (CL_API_CALL
*clCreateFromD3D10BufferKHR_fn
)(
88 ID3D10Buffer
* resource
,
89 cl_int
* errcode_ret
) CL_API_SUFFIX__VERSION_1_0
;
91 typedef CL_API_ENTRY
cl_mem (CL_API_CALL
*clCreateFromD3D10Texture2DKHR_fn
)(
94 ID3D10Texture2D
* resource
,
96 cl_int
* errcode_ret
) CL_API_SUFFIX__VERSION_1_0
;
98 typedef CL_API_ENTRY
cl_mem (CL_API_CALL
*clCreateFromD3D10Texture3DKHR_fn
)(
101 ID3D10Texture3D
* resource
,
103 cl_int
* errcode_ret
) CL_API_SUFFIX__VERSION_1_0
;
105 typedef CL_API_ENTRY
cl_int (CL_API_CALL
*clEnqueueAcquireD3D10ObjectsKHR_fn
)(
106 cl_command_queue command_queue
,
108 const cl_mem
* mem_objects
,
109 cl_uint num_events_in_wait_list
,
110 const cl_event
* event_wait_list
,
111 cl_event
* event
) CL_API_SUFFIX__VERSION_1_0
;
113 typedef CL_API_ENTRY
cl_int (CL_API_CALL
*clEnqueueReleaseD3D10ObjectsKHR_fn
)(
114 cl_command_queue command_queue
,
116 const cl_mem
* mem_objects
,
117 cl_uint num_events_in_wait_list
,
118 const cl_event
* event_wait_list
,
119 cl_event
* event
) CL_API_SUFFIX__VERSION_1_0
;
125 #endif /* __OPENCL_CL_D3D10_H */