mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-24 04:12:57 +08:00
- OCL and L0 can share this method Change-Id: Ice9488281a5c2a26ea09310319243880a6aa0682 Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
27 lines
908 B
C++
27 lines
908 B
C++
/*
|
|
* Copyright (C) 2020 Intel Corporation
|
|
*
|
|
* SPDX-License-Identifier: MIT
|
|
*
|
|
*/
|
|
|
|
#include "shared/source/debugger/debugger.h"
|
|
|
|
#include "shared/source/built_ins/sip.h"
|
|
#include "shared/source/built_ins/sip_kernel_type.h"
|
|
#include "shared/source/helpers/hw_info.h"
|
|
#include "shared/source/source_level_debugger/source_level_debugger.h"
|
|
|
|
namespace NEO {
|
|
std::unique_ptr<Debugger> Debugger::create(HardwareInfo *hwInfo) {
|
|
std::unique_ptr<SourceLevelDebugger> sourceLevelDebugger;
|
|
if (hwInfo->capabilityTable.debuggerSupported) {
|
|
sourceLevelDebugger.reset(SourceLevelDebugger::create());
|
|
}
|
|
if (sourceLevelDebugger) {
|
|
bool localMemorySipAvailable = (SipKernelType::DbgCsrLocal == SipKernel::getSipKernelType(hwInfo->platform.eRenderCoreFamily, true));
|
|
sourceLevelDebugger->initialize(localMemorySipAvailable);
|
|
}
|
|
return sourceLevelDebugger;
|
|
}
|
|
} // namespace NEO
|