Skip to content

Commit 0bf231b

Browse files
committed
updates for sharing format query extensions
1 parent adae016 commit 0bf231b

8 files changed

Lines changed: 217 additions & 6 deletions

File tree

CL/cl_d3d10.h

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,32 @@ clEnqueueReleaseD3D10ObjectsKHR_fn)(
176176
const cl_event* event_wait_list,
177177
cl_event* event) CL_API_SUFFIX__VERSION_1_0;
178178

179+
/***************************************************************
180+
* cl_intel_sharing_format_query_d3d10
181+
***************************************************************/
182+
#define cl_intel_sharing_format_query_d3d10 1
183+
#define CL_INTEL_SHARING_FORMAT_QUERY_D3D10 "cl_intel_sharing_format_query_d3d10"
184+
185+
/* when cl_khr_d3d10_sharing is supported */
186+
187+
extern CL_API_ENTRY cl_int CL_API_CALL
188+
clGetSupportedD3D10TextureFormatsINTEL(
189+
cl_context context,
190+
cl_mem_flags flags,
191+
cl_mem_object_type image_type,
192+
cl_uint num_entries,
193+
DXGI_FORMAT* d3d10_formats,
194+
cl_uint* num_texture_formats) ;
195+
196+
typedef cl_int (CL_API_CALL *
197+
clGetSupportedD3D10TextureFormatsINTEL_fn)(
198+
cl_context context,
199+
cl_mem_flags flags,
200+
cl_mem_object_type image_type,
201+
cl_uint num_entries,
202+
DXGI_FORMAT* d3d10_formats,
203+
cl_uint* num_texture_formats) ;
204+
179205
#ifdef __cplusplus
180206
}
181207
#endif

CL/cl_d3d11.h

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,34 @@ clEnqueueReleaseD3D11ObjectsKHR_fn)(
176176
const cl_event* event_wait_list,
177177
cl_event* event) CL_API_SUFFIX__VERSION_1_2;
178178

179+
/***************************************************************
180+
* cl_intel_sharing_format_query_d3d11
181+
***************************************************************/
182+
#define cl_intel_sharing_format_query_d3d11 1
183+
#define CL_INTEL_SHARING_FORMAT_QUERY_D3D11 "cl_intel_sharing_format_query_d3d11"
184+
185+
/* when cl_khr_d3d11_sharing is supported */
186+
187+
extern CL_API_ENTRY cl_int CL_API_CALL
188+
clGetSupportedD3D11TextureFormatsINTEL(
189+
cl_context context,
190+
cl_mem_flags flags,
191+
cl_mem_object_type image_type,
192+
cl_uint plane,
193+
cl_uint num_entries,
194+
DXGI_FORMAT* d3d11_formats,
195+
cl_uint* num_texture_formats) ;
196+
197+
typedef cl_int (CL_API_CALL *
198+
clGetSupportedD3D11TextureFormatsINTEL_fn)(
199+
cl_context context,
200+
cl_mem_flags flags,
201+
cl_mem_object_type image_type,
202+
cl_uint plane,
203+
cl_uint num_entries,
204+
DXGI_FORMAT* d3d11_formats,
205+
cl_uint* num_texture_formats) ;
206+
179207
#ifdef __cplusplus
180208
}
181209
#endif

CL/cl_dx9_media_sharing.h

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,34 @@ clEnqueueReleaseDX9ObjectsINTEL_fn)(
266266
const cl_event* event_wait_list,
267267
cl_event* event) CL_API_SUFFIX__VERSION_1_1;
268268

269+
/***************************************************************
270+
* cl_intel_sharing_format_query_dx9
271+
***************************************************************/
272+
#define cl_intel_sharing_format_query_dx9 1
273+
#define CL_INTEL_SHARING_FORMAT_QUERY_DX9 "cl_intel_sharing_format_query_dx9"
274+
275+
/* when cl_khr_dx9_media_sharing or cl_intel_dx9_media_sharing is supported */
276+
277+
extern CL_API_ENTRY cl_int CL_API_CALL
278+
clGetSupportedDX9MediaSurfaceFormatsINTEL(
279+
cl_context context,
280+
cl_mem_flags flags,
281+
cl_mem_object_type image_type,
282+
cl_uint plane,
283+
cl_uint num_entries,
284+
D3DFORMAT* dx9_formats,
285+
cl_uint* num_surface_formats) ;
286+
287+
typedef cl_int (CL_API_CALL *
288+
clGetSupportedDX9MediaSurfaceFormatsINTEL_fn)(
289+
cl_context context,
290+
cl_mem_flags flags,
291+
cl_mem_object_type image_type,
292+
cl_uint plane,
293+
cl_uint num_entries,
294+
D3DFORMAT* dx9_formats,
295+
cl_uint* num_surface_formats) ;
296+
269297
#ifdef __cplusplus
270298
}
271299
#endif

CL/cl_ext.h

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,21 @@ clCreateProgramWithILKHR_fn)(
207207
/* Interop tokens */
208208
#define CL_CONTEXT_MEMORY_INITIALIZE_KHR 0x2030
209209

210+
/***************************************************************
211+
* cl_khr_integer_dot_product
212+
***************************************************************/
213+
#define cl_khr_integer_dot_product 1
214+
#define CL_KHR_INTEGER_DOT_PRODUCT "cl_khr_integer_dot_product"
215+
216+
typedef cl_bitfield cl_device_integer_dot_product_capabilities_khr;
217+
218+
/* cl_device_integer_dot_product_capabilities_khr */
219+
#define CL_DEVICE_INTEGER_DOT_PRODUCT_INPUT_4x8BIT_PACKED_KHR (1 << 0)
220+
#define CL_DEVICE_INTEGER_DOT_PRODUCT_INPUT_4x8BIT_KHR (1 << 1)
221+
222+
/* cl_device_info */
223+
#define CL_DEVICE_INTEGER_DOT_PRODUCT_CAPABILITIES_KHR 0x1073
224+
210225
/***************************************************************
211226
* cl_khr_mipmap_image
212227
***************************************************************/
@@ -218,6 +233,22 @@ clCreateProgramWithILKHR_fn)(
218233
#define CL_SAMPLER_LOD_MIN_KHR 0x1156
219234
#define CL_SAMPLER_LOD_MAX_KHR 0x1157
220235

236+
/***************************************************************
237+
* cl_khr_pci_bus_info
238+
***************************************************************/
239+
#define cl_khr_pci_bus_info 1
240+
#define CL_KHR_PCI_BUS_INFO "cl_khr_pci_bus_info"
241+
242+
typedef struct _cl_device_pci_bus_info_khr {
243+
cl_uint pci_domain;
244+
cl_uint pci_bus;
245+
cl_uint pci_device;
246+
cl_uint pci_function;
247+
} cl_device_pci_bus_info_khr;
248+
249+
/* cl_device_info */
250+
#define CL_DEVICE_PCI_BUS_INFO_KHR 0x410F
251+
221252
/***************************************************************
222253
* cl_khr_priority_hints
223254
***************************************************************/
@@ -294,6 +325,31 @@ clGetKernelSubGroupInfoKHR_fn)(
294325
void* param_value,
295326
size_t* param_value_size_ret) CL_API_SUFFIX__VERSION_2_0_DEPRECATED;
296327

328+
/***************************************************************
329+
* cl_khr_suggested_local_work_size
330+
***************************************************************/
331+
#define cl_khr_suggested_local_work_size 1
332+
#define CL_KHR_SUGGESTED_LOCAL_WORK_SIZE "cl_khr_suggested_local_work_size"
333+
334+
335+
extern CL_API_ENTRY cl_int CL_API_CALL
336+
clGetKernelSuggestedLocalWorkSizeKHR(
337+
cl_command_queue command_queue,
338+
cl_kernel kernel,
339+
cl_uint work_dim,
340+
const size_t* global_work_offset,
341+
const size_t* global_work_size,
342+
size_t* suggested_local_work_size) CL_API_SUFFIX__VERSION_3_0;
343+
344+
typedef cl_int (CL_API_CALL *
345+
clGetKernelSuggestedLocalWorkSizeKHR_fn)(
346+
cl_command_queue command_queue,
347+
cl_kernel kernel,
348+
cl_uint work_dim,
349+
const size_t* global_work_offset,
350+
const size_t* global_work_size,
351+
size_t* suggested_local_work_size) CL_API_SUFFIX__VERSION_3_0;
352+
297353
/***************************************************************
298354
* cl_khr_terminate_context
299355
***************************************************************/
@@ -1462,6 +1518,12 @@ typedef struct _cl_motion_estimation_desc_intel {
14621518
/* cl_kernel_sub_group_info */
14631519
#define CL_KERNEL_COMPILE_SUB_GROUP_SIZE_INTEL 0x410A
14641520

1521+
/***************************************************************
1522+
* cl_intel_sharing_format_query
1523+
***************************************************************/
1524+
#define cl_intel_sharing_format_query 1
1525+
#define CL_INTEL_SHARING_FORMAT_QUERY "cl_intel_sharing_format_query"
1526+
14651527
/***************************************************************
14661528
* cl_intel_simultaneous_sharing
14671529
***************************************************************/

CL/cl_gl.h

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,32 @@ clCreateFromGLTexture3D_fn)(
285285
cl_GLuint texture,
286286
cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_1_DEPRECATED;
287287

288+
/***************************************************************
289+
* cl_intel_sharing_format_query_gl
290+
***************************************************************/
291+
#define cl_intel_sharing_format_query_gl 1
292+
#define CL_INTEL_SHARING_FORMAT_QUERY_GL "cl_intel_sharing_format_query_gl"
293+
294+
/* when cl_khr_gl_sharing is supported */
295+
296+
extern CL_API_ENTRY cl_int CL_API_CALL
297+
clGetSupportedGLTextureFormatsINTEL(
298+
cl_context context,
299+
cl_mem_flags flags,
300+
cl_mem_object_type image_type,
301+
cl_uint num_entries,
302+
cl_GLenum* gl_formats,
303+
cl_uint* num_texture_formats) ;
304+
305+
typedef cl_int (CL_API_CALL *
306+
clGetSupportedGLTextureFormatsINTEL_fn)(
307+
cl_context context,
308+
cl_mem_flags flags,
309+
cl_mem_object_type image_type,
310+
cl_uint num_entries,
311+
cl_GLenum* gl_formats,
312+
cl_uint* num_texture_formats) ;
313+
288314
#ifdef __cplusplus
289315
}
290316
#endif

CL/cl_va_api_media_sharing_intel.h

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,34 @@
2424
extern "C" {
2525
#endif
2626

27+
/***************************************************************
28+
* cl_intel_sharing_format_query_va_api
29+
***************************************************************/
30+
#define cl_intel_sharing_format_query_va_api 1
31+
#define CL_INTEL_SHARING_FORMAT_QUERY_VA_API "cl_intel_sharing_format_query_va_api"
32+
33+
/* when cl_intel_va_api_media_sharing is supported */
34+
35+
extern CL_API_ENTRY cl_int CL_API_CALL
36+
clGetSupportedVA_APIMediaSurfaceFormatsINTEL(
37+
cl_context context,
38+
cl_mem_flags flags,
39+
cl_mem_object_type image_type,
40+
cl_uint plane,
41+
cl_uint num_entries,
42+
VAImageFormat* va_api_formats,
43+
cl_uint* num_surface_formats) ;
44+
45+
typedef cl_int (CL_API_CALL *
46+
clGetSupportedVA_APIMediaSurfaceFormatsINTEL_fn)(
47+
cl_context context,
48+
cl_mem_flags flags,
49+
cl_mem_object_type image_type,
50+
cl_uint plane,
51+
cl_uint num_entries,
52+
VAImageFormat* va_api_formats,
53+
cl_uint* num_surface_formats) ;
54+
2755
/***************************************************************
2856
* cl_intel_va_api_media_sharing
2957
***************************************************************/

scripts/cl_ext.h.mako

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@ skipExtensions = {
1313
'cl_loader_layers',
1414
'cl_intel_dx9_media_sharing',
1515
'cl_intel_va_api_media_sharing',
16+
'cl_intel_sharing_format_query_d3d10',
17+
'cl_intel_sharing_format_query_d3d11',
18+
'cl_intel_sharing_format_query_dx9',
19+
'cl_intel_sharing_format_query_gl',
20+
'cl_intel_sharing_format_query_va_api',
1621
}
1722
1823
# Extensions to include in this header:

scripts/gen_headers.py

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ def getWin32OnlyIncludeString(include):
6868
genExtensions={
6969
'cl_khr_dx9_media_sharing',
7070
'cl_intel_dx9_media_sharing',
71+
'cl_intel_sharing_format_query_dx9',
7172
},
7273
guard="OPENCL_CL_DX9_MEDIA_SHARING_H_",
7374
includes=getWin32OnlyIncludeString("#include <d3d9.h>"),
@@ -85,7 +86,10 @@ def getWin32OnlyIncludeString(include):
8586
gen = open(args.directory + '/cl_d3d10.h', 'wb')
8687
gen.write(
8788
cl_ext_h_template.render_unicode(
88-
genExtensions={'cl_khr_d3d10_sharing'},
89+
genExtensions={
90+
'cl_khr_d3d10_sharing',
91+
'cl_intel_sharing_format_query_d3d10',
92+
},
8993
guard="OPENCL_CL_D3D10_H_",
9094
includes=getDisableWarningIncludeString("#include <d3d10.h>"),
9195
spec=spec,
@@ -102,7 +106,10 @@ def getWin32OnlyIncludeString(include):
102106
gen = open(args.directory + '/cl_d3d11.h', 'wb')
103107
gen.write(
104108
cl_ext_h_template.render_unicode(
105-
genExtensions={'cl_khr_d3d11_sharing'},
109+
genExtensions={
110+
'cl_khr_d3d11_sharing',
111+
'cl_intel_sharing_format_query_d3d11'
112+
},
106113
guard="OPENCL_CL_D3D11_H_",
107114
includes=getDisableWarningIncludeString("#include <d3d11.h>"),
108115
spec=spec,
@@ -120,7 +127,6 @@ def getWin32OnlyIncludeString(include):
120127
gen.write(
121128
cl_ext_h_template.render_unicode(
122129
genExtensions={'cl_khr_egl_event', 'cl_khr_egl_image'},
123-
skipFunctions={},
124130
guard="OPENCL_CL_EGL_H_",
125131
spec=spec,
126132
typedefs=typedefs,
@@ -141,6 +147,7 @@ def getWin32OnlyIncludeString(include):
141147
'cl_khr_gl_event',
142148
'cl_khr_gl_msaa_sharing',
143149
'cl_khr_gl_sharing',
150+
'cl_intel_sharing_format_query_gl',
144151
},
145152
guard="OPENCL_CL_GL_H_",
146153
spec=spec,
@@ -160,7 +167,6 @@ def getWin32OnlyIncludeString(include):
160167
gen.write(
161168
cl_ext_h_template.render_unicode(
162169
genExtensions={'cl_loader_layers'},
163-
skipFunctions={},
164170
guard="OPENCL_CL_LAYER_H_",
165171
includes='#include <CL/cl_icd.h>',
166172
spec=spec,
@@ -177,7 +183,10 @@ def getWin32OnlyIncludeString(include):
177183
gen = open(args.directory + '/cl_va_api_media_sharing_intel.h', 'wb')
178184
gen.write(
179185
cl_ext_h_template.render_unicode(
180-
genExtensions={'cl_intel_va_api_media_sharing'},
186+
genExtensions={
187+
'cl_intel_va_api_media_sharing',
188+
'cl_intel_sharing_format_query_va_api',
189+
},
181190
guard="OPENCL_CL_VA_API_MEDIA_SHARING_INTEL_H_",
182191
includes='#include <va/va.h>',
183192
spec=spec,
@@ -195,7 +204,6 @@ def getWin32OnlyIncludeString(include):
195204
gen.write(
196205
cl_ext_h_template.render_unicode(
197206
genExtensions={},
198-
skipFunctions={},
199207
guard="OPENCL_CL_EXT_H_",
200208
spec=spec,
201209
typedefs=typedefs,

0 commit comments

Comments
 (0)