mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-11 16:45:25 +08:00
Refactor debugger code
- helper sets all SbaAddresses for debugger in EncodeStateBaseAddress<GfxFamily>::setSbaAddressesForDebugger() - change DebuggerL0::captureStateBaseAddress() to take LinearStream - move getSbaTrackingCommandsSize() to Debugger class Related-To: NEO-6845 Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
f3bcbfb305
commit
5911515ed0
@@ -43,6 +43,15 @@ void EncodeComputeMode<Family>::programComputeModeCommand(LinearStream &csr, Sta
|
||||
const HardwareInfo &hwInfo) {
|
||||
}
|
||||
|
||||
template <>
|
||||
void EncodeStateBaseAddress<Family>::setSbaAddressesForDebugger(NEO::Debugger::SbaAddresses &sbaAddress, const STATE_BASE_ADDRESS &sbaCmd) {
|
||||
sbaAddress.IndirectObjectBaseAddress = sbaCmd.getIndirectObjectBaseAddress();
|
||||
sbaAddress.DynamicStateBaseAddress = sbaCmd.getDynamicStateBaseAddress();
|
||||
sbaAddress.GeneralStateBaseAddress = sbaCmd.getGeneralStateBaseAddress();
|
||||
sbaAddress.InstructionBaseAddress = sbaCmd.getInstructionBaseAddress();
|
||||
sbaAddress.SurfaceStateBaseAddress = sbaCmd.getSurfaceStateBaseAddress();
|
||||
}
|
||||
|
||||
template struct EncodeDispatchKernel<Family>;
|
||||
template struct EncodeStates<Family>;
|
||||
template struct EncodeMath<Family>;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2018-2021 Intel Corporation
|
||||
* Copyright (C) 2018-2022 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -54,7 +54,8 @@ void PreambleHelper<BDWFamily>::programPipelineSelect(LinearStream *pCommandStre
|
||||
|
||||
template <>
|
||||
size_t PreambleHelper<BDWFamily>::getAdditionalCommandsSize(const Device &device) {
|
||||
return getKernelDebuggingCommandsSize(device.isDebuggerActive());
|
||||
bool debuggingEnabled = device.getDebugger() != nullptr || device.isDebuggerActive();
|
||||
return getKernelDebuggingCommandsSize(debuggingEnabled);
|
||||
}
|
||||
|
||||
template struct PreambleHelper<BDWFamily>;
|
||||
|
||||
Reference in New Issue
Block a user