Skip to content

Commit 2bb5c6e

Browse files
committed
update extension loader for command buffer API changes
1 parent 63495fe commit 2bb5c6e

File tree

2 files changed

+52
-16
lines changed

2 files changed

+52
-16
lines changed

src/openclext.cpp

Lines changed: 41 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,7 @@ typedef cl_int (CL_API_CALL* clEnqueueCommandBufferKHR_clextfn)(
205205
typedef cl_int (CL_API_CALL* clCommandBarrierWithWaitListKHR_clextfn)(
206206
cl_command_buffer_khr command_buffer,
207207
cl_command_queue command_queue,
208+
const cl_command_properties_khr* properties,
208209
cl_uint num_sync_points_in_wait_list,
209210
const cl_sync_point_khr* sync_point_wait_list,
210211
cl_sync_point_khr* sync_point,
@@ -213,6 +214,7 @@ typedef cl_int (CL_API_CALL* clCommandBarrierWithWaitListKHR_clextfn)(
213214
typedef cl_int (CL_API_CALL* clCommandCopyBufferKHR_clextfn)(
214215
cl_command_buffer_khr command_buffer,
215216
cl_command_queue command_queue,
217+
const cl_command_properties_khr* properties,
216218
cl_mem src_buffer,
217219
cl_mem dst_buffer,
218220
size_t src_offset,
@@ -226,6 +228,7 @@ typedef cl_int (CL_API_CALL* clCommandCopyBufferKHR_clextfn)(
226228
typedef cl_int (CL_API_CALL* clCommandCopyBufferRectKHR_clextfn)(
227229
cl_command_buffer_khr command_buffer,
228230
cl_command_queue command_queue,
231+
const cl_command_properties_khr* properties,
229232
cl_mem src_buffer,
230233
cl_mem dst_buffer,
231234
const size_t* src_origin,
@@ -243,6 +246,7 @@ typedef cl_int (CL_API_CALL* clCommandCopyBufferRectKHR_clextfn)(
243246
typedef cl_int (CL_API_CALL* clCommandCopyBufferToImageKHR_clextfn)(
244247
cl_command_buffer_khr command_buffer,
245248
cl_command_queue command_queue,
249+
const cl_command_properties_khr* properties,
246250
cl_mem src_buffer,
247251
cl_mem dst_image,
248252
size_t src_offset,
@@ -256,6 +260,7 @@ typedef cl_int (CL_API_CALL* clCommandCopyBufferToImageKHR_clextfn)(
256260
typedef cl_int (CL_API_CALL* clCommandCopyImageKHR_clextfn)(
257261
cl_command_buffer_khr command_buffer,
258262
cl_command_queue command_queue,
263+
const cl_command_properties_khr* properties,
259264
cl_mem src_image,
260265
cl_mem dst_image,
261266
const size_t* src_origin,
@@ -269,6 +274,7 @@ typedef cl_int (CL_API_CALL* clCommandCopyImageKHR_clextfn)(
269274
typedef cl_int (CL_API_CALL* clCommandCopyImageToBufferKHR_clextfn)(
270275
cl_command_buffer_khr command_buffer,
271276
cl_command_queue command_queue,
277+
const cl_command_properties_khr* properties,
272278
cl_mem src_image,
273279
cl_mem dst_buffer,
274280
const size_t* src_origin,
@@ -282,6 +288,7 @@ typedef cl_int (CL_API_CALL* clCommandCopyImageToBufferKHR_clextfn)(
282288
typedef cl_int (CL_API_CALL* clCommandFillBufferKHR_clextfn)(
283289
cl_command_buffer_khr command_buffer,
284290
cl_command_queue command_queue,
291+
const cl_command_properties_khr* properties,
285292
cl_mem buffer,
286293
const void* pattern,
287294
size_t pattern_size,
@@ -295,6 +302,7 @@ typedef cl_int (CL_API_CALL* clCommandFillBufferKHR_clextfn)(
295302
typedef cl_int (CL_API_CALL* clCommandFillImageKHR_clextfn)(
296303
cl_command_buffer_khr command_buffer,
297304
cl_command_queue command_queue,
305+
const cl_command_properties_khr* properties,
298306
cl_mem image,
299307
const void* fill_color,
300308
const size_t* origin,
@@ -307,7 +315,7 @@ typedef cl_int (CL_API_CALL* clCommandFillImageKHR_clextfn)(
307315
typedef cl_int (CL_API_CALL* clCommandNDRangeKernelKHR_clextfn)(
308316
cl_command_buffer_khr command_buffer,
309317
cl_command_queue command_queue,
310-
const cl_ndrange_kernel_command_properties_khr* properties,
318+
const cl_command_properties_khr* properties,
311319
cl_kernel kernel,
312320
cl_uint work_dim,
313321
const size_t* global_work_offset,
@@ -328,6 +336,7 @@ typedef cl_int (CL_API_CALL* clGetCommandBufferInfoKHR_clextfn)(
328336
typedef cl_int (CL_API_CALL* clCommandSVMMemcpyKHR_clextfn)(
329337
cl_command_buffer_khr command_buffer,
330338
cl_command_queue command_queue,
339+
const cl_command_properties_khr* properties,
331340
void* dst_ptr,
332341
const void* src_ptr,
333342
size_t size,
@@ -339,6 +348,7 @@ typedef cl_int (CL_API_CALL* clCommandSVMMemcpyKHR_clextfn)(
339348
typedef cl_int (CL_API_CALL* clCommandSVMMemFillKHR_clextfn)(
340349
cl_command_buffer_khr command_buffer,
341350
cl_command_queue command_queue,
351+
const cl_command_properties_khr* properties,
342352
void* svm_ptr,
343353
const void* pattern,
344354
size_t pattern_size,
@@ -372,7 +382,9 @@ typedef cl_command_buffer_khr (CL_API_CALL* clRemapCommandBufferKHR_clextfn)(
372382

373383
typedef cl_int (CL_API_CALL* clUpdateMutableCommandsKHR_clextfn)(
374384
cl_command_buffer_khr command_buffer,
375-
const cl_mutable_base_config_khr* mutable_config);
385+
cl_uint num_configs,
386+
const cl_command_buffer_update_type_khr* config_types,
387+
const void** configs);
376388

377389
typedef cl_int (CL_API_CALL* clGetMutableCommandInfoKHR_clextfn)(
378390
cl_mutable_command_khr command,
@@ -2176,6 +2188,7 @@ cl_int CL_API_CALL clEnqueueCommandBufferKHR(
21762188
cl_int CL_API_CALL clCommandBarrierWithWaitListKHR(
21772189
cl_command_buffer_khr command_buffer,
21782190
cl_command_queue command_queue,
2191+
const cl_command_properties_khr* properties,
21792192
cl_uint num_sync_points_in_wait_list,
21802193
const cl_sync_point_khr* sync_point_wait_list,
21812194
cl_sync_point_khr* sync_point,
@@ -2188,6 +2201,7 @@ cl_int CL_API_CALL clCommandBarrierWithWaitListKHR(
21882201
return dispatch_ptr->clCommandBarrierWithWaitListKHR(
21892202
command_buffer,
21902203
command_queue,
2204+
properties,
21912205
num_sync_points_in_wait_list,
21922206
sync_point_wait_list,
21932207
sync_point,
@@ -2197,6 +2211,7 @@ cl_int CL_API_CALL clCommandBarrierWithWaitListKHR(
21972211
cl_int CL_API_CALL clCommandCopyBufferKHR(
21982212
cl_command_buffer_khr command_buffer,
21992213
cl_command_queue command_queue,
2214+
const cl_command_properties_khr* properties,
22002215
cl_mem src_buffer,
22012216
cl_mem dst_buffer,
22022217
size_t src_offset,
@@ -2214,6 +2229,7 @@ cl_int CL_API_CALL clCommandCopyBufferKHR(
22142229
return dispatch_ptr->clCommandCopyBufferKHR(
22152230
command_buffer,
22162231
command_queue,
2232+
properties,
22172233
src_buffer,
22182234
dst_buffer,
22192235
src_offset,
@@ -2228,6 +2244,7 @@ cl_int CL_API_CALL clCommandCopyBufferKHR(
22282244
cl_int CL_API_CALL clCommandCopyBufferRectKHR(
22292245
cl_command_buffer_khr command_buffer,
22302246
cl_command_queue command_queue,
2247+
const cl_command_properties_khr* properties,
22312248
cl_mem src_buffer,
22322249
cl_mem dst_buffer,
22332250
const size_t* src_origin,
@@ -2249,6 +2266,7 @@ cl_int CL_API_CALL clCommandCopyBufferRectKHR(
22492266
return dispatch_ptr->clCommandCopyBufferRectKHR(
22502267
command_buffer,
22512268
command_queue,
2269+
properties,
22522270
src_buffer,
22532271
dst_buffer,
22542272
src_origin,
@@ -2267,6 +2285,7 @@ cl_int CL_API_CALL clCommandCopyBufferRectKHR(
22672285
cl_int CL_API_CALL clCommandCopyBufferToImageKHR(
22682286
cl_command_buffer_khr command_buffer,
22692287
cl_command_queue command_queue,
2288+
const cl_command_properties_khr* properties,
22702289
cl_mem src_buffer,
22712290
cl_mem dst_image,
22722291
size_t src_offset,
@@ -2284,6 +2303,7 @@ cl_int CL_API_CALL clCommandCopyBufferToImageKHR(
22842303
return dispatch_ptr->clCommandCopyBufferToImageKHR(
22852304
command_buffer,
22862305
command_queue,
2306+
properties,
22872307
src_buffer,
22882308
dst_image,
22892309
src_offset,
@@ -2298,6 +2318,7 @@ cl_int CL_API_CALL clCommandCopyBufferToImageKHR(
22982318
cl_int CL_API_CALL clCommandCopyImageKHR(
22992319
cl_command_buffer_khr command_buffer,
23002320
cl_command_queue command_queue,
2321+
const cl_command_properties_khr* properties,
23012322
cl_mem src_image,
23022323
cl_mem dst_image,
23032324
const size_t* src_origin,
@@ -2315,6 +2336,7 @@ cl_int CL_API_CALL clCommandCopyImageKHR(
23152336
return dispatch_ptr->clCommandCopyImageKHR(
23162337
command_buffer,
23172338
command_queue,
2339+
properties,
23182340
src_image,
23192341
dst_image,
23202342
src_origin,
@@ -2329,6 +2351,7 @@ cl_int CL_API_CALL clCommandCopyImageKHR(
23292351
cl_int CL_API_CALL clCommandCopyImageToBufferKHR(
23302352
cl_command_buffer_khr command_buffer,
23312353
cl_command_queue command_queue,
2354+
const cl_command_properties_khr* properties,
23322355
cl_mem src_image,
23332356
cl_mem dst_buffer,
23342357
const size_t* src_origin,
@@ -2346,6 +2369,7 @@ cl_int CL_API_CALL clCommandCopyImageToBufferKHR(
23462369
return dispatch_ptr->clCommandCopyImageToBufferKHR(
23472370
command_buffer,
23482371
command_queue,
2372+
properties,
23492373
src_image,
23502374
dst_buffer,
23512375
src_origin,
@@ -2360,6 +2384,7 @@ cl_int CL_API_CALL clCommandCopyImageToBufferKHR(
23602384
cl_int CL_API_CALL clCommandFillBufferKHR(
23612385
cl_command_buffer_khr command_buffer,
23622386
cl_command_queue command_queue,
2387+
const cl_command_properties_khr* properties,
23632388
cl_mem buffer,
23642389
const void* pattern,
23652390
size_t pattern_size,
@@ -2377,6 +2402,7 @@ cl_int CL_API_CALL clCommandFillBufferKHR(
23772402
return dispatch_ptr->clCommandFillBufferKHR(
23782403
command_buffer,
23792404
command_queue,
2405+
properties,
23802406
buffer,
23812407
pattern,
23822408
pattern_size,
@@ -2391,6 +2417,7 @@ cl_int CL_API_CALL clCommandFillBufferKHR(
23912417
cl_int CL_API_CALL clCommandFillImageKHR(
23922418
cl_command_buffer_khr command_buffer,
23932419
cl_command_queue command_queue,
2420+
const cl_command_properties_khr* properties,
23942421
cl_mem image,
23952422
const void* fill_color,
23962423
const size_t* origin,
@@ -2407,6 +2434,7 @@ cl_int CL_API_CALL clCommandFillImageKHR(
24072434
return dispatch_ptr->clCommandFillImageKHR(
24082435
command_buffer,
24092436
command_queue,
2437+
properties,
24102438
image,
24112439
fill_color,
24122440
origin,
@@ -2420,7 +2448,7 @@ cl_int CL_API_CALL clCommandFillImageKHR(
24202448
cl_int CL_API_CALL clCommandNDRangeKernelKHR(
24212449
cl_command_buffer_khr command_buffer,
24222450
cl_command_queue command_queue,
2423-
const cl_ndrange_kernel_command_properties_khr* properties,
2451+
const cl_command_properties_khr* properties,
24242452
cl_kernel kernel,
24252453
cl_uint work_dim,
24262454
const size_t* global_work_offset,
@@ -2472,6 +2500,7 @@ cl_int CL_API_CALL clGetCommandBufferInfoKHR(
24722500
cl_int CL_API_CALL clCommandSVMMemcpyKHR(
24732501
cl_command_buffer_khr command_buffer,
24742502
cl_command_queue command_queue,
2503+
const cl_command_properties_khr* properties,
24752504
void* dst_ptr,
24762505
const void* src_ptr,
24772506
size_t size,
@@ -2487,6 +2516,7 @@ cl_int CL_API_CALL clCommandSVMMemcpyKHR(
24872516
return dispatch_ptr->clCommandSVMMemcpyKHR(
24882517
command_buffer,
24892518
command_queue,
2519+
properties,
24902520
dst_ptr,
24912521
src_ptr,
24922522
size,
@@ -2499,6 +2529,7 @@ cl_int CL_API_CALL clCommandSVMMemcpyKHR(
24992529
cl_int CL_API_CALL clCommandSVMMemFillKHR(
25002530
cl_command_buffer_khr command_buffer,
25012531
cl_command_queue command_queue,
2532+
const cl_command_properties_khr* properties,
25022533
void* svm_ptr,
25032534
const void* pattern,
25042535
size_t pattern_size,
@@ -2515,6 +2546,7 @@ cl_int CL_API_CALL clCommandSVMMemFillKHR(
25152546
return dispatch_ptr->clCommandSVMMemFillKHR(
25162547
command_buffer,
25172548
command_queue,
2549+
properties,
25182550
svm_ptr,
25192551
pattern,
25202552
pattern_size,
@@ -2561,15 +2593,19 @@ cl_command_buffer_khr CL_API_CALL clRemapCommandBufferKHR(
25612593

25622594
cl_int CL_API_CALL clUpdateMutableCommandsKHR(
25632595
cl_command_buffer_khr command_buffer,
2564-
const cl_mutable_base_config_khr* mutable_config)
2596+
cl_uint num_configs,
2597+
const cl_command_buffer_update_type_khr* config_types,
2598+
const void** configs)
25652599
{
25662600
struct openclext_dispatch_table* dispatch_ptr = _get_dispatch(command_buffer);
25672601
if (dispatch_ptr == nullptr || dispatch_ptr->clUpdateMutableCommandsKHR == nullptr) {
25682602
return CL_INVALID_OPERATION;
25692603
}
25702604
return dispatch_ptr->clUpdateMutableCommandsKHR(
25712605
command_buffer,
2572-
mutable_config);
2606+
num_configs,
2607+
config_types,
2608+
configs);
25732609
}
25742610

25752611
cl_int CL_API_CALL clGetMutableCommandInfoKHR(

tests/call_all.c

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -54,29 +54,29 @@ void call_all(void)
5454
clRetainCommandBufferKHR(NULL);
5555
clReleaseCommandBufferKHR(NULL);
5656
clEnqueueCommandBufferKHR(0, NULL, NULL, 0, NULL, NULL);
57-
clCommandBarrierWithWaitListKHR(NULL, NULL, 0, NULL, NULL, NULL);
58-
clCommandCopyBufferKHR(NULL, NULL, NULL, NULL, 0, 0, 0, 0, NULL, NULL, NULL);
59-
clCommandCopyBufferRectKHR(NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0, NULL, NULL, NULL);
60-
clCommandCopyBufferToImageKHR(NULL, NULL, NULL, NULL, 0, NULL, NULL, 0, NULL, NULL, NULL);
61-
clCommandCopyImageKHR(NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL);
62-
clCommandCopyImageToBufferKHR(NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, NULL, NULL, NULL);
63-
clCommandFillBufferKHR(NULL, NULL, NULL, NULL, 0, 0, 0, 0, NULL, NULL, NULL);
64-
clCommandFillImageKHR(NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL);
57+
clCommandBarrierWithWaitListKHR(NULL, NULL, NULL, 0, NULL, NULL, NULL);
58+
clCommandCopyBufferKHR(NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, NULL, NULL, NULL);
59+
clCommandCopyBufferRectKHR(NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0, NULL, NULL, NULL);
60+
clCommandCopyBufferToImageKHR(NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL, 0, NULL, NULL, NULL);
61+
clCommandCopyImageKHR(NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL);
62+
clCommandCopyImageToBufferKHR(NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, NULL, NULL, NULL);
63+
clCommandFillBufferKHR(NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, NULL, NULL, NULL);
64+
clCommandFillImageKHR(NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL);
6565
clCommandNDRangeKernelKHR(NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, 0, NULL, NULL, NULL);
6666
clGetCommandBufferInfoKHR(NULL, CL_COMMAND_BUFFER_REFERENCE_COUNT_KHR, 0, NULL, NULL);
6767
#endif // cl_khr_command_buffer
6868

6969
#ifdef cl_khr_command_buffer
70-
clCommandSVMMemcpyKHR(NULL, NULL, NULL, NULL, 0, 0, NULL, NULL, NULL);
71-
clCommandSVMMemFillKHR(NULL, NULL, NULL, NULL, 0, 0, 0, NULL, NULL, NULL);
70+
clCommandSVMMemcpyKHR(NULL, NULL, NULL, NULL, NULL, 0, 0, NULL, NULL, NULL);
71+
clCommandSVMMemFillKHR(NULL, NULL, NULL, NULL, NULL, 0, 0, 0, NULL, NULL, NULL);
7272
#endif // cl_khr_command_buffer
7373

7474
#ifdef cl_khr_command_buffer_multi_device
7575
clRemapCommandBufferKHR(NULL, CL_FALSE, 0, NULL, 0, NULL, NULL, NULL);
7676
#endif // cl_khr_command_buffer_multi_device
7777

7878
#ifdef cl_khr_command_buffer_mutable_dispatch
79-
clUpdateMutableCommandsKHR(NULL, NULL);
79+
clUpdateMutableCommandsKHR(NULL, 0, NULL, NULL);
8080
clGetMutableCommandInfoKHR(NULL, CL_MUTABLE_COMMAND_COMMAND_BUFFER_KHR, 0, NULL, NULL);
8181
#endif // cl_khr_command_buffer_mutable_dispatch
8282

0 commit comments

Comments
 (0)