Add flag to switch host ptr validation

Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
This commit is contained in:
Lukasz Jobczyk
2021-08-03 14:10:30 +00:00
committed by Compute-Runtime-Automation
parent 7b52f587da
commit 1ddc83d0d5
5 changed files with 29 additions and 5 deletions

View File

@@ -1023,9 +1023,15 @@ void DrmMemoryManager::registerAllocationInOs(GraphicsAllocation *allocation) {
}
std::unique_ptr<MemoryManager> DrmMemoryManager::create(ExecutionEnvironment &executionEnvironment) {
bool validateHostPtr = true;
if (DebugManager.flags.EnableHostPtrValidation.get() != -1) {
validateHostPtr = DebugManager.flags.EnableHostPtrValidation.get();
}
return std::make_unique<DrmMemoryManager>(gemCloseWorkerMode::gemCloseWorkerActive,
DebugManager.flags.EnableForcePin.get(),
true,
validateHostPtr,
executionEnvironment);
}