Skip to content

Commit 71f79f6

Browse files
committed
added support for CL_NO_PROTOTYPES define
appended EXTENSION_NAME to extension name define
1 parent adfe8c8 commit 71f79f6

9 files changed

Lines changed: 865 additions & 587 deletions

File tree

CL/cl_d3d10.h

Lines changed: 59 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@
1717
#ifndef OPENCL_CL_D3D10_H_
1818
#define OPENCL_CL_D3D10_H_
1919

20+
/*
21+
** This header is generated from the Khronos OpenCL XML API Registry.
22+
*/
23+
2024
#if defined(_MSC_VER)
2125
#if _MSC_VER >=1500
2226
#pragma warning( push )
@@ -40,7 +44,8 @@ extern "C" {
4044
* cl_khr_d3d10_sharing
4145
***************************************************************/
4246
#define cl_khr_d3d10_sharing 1
43-
#define CL_KHR_D3D10_SHARING "cl_khr_d3d10_sharing"
47+
#define CL_KHR_D3D10_SHARING_EXTENSION_NAME \
48+
"cl_khr_d3d10_sharing"
4449

4550
typedef cl_uint cl_d3d10_device_source_khr;
4651
typedef cl_uint cl_d3d10_device_set_khr;
@@ -74,16 +79,6 @@ typedef cl_uint cl_d3d10_device_set_khr;
7479
#define CL_COMMAND_RELEASE_D3D10_OBJECTS_KHR 0x4018
7580

7681

77-
extern CL_API_ENTRY cl_int CL_API_CALL
78-
clGetDeviceIDsFromD3D10KHR(
79-
cl_platform_id platform,
80-
cl_d3d10_device_source_khr d3d_device_source,
81-
void* d3d_object,
82-
cl_d3d10_device_set_khr d3d_device_set,
83-
cl_uint num_entries,
84-
cl_device_id* devices,
85-
cl_uint* num_devices) CL_API_SUFFIX__VERSION_1_0;
86-
8782
typedef cl_int (CL_API_CALL *
8883
clGetDeviceIDsFromD3D10KHR_fn)(
8984
cl_platform_id platform,
@@ -94,28 +89,13 @@ clGetDeviceIDsFromD3D10KHR_fn)(
9489
cl_device_id* devices,
9590
cl_uint* num_devices) CL_API_SUFFIX__VERSION_1_0;
9691

97-
extern CL_API_ENTRY cl_mem CL_API_CALL
98-
clCreateFromD3D10BufferKHR(
99-
cl_context context,
100-
cl_mem_flags flags,
101-
ID3D10Buffer* resource,
102-
cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_0;
103-
10492
typedef cl_mem (CL_API_CALL *
10593
clCreateFromD3D10BufferKHR_fn)(
10694
cl_context context,
10795
cl_mem_flags flags,
10896
ID3D10Buffer* resource,
10997
cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_0;
11098

111-
extern CL_API_ENTRY cl_mem CL_API_CALL
112-
clCreateFromD3D10Texture2DKHR(
113-
cl_context context,
114-
cl_mem_flags flags,
115-
ID3D10Texture2D* resource,
116-
UINT subresource,
117-
cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_0;
118-
11999
typedef cl_mem (CL_API_CALL *
120100
clCreateFromD3D10Texture2DKHR_fn)(
121101
cl_context context,
@@ -124,14 +104,6 @@ clCreateFromD3D10Texture2DKHR_fn)(
124104
UINT subresource,
125105
cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_0;
126106

127-
extern CL_API_ENTRY cl_mem CL_API_CALL
128-
clCreateFromD3D10Texture3DKHR(
129-
cl_context context,
130-
cl_mem_flags flags,
131-
ID3D10Texture3D* resource,
132-
UINT subresource,
133-
cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_0;
134-
135107
typedef cl_mem (CL_API_CALL *
136108
clCreateFromD3D10Texture3DKHR_fn)(
137109
cl_context context,
@@ -140,8 +112,8 @@ clCreateFromD3D10Texture3DKHR_fn)(
140112
UINT subresource,
141113
cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_0;
142114

143-
extern CL_API_ENTRY cl_int CL_API_CALL
144-
clEnqueueAcquireD3D10ObjectsKHR(
115+
typedef cl_int (CL_API_CALL *
116+
clEnqueueAcquireD3D10ObjectsKHR_fn)(
145117
cl_command_queue command_queue,
146118
cl_uint num_objects,
147119
const cl_mem* mem_objects,
@@ -150,58 +122,100 @@ clEnqueueAcquireD3D10ObjectsKHR(
150122
cl_event* event) CL_API_SUFFIX__VERSION_1_0;
151123

152124
typedef cl_int (CL_API_CALL *
153-
clEnqueueAcquireD3D10ObjectsKHR_fn)(
125+
clEnqueueReleaseD3D10ObjectsKHR_fn)(
154126
cl_command_queue command_queue,
155127
cl_uint num_objects,
156128
const cl_mem* mem_objects,
157129
cl_uint num_events_in_wait_list,
158130
const cl_event* event_wait_list,
159131
cl_event* event) CL_API_SUFFIX__VERSION_1_0;
160132

133+
#ifndef CL_NO_PROTOTYPES
134+
161135
extern CL_API_ENTRY cl_int CL_API_CALL
162-
clEnqueueReleaseD3D10ObjectsKHR(
136+
clGetDeviceIDsFromD3D10KHR(
137+
cl_platform_id platform,
138+
cl_d3d10_device_source_khr d3d_device_source,
139+
void* d3d_object,
140+
cl_d3d10_device_set_khr d3d_device_set,
141+
cl_uint num_entries,
142+
cl_device_id* devices,
143+
cl_uint* num_devices) CL_API_SUFFIX__VERSION_1_0;
144+
145+
extern CL_API_ENTRY cl_mem CL_API_CALL
146+
clCreateFromD3D10BufferKHR(
147+
cl_context context,
148+
cl_mem_flags flags,
149+
ID3D10Buffer* resource,
150+
cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_0;
151+
152+
extern CL_API_ENTRY cl_mem CL_API_CALL
153+
clCreateFromD3D10Texture2DKHR(
154+
cl_context context,
155+
cl_mem_flags flags,
156+
ID3D10Texture2D* resource,
157+
UINT subresource,
158+
cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_0;
159+
160+
extern CL_API_ENTRY cl_mem CL_API_CALL
161+
clCreateFromD3D10Texture3DKHR(
162+
cl_context context,
163+
cl_mem_flags flags,
164+
ID3D10Texture3D* resource,
165+
UINT subresource,
166+
cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_0;
167+
168+
extern CL_API_ENTRY cl_int CL_API_CALL
169+
clEnqueueAcquireD3D10ObjectsKHR(
163170
cl_command_queue command_queue,
164171
cl_uint num_objects,
165172
const cl_mem* mem_objects,
166173
cl_uint num_events_in_wait_list,
167174
const cl_event* event_wait_list,
168175
cl_event* event) CL_API_SUFFIX__VERSION_1_0;
169176

170-
typedef cl_int (CL_API_CALL *
171-
clEnqueueReleaseD3D10ObjectsKHR_fn)(
177+
extern CL_API_ENTRY cl_int CL_API_CALL
178+
clEnqueueReleaseD3D10ObjectsKHR(
172179
cl_command_queue command_queue,
173180
cl_uint num_objects,
174181
const cl_mem* mem_objects,
175182
cl_uint num_events_in_wait_list,
176183
const cl_event* event_wait_list,
177184
cl_event* event) CL_API_SUFFIX__VERSION_1_0;
178185

186+
#endif /* CL_NO_PROTOTYPES */
187+
179188
/***************************************************************
180189
* cl_intel_sharing_format_query_d3d10
181190
***************************************************************/
182191
#define cl_intel_sharing_format_query_d3d10 1
183-
#define CL_INTEL_SHARING_FORMAT_QUERY_D3D10 "cl_intel_sharing_format_query_d3d10"
192+
#define CL_INTEL_SHARING_FORMAT_QUERY_D3D10_EXTENSION_NAME \
193+
"cl_intel_sharing_format_query_d3d10"
184194

185195
/* when cl_khr_d3d10_sharing is supported */
186196

187-
extern CL_API_ENTRY cl_int CL_API_CALL
188-
clGetSupportedD3D10TextureFormatsINTEL(
197+
typedef cl_int (CL_API_CALL *
198+
clGetSupportedD3D10TextureFormatsINTEL_fn)(
189199
cl_context context,
190200
cl_mem_flags flags,
191201
cl_mem_object_type image_type,
192202
cl_uint num_entries,
193203
DXGI_FORMAT* d3d10_formats,
194204
cl_uint* num_texture_formats) ;
195205

196-
typedef cl_int (CL_API_CALL *
197-
clGetSupportedD3D10TextureFormatsINTEL_fn)(
206+
#ifndef CL_NO_PROTOTYPES
207+
208+
extern CL_API_ENTRY cl_int CL_API_CALL
209+
clGetSupportedD3D10TextureFormatsINTEL(
198210
cl_context context,
199211
cl_mem_flags flags,
200212
cl_mem_object_type image_type,
201213
cl_uint num_entries,
202214
DXGI_FORMAT* d3d10_formats,
203215
cl_uint* num_texture_formats) ;
204216

217+
#endif /* CL_NO_PROTOTYPES */
218+
205219
#ifdef __cplusplus
206220
}
207221
#endif

0 commit comments

Comments
 (0)