Refactor: move DebuggerL0 initialization to RootDeviceEnvironment

Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
This commit is contained in:
Mateusz Hoppe
2022-07-07 12:01:53 +00:00
committed by Compute-Runtime-Automation
parent ba0e3adcc0
commit 9a667308b9
5 changed files with 75 additions and 13 deletions

View File

@@ -168,20 +168,10 @@ void DriverHandleImp::updateRootDeviceBitFields(std::unique_ptr<NEO::Device> &ne
}
void DriverHandleImp::enableRootDeviceDebugger(std::unique_ptr<NEO::Device> &neoDevice) {
const auto rootDeviceIndex = neoDevice->getRootDeviceIndex();
auto rootDeviceEnvironment = neoDevice->getExecutionEnvironment()->rootDeviceEnvironments[rootDeviceIndex].get();
if (enableProgramDebugging) {
if (neoDevice->getDebugger() != nullptr) {
NEO::printDebugString(NEO::DebugManager.flags.PrintDebugMessages.get(), stderr,
"%s", "Source Level Debugger cannot be used with Environment Variable enabling program debugging.\n");
UNRECOVERABLE_IF(neoDevice->getDebugger() != nullptr && enableProgramDebugging);
}
rootDeviceEnvironment->getMutableHardwareInfo()->capabilityTable.fusedEuEnabled = false;
rootDeviceEnvironment->getMutableHardwareInfo()->capabilityTable.ftrRenderCompressedBuffers = false;
rootDeviceEnvironment->getMutableHardwareInfo()->capabilityTable.ftrRenderCompressedImages = false;
rootDeviceEnvironment->debugger = NEO::DebuggerL0::create(neoDevice.get());
const auto rootDeviceIndex = neoDevice->getRootDeviceIndex();
auto rootDeviceEnvironment = neoDevice->getExecutionEnvironment()->rootDeviceEnvironments[rootDeviceIndex].get();
rootDeviceEnvironment->initDebuggerL0(neoDevice.get());
}
}