From 49bac5297a7757b7fd790df8ba6b0e9b49821866 Mon Sep 17 00:00:00 2001 From: "Neil R. Spruit" Date: Tue, 27 Aug 2024 18:39:11 -0700 Subject: [PATCH] Avoid DDI table reinit if ZE_ENABLE_LOADER_INTERCEPT=1 Signed-off-by: Neil R. Spruit --- source/loader/ze_loader.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/loader/ze_loader.cpp b/source/loader/ze_loader.cpp index 77ec7cd3..055b8612 100644 --- a/source/loader/ze_loader.cpp +++ b/source/loader/ze_loader.cpp @@ -152,7 +152,8 @@ namespace loader } it = drivers->erase(it); // If the number of drivers is now ==1, then we need to reinit the ddi tables to pass through. - if (drivers->size() == 1) { + // If ZE_ENABLE_LOADER_INTERCEPT is set to 1, then even if drivers were removed, don't reinit the ddi tables. + if (drivers->size() == 1 && !loader::context->forceIntercept) { *requireDdiReinit = true; } if(return_first_driver_result)