cl_sys/
cl_d3d10_h.rs

1//! OpenCL / DirectX 10 sharing.
2
3#![allow(non_camel_case_types)]
4
5use crate::cl_h::cl_uint;
6
7pub const CL_CONTEXT_D3D10_DEVICE_KHR: cl_uint = 0x4014;
8// typedef cl_uint cl_d3d10_device_source_khr;
9pub type cl_d3d10_device_source_khr = cl_uint;
10// typedef cl_uint cl_d3d10_device_set_khr;
11pub type cl_d3d10_device_set_khr = cl_uint;
12// #define CL_INVALID_D3D10_DEVICE_KHR                  -1002
13// #define CL_INVALID_D3D10_RESOURCE_KHR                -1003
14// #define CL_D3D10_RESOURCE_ALREADY_ACQUIRED_KHR       -1004
15// #define CL_D3D10_RESOURCE_NOT_ACQUIRED_KHR           -1005
16
17// /**********************************************************************************
18//  * Copyright (c) 2008-2015 The Khronos Group Inc.
19//  *
20//  * Permission is hereby granted, free of charge, to any person obtaining a
21//  * copy of this software and/or associated documentation files (the
22//  * "Materials"), to deal in the Materials without restriction, including
23//  * without limitation the rights to use, copy, modify, merge, publish,
24//  * distribute, sublicense, and/or sell copies of the Materials, and to
25//  * permit persons to whom the Materials are furnished to do so, subject to
26//  * the following conditions:
27//  *
28//  * The above copyright notice and this permission notice shall be included
29//  * in all copies or substantial portions of the Materials.
30//  *
31//  * MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS
32//  * KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS
33//  * SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT
34//  *    https://www.khronos.org/registry/
35//  *
36//  * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
37//  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
38//  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
39//  * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
40//  * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
41//  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
42//  * MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
43//  **********************************************************************************/
44// /* $Revision: 11708 $ on $Date: 2010-06-13 23:36:24 -0700 (Sun, 13 Jun 2010) $ */
45// #ifndef __OPENCL_CL_D3D10_H
46// #define __OPENCL_CL_D3D10_H
47
48// #include <d3d10.h>
49// #include <CL/cl.h>
50// #include <CL/cl_platform.h>
51
52// #ifdef __cplusplus
53// extern "C" {
54// #endif
55
56// /******************************************************************************
57//  * cl_khr_d3d10_sharing                                                       */
58// #define cl_khr_d3d10_sharing 1
59
60// typedef cl_uint cl_d3d10_device_source_khr;
61// typedef cl_uint cl_d3d10_device_set_khr;
62
63// /******************************************************************************/
64// /* Error Codes */
65// #define CL_INVALID_D3D10_DEVICE_KHR                  -1002
66// #define CL_INVALID_D3D10_RESOURCE_KHR                -1003
67// #define CL_D3D10_RESOURCE_ALREADY_ACQUIRED_KHR       -1004
68// #define CL_D3D10_RESOURCE_NOT_ACQUIRED_KHR           -1005
69
70// /* cl_d3d10_device_source_nv */
71// #define CL_D3D10_DEVICE_KHR                          0x4010
72// #define CL_D3D10_DXGI_ADAPTER_KHR                    0x4011
73
74// /* cl_d3d10_device_set_nv */
75// #define CL_PREFERRED_DEVICES_FOR_D3D10_KHR           0x4012
76// #define CL_ALL_DEVICES_FOR_D3D10_KHR                 0x4013
77
78// /* cl_context_info */
79// #define CL_CONTEXT_D3D10_DEVICE_KHR                  0x4014
80// #define CL_CONTEXT_D3D10_PREFER_SHARED_RESOURCES_KHR 0x402C
81
82// /* cl_mem_info */
83// #define CL_MEM_D3D10_RESOURCE_KHR                    0x4015
84
85// /* cl_image_info */
86// #define CL_IMAGE_D3D10_SUBRESOURCE_KHR               0x4016
87
88// /* cl_command_type */
89// #define CL_COMMAND_ACQUIRE_D3D10_OBJECTS_KHR         0x4017
90// #define CL_COMMAND_RELEASE_D3D10_OBJECTS_KHR         0x4018
91
92// /******************************************************************************/
93// typedef CL_API_ENTRY cl_int (CL_API_CALL *clGetDeviceIDsFromD3D10KHR_fn)(
94//     cl_platform_id             platform,
95//     cl_d3d10_device_source_khr d3d_device_source,
96//     void *                     d3d_object,
97//     cl_d3d10_device_set_khr    d3d_device_set,
98//     cl_uint                    num_entries,
99//     cl_device_id *             devices,
100//     cl_uint *                  num_devices) CL_API_SUFFIX__VERSION_1_0;
101
102// typedef CL_API_ENTRY cl_mem (CL_API_CALL *clCreateFromD3D10BufferKHR_fn)(
103//     cl_context     context,
104//     cl_mem_flags   flags,
105//     ID3D10Buffer * resource,
106//     cl_int *       errcode_ret) CL_API_SUFFIX__VERSION_1_0;
107
108// typedef CL_API_ENTRY cl_mem (CL_API_CALL *clCreateFromD3D10Texture2DKHR_fn)(
109//     cl_context        context,
110//     cl_mem_flags      flags,
111//     ID3D10Texture2D * resource,
112//     UINT              subresource,
113//     cl_int *          errcode_ret) CL_API_SUFFIX__VERSION_1_0;
114
115// typedef CL_API_ENTRY cl_mem (CL_API_CALL *clCreateFromD3D10Texture3DKHR_fn)(
116//     cl_context        context,
117//     cl_mem_flags      flags,
118//     ID3D10Texture3D * resource,
119//     UINT              subresource,
120//     cl_int *          errcode_ret) CL_API_SUFFIX__VERSION_1_0;
121
122// typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueAcquireD3D10ObjectsKHR_fn)(
123//     cl_command_queue command_queue,
124//     cl_uint          num_objects,
125//     const cl_mem *   mem_objects,
126//     cl_uint          num_events_in_wait_list,
127//     const cl_event * event_wait_list,
128//     cl_event *       event) CL_API_SUFFIX__VERSION_1_0;
129
130// typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueReleaseD3D10ObjectsKHR_fn)(
131//     cl_command_queue command_queue,
132//     cl_uint          num_objects,
133//     const cl_mem *   mem_objects,
134//     cl_uint          num_events_in_wait_list,
135//     const cl_event * event_wait_list,
136//     cl_event *       event) CL_API_SUFFIX__VERSION_1_0;
137
138// #ifdef __cplusplus
139// }
140// #endif
141
142// #endif  /* __OPENCL_CL_D3D10_H */