mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 14:55:24 +08:00
feature: debug flag to disable DriverStore path enforcement
Resolves: NEO-8320 Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
db95855092
commit
9e89704624
@@ -33,6 +33,7 @@ const HKEY validHkey = reinterpret_cast<HKEY>(0);
|
||||
bool getNumThreadsCalled = false;
|
||||
bool mmapAllowExtendedPointers = false;
|
||||
bool pathExistsMock = false;
|
||||
const char *driverStorePath = nullptr;
|
||||
|
||||
bool pathExists(const std::string &path) {
|
||||
return pathExistsMock;
|
||||
@@ -127,6 +128,16 @@ LSTATUS regQueryValueExA(HKEY hKey, LPCSTR lpValueName, LPDWORD lpReserved, LPDW
|
||||
*reinterpret_cast<uint64_t *>(lpData) = regQueryValueExpectedData;
|
||||
}
|
||||
}
|
||||
} else if (driverStorePath && (strcmp(lpValueName, "DriverStorePathForComputeRuntime") == 0)) {
|
||||
if (lpData) {
|
||||
strcpy(reinterpret_cast<char *>(lpData), driverStorePath);
|
||||
}
|
||||
if (lpcbData) {
|
||||
*lpcbData = static_cast<DWORD>(strlen(driverStorePath) + 1u);
|
||||
if (lpType) {
|
||||
*lpType = REG_SZ;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user