Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
cl_d3d10.h242 linesDownload Raw Back to CL
1/*******************************************************************************
2 * Copyright (c) 2008-2023 The Khronos Group Inc.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 *    http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 ******************************************************************************/
16
17#ifndef OPENCL_CL_D3D10_H_
18#define OPENCL_CL_D3D10_H_
19
20/*
21** This header is generated from the Khronos OpenCL XML API Registry.
22*/
23
24#if defined(_MSC_VER)
25#if _MSC_VER >=1500
26#pragma warning( push )
27#pragma warning( disable : 4201 )
28#pragma warning( disable : 5105 )
29#endif
30#endif
31#include <d3d10.h>
32#if defined(_MSC_VER)
33#if _MSC_VER >=1500
34#pragma warning( pop )
35#endif
36#endif
37
38#include <CL/cl.h>
39
40/* CL_NO_PROTOTYPES implies CL_NO_EXTENSION_PROTOTYPES: */
41#if defined(CL_NO_PROTOTYPES) && !defined(CL_NO_EXTENSION_PROTOTYPES)
42#define CL_NO_EXTENSION_PROTOTYPES
43#endif
44
45/* CL_NO_EXTENSION_PROTOTYPES implies
46   CL_NO_ICD_DISPATCH_EXTENSION_PROTOTYPES and
47   CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES: */
48#if defined(CL_NO_EXTENSION_PROTOTYPES) && \
49    !defined(CL_NO_ICD_DISPATCH_EXTENSION_PROTOTYPES)
50#define CL_NO_ICD_DISPATCH_EXTENSION_PROTOTYPES
51#endif
52#if defined(CL_NO_EXTENSION_PROTOTYPES) && \
53    !defined(CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES)
54#define CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES
55#endif
56
57#ifdef __cplusplus
58extern "C" {
59#endif
60
61/***************************************************************
62* cl_khr_d3d10_sharing
63***************************************************************/
64#define cl_khr_d3d10_sharing 1
65#define CL_KHR_D3D10_SHARING_EXTENSION_NAME \
66    "cl_khr_d3d10_sharing"
67
68typedef cl_uint             cl_d3d10_device_source_khr;
69typedef cl_uint             cl_d3d10_device_set_khr;
70
71/* Error codes */
72#define CL_INVALID_D3D10_DEVICE_KHR                         -1002
73#define CL_INVALID_D3D10_RESOURCE_KHR                       -1003
74#define CL_D3D10_RESOURCE_ALREADY_ACQUIRED_KHR              -1004
75#define CL_D3D10_RESOURCE_NOT_ACQUIRED_KHR                  -1005
76
77/* cl_d3d10_device_source_khr */
78#define CL_D3D10_DEVICE_KHR                                 0x4010
79#define CL_D3D10_DXGI_ADAPTER_KHR                           0x4011
80
81/* cl_d3d10_device_set_khr */
82#define CL_PREFERRED_DEVICES_FOR_D3D10_KHR                  0x4012
83#define CL_ALL_DEVICES_FOR_D3D10_KHR                        0x4013
84
85/* cl_context_info */
86#define CL_CONTEXT_D3D10_DEVICE_KHR                         0x4014
87#define CL_CONTEXT_D3D10_PREFER_SHARED_RESOURCES_KHR        0x402C
88
89/* cl_mem_info */
90#define CL_MEM_D3D10_RESOURCE_KHR                           0x4015
91
92/* cl_image_info */
93#define CL_IMAGE_D3D10_SUBRESOURCE_KHR                      0x4016
94
95/* cl_command_type */
96#define CL_COMMAND_ACQUIRE_D3D10_OBJECTS_KHR                0x4017
97#define CL_COMMAND_RELEASE_D3D10_OBJECTS_KHR                0x4018
98
99
100typedef cl_int (CL_API_CALL *
101clGetDeviceIDsFromD3D10KHR_fn)(
102    cl_platform_id platform,
103    cl_d3d10_device_source_khr d3d_device_source,
104    void* d3d_object,
105    cl_d3d10_device_set_khr d3d_device_set,
106    cl_uint num_entries,
107    cl_device_id* devices,
108    cl_uint* num_devices) CL_API_SUFFIX__VERSION_1_0;
109
110typedef cl_mem (CL_API_CALL *
111clCreateFromD3D10BufferKHR_fn)(
112    cl_context context,
113    cl_mem_flags flags,
114    ID3D10Buffer* resource,
115    cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_0;
116
117typedef cl_mem (CL_API_CALL *
118clCreateFromD3D10Texture2DKHR_fn)(
119    cl_context context,
120    cl_mem_flags flags,
121    ID3D10Texture2D* resource,
122    UINT subresource,
123    cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_0;
124
125typedef cl_mem (CL_API_CALL *
126clCreateFromD3D10Texture3DKHR_fn)(
127    cl_context context,
128    cl_mem_flags flags,
129    ID3D10Texture3D* resource,
130    UINT subresource,
131    cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_0;
132
133typedef cl_int (CL_API_CALL *
134clEnqueueAcquireD3D10ObjectsKHR_fn)(
135    cl_command_queue command_queue,
136    cl_uint num_objects,
137    const cl_mem* mem_objects,
138    cl_uint num_events_in_wait_list,
139    const cl_event* event_wait_list,
140    cl_event* event) CL_API_SUFFIX__VERSION_1_0;
141
142typedef cl_int (CL_API_CALL *
143clEnqueueReleaseD3D10ObjectsKHR_fn)(
144    cl_command_queue command_queue,
145    cl_uint num_objects,
146    const cl_mem* mem_objects,
147    cl_uint num_events_in_wait_list,
148    const cl_event* event_wait_list,
149    cl_event* event) CL_API_SUFFIX__VERSION_1_0;
150
151#if !defined(CL_NO_ICD_DISPATCH_EXTENSION_PROTOTYPES)
152
153extern CL_API_ENTRY cl_int CL_API_CALL
154clGetDeviceIDsFromD3D10KHR(
155    cl_platform_id platform,
156    cl_d3d10_device_source_khr d3d_device_source,
157    void* d3d_object,
158    cl_d3d10_device_set_khr d3d_device_set,
159    cl_uint num_entries,
160    cl_device_id* devices,
161    cl_uint* num_devices) CL_API_SUFFIX__VERSION_1_0;
162
163extern CL_API_ENTRY cl_mem CL_API_CALL
164clCreateFromD3D10BufferKHR(
165    cl_context context,
166    cl_mem_flags flags,
167    ID3D10Buffer* resource,
168    cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_0;
169
170extern CL_API_ENTRY cl_mem CL_API_CALL
171clCreateFromD3D10Texture2DKHR(
172    cl_context context,
173    cl_mem_flags flags,
174    ID3D10Texture2D* resource,
175    UINT subresource,
176    cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_0;
177
178extern CL_API_ENTRY cl_mem CL_API_CALL
179clCreateFromD3D10Texture3DKHR(
180    cl_context context,
181    cl_mem_flags flags,
182    ID3D10Texture3D* resource,
183    UINT subresource,
184    cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_0;
185
186extern CL_API_ENTRY cl_int CL_API_CALL
187clEnqueueAcquireD3D10ObjectsKHR(
188    cl_command_queue command_queue,
189    cl_uint num_objects,
190    const cl_mem* mem_objects,
191    cl_uint num_events_in_wait_list,
192    const cl_event* event_wait_list,
193    cl_event* event) CL_API_SUFFIX__VERSION_1_0;
194
195extern CL_API_ENTRY cl_int CL_API_CALL
196clEnqueueReleaseD3D10ObjectsKHR(
197    cl_command_queue command_queue,
198    cl_uint num_objects,
199    const cl_mem* mem_objects,
200    cl_uint num_events_in_wait_list,
201    const cl_event* event_wait_list,
202    cl_event* event) CL_API_SUFFIX__VERSION_1_0;
203
204#endif /* !defined(CL_NO_ICD_DISPATCH_EXTENSION_PROTOTYPES) */
205
206/***************************************************************
207* cl_intel_sharing_format_query_d3d10
208***************************************************************/
209#define cl_intel_sharing_format_query_d3d10 1
210#define CL_INTEL_SHARING_FORMAT_QUERY_D3D10_EXTENSION_NAME \
211    "cl_intel_sharing_format_query_d3d10"
212
213/* when cl_khr_d3d10_sharing is supported */
214
215typedef cl_int (CL_API_CALL *
216clGetSupportedD3D10TextureFormatsINTEL_fn)(
217    cl_context context,
218    cl_mem_flags flags,
219    cl_mem_object_type image_type,
220    cl_uint num_entries,
221    DXGI_FORMAT* d3d10_formats,
222    cl_uint* num_texture_formats) ;
223
224#if !defined(CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES)
225
226extern CL_API_ENTRY cl_int CL_API_CALL
227clGetSupportedD3D10TextureFormatsINTEL(
228    cl_context context,
229    cl_mem_flags flags,
230    cl_mem_object_type image_type,
231    cl_uint num_entries,
232    DXGI_FORMAT* d3d10_formats,
233    cl_uint* num_texture_formats) ;
234
235#endif /* !defined(CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES) */
236
237#ifdef __cplusplus
238}
239#endif
240
241#endif /* OPENCL_CL_D3D10_H_ */
242 
codekingpro/portable-devtools · Team Ai