mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 14:55:24 +08:00
fix: correct loading L0 loader functions
on Windows use getModuleHandleA with proper module name don't load ze_loader.dll from file system Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
deb27d0363
commit
9c7b3c5e19
@@ -19,7 +19,9 @@ decltype(&zelLoaderTranslateHandle) loaderTranslateHandleFunc = nullptr;
|
||||
decltype(&zelSetDriverTeardown) setDriverTeardownFunc = nullptr;
|
||||
|
||||
void globalDriverSetup() {
|
||||
std::unique_ptr<NEO::OsLibrary> loaderLibrary = std::unique_ptr<NEO::OsLibrary>{NEO::OsLibrary::loadFunc("")};
|
||||
NEO::OsLibraryCreateProperties loaderLibraryProperties("ze_loader.dll");
|
||||
loaderLibraryProperties.performSelfLoad = true;
|
||||
std::unique_ptr<NEO::OsLibrary> loaderLibrary = std::unique_ptr<NEO::OsLibrary>{NEO::OsLibrary::loadFunc(loaderLibraryProperties)};
|
||||
loaderTranslateHandleFunc = reinterpret_cast<decltype(&zelLoaderTranslateHandle)>(loaderLibrary->getProcAddress("zelLoaderTranslateHandle"));
|
||||
setDriverTeardownFunc = reinterpret_cast<decltype(&zelSetDriverTeardown)>(loaderLibrary->getProcAddress("zelSetDriverTeardown"));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user