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_D3D10_H
32 #define __OPENCL_CL_D3D10_H
36 #include <CL/cl_platform.h>
42 /******************************************************************************
43 * cl_khr_d3d10_sharing */
44 #define cl_khr_d3d10_sharing 1
46 typedef cl_uint cl_d3d10_device_source_khr
;
47 typedef cl_uint cl_d3d10_device_set_khr
;
49 /******************************************************************************/
52 #define CL_INVALID_D3D10_DEVICE_KHR -1002
53 #define CL_INVALID_D3D10_RESOURCE_KHR -1003
54 #define CL_D3D10_RESOURCE_ALREADY_ACQUIRED_KHR -1004
55 #define CL_D3D10_RESOURCE_NOT_ACQUIRED_KHR -1005
57 /* cl_d3d10_device_source_nv */
58 #define CL_D3D10_DEVICE_KHR 0x4010
59 #define CL_D3D10_DXGI_ADAPTER_KHR 0x4011
61 /* cl_d3d10_device_set_nv */
62 #define CL_PREFERRED_DEVICES_FOR_D3D10_KHR 0x4012
63 #define CL_ALL_DEVICES_FOR_D3D10_KHR 0x4013
66 #define CL_CONTEXT_D3D10_DEVICE_KHR 0x4014
67 #define CL_CONTEXT_D3D10_PREFER_SHARED_RESOURCES_KHR 0x402C
70 #define CL_MEM_D3D10_RESOURCE_KHR 0x4015
73 #define CL_IMAGE_D3D10_SUBRESOURCE_KHR 0x4016
76 #define CL_COMMAND_ACQUIRE_D3D10_OBJECTS_KHR 0x4017
77 #define CL_COMMAND_RELEASE_D3D10_OBJECTS_KHR 0x4018
79 /******************************************************************************/
81 typedef CL_API_ENTRY
cl_int (CL_API_CALL
*clGetDeviceIDsFromD3D10KHR_fn
)(
82 cl_platform_id platform
,
83 cl_d3d10_device_source_khr d3d_device_source
,
85 cl_d3d10_device_set_khr d3d_device_set
,
87 cl_device_id
* devices
,
88 cl_uint
* num_devices
) CL_API_SUFFIX__VERSION_1_0
;
90 typedef CL_API_ENTRY
cl_mem (CL_API_CALL
*clCreateFromD3D10BufferKHR_fn
)(
93 ID3D10Buffer
* resource
,
94 cl_int
* errcode_ret
) CL_API_SUFFIX__VERSION_1_0
;
96 typedef CL_API_ENTRY
cl_mem (CL_API_CALL
*clCreateFromD3D10Texture2DKHR_fn
)(
99 ID3D10Texture2D
* resource
,
101 cl_int
* errcode_ret
) CL_API_SUFFIX__VERSION_1_0
;
103 typedef CL_API_ENTRY
cl_mem (CL_API_CALL
*clCreateFromD3D10Texture3DKHR_fn
)(
106 ID3D10Texture3D
* resource
,
108 cl_int
* errcode_ret
) CL_API_SUFFIX__VERSION_1_0
;
110 typedef CL_API_ENTRY
cl_int (CL_API_CALL
*clEnqueueAcquireD3D10ObjectsKHR_fn
)(
111 cl_command_queue command_queue
,
113 const cl_mem
* mem_objects
,
114 cl_uint num_events_in_wait_list
,
115 const cl_event
* event_wait_list
,
116 cl_event
* event
) CL_API_SUFFIX__VERSION_1_0
;
118 typedef CL_API_ENTRY
cl_int (CL_API_CALL
*clEnqueueReleaseD3D10ObjectsKHR_fn
)(
119 cl_command_queue command_queue
,
121 const cl_mem
* mem_objects
,
122 cl_uint num_events_in_wait_list
,
123 const cl_event
* event_wait_list
,
124 cl_event
* event
) CL_API_SUFFIX__VERSION_1_0
;
130 #endif /* __OPENCL_CL_D3D10_H */