@@ -345,52 +345,67 @@ ur_result_t ur_platform_handle_t_::initialize() {
345
345
// Check if mutable command list extension is supported and initialize
346
346
// function pointers.
347
347
if (MutableCommandListSpecExtensionSupported) {
348
+ #ifdef UR_STATIC_ADAPTER_LEVEL_ZERO
349
+ ZeMutableCmdListExt.zexCommandListGetNextCommandIdExp =
350
+ zeCommandListGetNextCommandIdExp;
351
+ ZeMutableCmdListExt.zexCommandListUpdateMutableCommandsExp =
352
+ zeCommandListUpdateMutableCommandsExp;
353
+ ZeMutableCmdListExt.zexCommandListUpdateMutableCommandSignalEventExp =
354
+ zeCommandListUpdateMutableCommandSignalEventExp;
355
+ ZeMutableCmdListExt.zexCommandListUpdateMutableCommandWaitEventsExp =
356
+ zeCommandListUpdateMutableCommandWaitEventsExp;
357
+ ZeMutableCmdListExt.zexCommandListUpdateMutableCommandKernelsExp =
358
+ zeCommandListUpdateMutableCommandKernelsExp;
359
+ ZeMutableCmdListExt.zexCommandListGetNextCommandIdWithKernelsExp =
360
+ zeCommandListGetNextCommandIdWithKernelsExp;
361
+ #else
348
362
ZeMutableCmdListExt.zexCommandListGetNextCommandIdExp =
349
363
(ze_pfnCommandListGetNextCommandIdExp_t)
350
364
ur_loader::LibLoader::getFunctionPtr (
351
365
GlobalAdapter->processHandle ,
352
366
" zeCommandListGetNextCommandIdExp" );
353
- ZeMutableCmdListExt.Supported |=
354
- ZeMutableCmdListExt.zexCommandListGetNextCommandIdExp != nullptr ;
355
367
ZeMutableCmdListExt.zexCommandListUpdateMutableCommandsExp =
356
368
(ze_pfnCommandListUpdateMutableCommandsExp_t)
357
369
ur_loader::LibLoader::getFunctionPtr (
358
370
GlobalAdapter->processHandle ,
359
371
" zeCommandListUpdateMutableCommandsExp" );
360
- ZeMutableCmdListExt.Supported |=
361
- ZeMutableCmdListExt.zexCommandListUpdateMutableCommandsExp != nullptr ;
362
372
ZeMutableCmdListExt.zexCommandListUpdateMutableCommandSignalEventExp =
363
373
(ze_pfnCommandListUpdateMutableCommandSignalEventExp_t)
364
374
ur_loader::LibLoader::getFunctionPtr (
365
375
GlobalAdapter->processHandle ,
366
376
" zeCommandListUpdateMutableCommandSignalEventExp" );
367
- ZeMutableCmdListExt.Supported |=
368
- ZeMutableCmdListExt.zexCommandListUpdateMutableCommandSignalEventExp !=
369
- nullptr ;
370
377
ZeMutableCmdListExt.zexCommandListUpdateMutableCommandWaitEventsExp =
371
378
(ze_pfnCommandListUpdateMutableCommandWaitEventsExp_t)
372
379
ur_loader::LibLoader::getFunctionPtr (
373
380
GlobalAdapter->processHandle ,
374
381
" zeCommandListUpdateMutableCommandWaitEventsExp" );
375
- ZeMutableCmdListExt.Supported |=
376
- ZeMutableCmdListExt.zexCommandListUpdateMutableCommandWaitEventsExp !=
377
- nullptr ;
378
382
ZeMutableCmdListExt.zexCommandListUpdateMutableCommandKernelsExp =
379
383
(ze_pfnCommandListUpdateMutableCommandKernelsExp_t)
380
384
ur_loader::LibLoader::getFunctionPtr (
381
385
GlobalAdapter->processHandle ,
382
386
" zeCommandListUpdateMutableCommandKernelsExp" );
383
- ZeMutableCmdListExt.Supported |=
384
- ZeMutableCmdListExt.zexCommandListUpdateMutableCommandKernelsExp !=
385
- nullptr ;
386
387
ZeMutableCmdListExt.zexCommandListGetNextCommandIdWithKernelsExp =
387
388
(ze_pfnCommandListGetNextCommandIdWithKernelsExp_t)
388
389
ur_loader::LibLoader::getFunctionPtr (
389
390
GlobalAdapter->processHandle ,
390
391
" zeCommandListGetNextCommandIdWithKernelsExp" );
392
+ #endif
393
+ ZeMutableCmdListExt.Supported |=
394
+ ZeMutableCmdListExt.zexCommandListGetNextCommandIdExp != nullptr ;
391
395
ZeMutableCmdListExt.Supported |=
392
396
ZeMutableCmdListExt.zexCommandListGetNextCommandIdWithKernelsExp !=
393
397
nullptr ;
398
+ ZeMutableCmdListExt.Supported |=
399
+ ZeMutableCmdListExt.zexCommandListUpdateMutableCommandKernelsExp !=
400
+ nullptr ;
401
+ ZeMutableCmdListExt.Supported |=
402
+ ZeMutableCmdListExt.zexCommandListUpdateMutableCommandWaitEventsExp !=
403
+ nullptr ;
404
+ ZeMutableCmdListExt.Supported |=
405
+ ZeMutableCmdListExt.zexCommandListUpdateMutableCommandSignalEventExp !=
406
+ nullptr ;
407
+ ZeMutableCmdListExt.Supported |=
408
+ ZeMutableCmdListExt.zexCommandListUpdateMutableCommandsExp != nullptr ;
394
409
ZeMutableCmdListExt.LoaderExtension = true ;
395
410
} else {
396
411
ZeMutableCmdListExt.Supported |=
0 commit comments