@@ -354,52 +354,67 @@ ur_result_t ur_platform_handle_t_::initialize() {
354
354
// Check if mutable command list extension is supported and initialize
355
355
// function pointers.
356
356
if (MutableCommandListSpecExtensionSupported) {
357
+ #ifdef UR_STATIC_LEVEL_ZERO
358
+ ZeMutableCmdListExt.zexCommandListGetNextCommandIdExp =
359
+ zeCommandListGetNextCommandIdExp;
360
+ ZeMutableCmdListExt.zexCommandListUpdateMutableCommandsExp =
361
+ zeCommandListUpdateMutableCommandsExp;
362
+ ZeMutableCmdListExt.zexCommandListUpdateMutableCommandSignalEventExp =
363
+ zeCommandListUpdateMutableCommandSignalEventExp;
364
+ ZeMutableCmdListExt.zexCommandListUpdateMutableCommandWaitEventsExp =
365
+ zeCommandListUpdateMutableCommandWaitEventsExp;
366
+ ZeMutableCmdListExt.zexCommandListUpdateMutableCommandKernelsExp =
367
+ zeCommandListUpdateMutableCommandKernelsExp;
368
+ ZeMutableCmdListExt.zexCommandListGetNextCommandIdWithKernelsExp =
369
+ zeCommandListGetNextCommandIdWithKernelsExp;
370
+ #else
357
371
ZeMutableCmdListExt.zexCommandListGetNextCommandIdExp =
358
372
(ze_pfnCommandListGetNextCommandIdExp_t)
359
373
ur_loader::LibLoader::getFunctionPtr (
360
374
GlobalAdapter->processHandle ,
361
375
" zeCommandListGetNextCommandIdExp" );
362
- ZeMutableCmdListExt.Supported |=
363
- ZeMutableCmdListExt.zexCommandListGetNextCommandIdExp != nullptr ;
364
376
ZeMutableCmdListExt.zexCommandListUpdateMutableCommandsExp =
365
377
(ze_pfnCommandListUpdateMutableCommandsExp_t)
366
378
ur_loader::LibLoader::getFunctionPtr (
367
379
GlobalAdapter->processHandle ,
368
380
" zeCommandListUpdateMutableCommandsExp" );
369
- ZeMutableCmdListExt.Supported |=
370
- ZeMutableCmdListExt.zexCommandListUpdateMutableCommandsExp != nullptr ;
371
381
ZeMutableCmdListExt.zexCommandListUpdateMutableCommandSignalEventExp =
372
382
(ze_pfnCommandListUpdateMutableCommandSignalEventExp_t)
373
383
ur_loader::LibLoader::getFunctionPtr (
374
384
GlobalAdapter->processHandle ,
375
385
" zeCommandListUpdateMutableCommandSignalEventExp" );
376
- ZeMutableCmdListExt.Supported |=
377
- ZeMutableCmdListExt.zexCommandListUpdateMutableCommandSignalEventExp !=
378
- nullptr ;
379
386
ZeMutableCmdListExt.zexCommandListUpdateMutableCommandWaitEventsExp =
380
387
(ze_pfnCommandListUpdateMutableCommandWaitEventsExp_t)
381
388
ur_loader::LibLoader::getFunctionPtr (
382
389
GlobalAdapter->processHandle ,
383
390
" zeCommandListUpdateMutableCommandWaitEventsExp" );
384
- ZeMutableCmdListExt.Supported |=
385
- ZeMutableCmdListExt.zexCommandListUpdateMutableCommandWaitEventsExp !=
386
- nullptr ;
387
391
ZeMutableCmdListExt.zexCommandListUpdateMutableCommandKernelsExp =
388
392
(ze_pfnCommandListUpdateMutableCommandKernelsExp_t)
389
393
ur_loader::LibLoader::getFunctionPtr (
390
394
GlobalAdapter->processHandle ,
391
395
" zeCommandListUpdateMutableCommandKernelsExp" );
392
- ZeMutableCmdListExt.Supported |=
393
- ZeMutableCmdListExt.zexCommandListUpdateMutableCommandKernelsExp !=
394
- nullptr ;
395
396
ZeMutableCmdListExt.zexCommandListGetNextCommandIdWithKernelsExp =
396
397
(ze_pfnCommandListGetNextCommandIdWithKernelsExp_t)
397
398
ur_loader::LibLoader::getFunctionPtr (
398
399
GlobalAdapter->processHandle ,
399
400
" zeCommandListGetNextCommandIdWithKernelsExp" );
401
+ #endif
402
+ ZeMutableCmdListExt.Supported |=
403
+ ZeMutableCmdListExt.zexCommandListGetNextCommandIdExp != nullptr ;
400
404
ZeMutableCmdListExt.Supported |=
401
405
ZeMutableCmdListExt.zexCommandListGetNextCommandIdWithKernelsExp !=
402
406
nullptr ;
407
+ ZeMutableCmdListExt.Supported |=
408
+ ZeMutableCmdListExt.zexCommandListUpdateMutableCommandKernelsExp !=
409
+ nullptr ;
410
+ ZeMutableCmdListExt.Supported |=
411
+ ZeMutableCmdListExt.zexCommandListUpdateMutableCommandWaitEventsExp !=
412
+ nullptr ;
413
+ ZeMutableCmdListExt.Supported |=
414
+ ZeMutableCmdListExt.zexCommandListUpdateMutableCommandSignalEventExp !=
415
+ nullptr ;
416
+ ZeMutableCmdListExt.Supported |=
417
+ ZeMutableCmdListExt.zexCommandListUpdateMutableCommandsExp != nullptr ;
403
418
ZeMutableCmdListExt.LoaderExtension = true ;
404
419
} else {
405
420
ZeMutableCmdListExt.Supported |=
@@ -455,12 +470,18 @@ ur_result_t ur_platform_handle_t_::initialize() {
455
470
// Check if ImmediateAppendCommandList is supported and initialize the
456
471
// function pointer.
457
472
if (ZeImmediateCommandListAppendExtensionFound) {
473
+ #ifdef UR_STATIC_LEVEL_ZERO
474
+ ZeCommandListImmediateAppendExt
475
+ .zeCommandListImmediateAppendCommandListsExp =
476
+ zeCommandListImmediateAppendCommandListsExp;
477
+ #else
458
478
ZeCommandListImmediateAppendExt
459
479
.zeCommandListImmediateAppendCommandListsExp =
460
480
(ze_pfnCommandListImmediateAppendCommandListsExp_t)
461
481
ur_loader::LibLoader::getFunctionPtr (
462
482
GlobalAdapter->processHandle ,
463
483
" zeCommandListImmediateAppendCommandListsExp" );
484
+ #endif
464
485
ZeCommandListImmediateAppendExt.Supported =
465
486
ZeCommandListImmediateAppendExt
466
487
.zeCommandListImmediateAppendCommandListsExp != nullptr ;
0 commit comments