mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-05 09:09:04 +08:00
Refactor isDebuggerActive
- use it for SourceLevelDebugger only Change-Id: I130219a13d6baa1f72c5b35295afd6efa4bf37fa Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
This commit is contained in:
committed by
sys_ocldev
parent
523887019b
commit
ac3b65ba82
@@ -32,10 +32,10 @@ void PreemptionHelper::programCsrBaseAddress(LinearStream &preambleCmdStream, De
|
||||
template <typename GfxFamily>
|
||||
void PreemptionHelper::programStateSip(LinearStream &preambleCmdStream, Device &device) {
|
||||
using STATE_SIP = typename GfxFamily::STATE_SIP;
|
||||
bool debuggerActive = device.isDebuggerActive();
|
||||
bool debuggingEnabled = device.getDebugger() != nullptr || device.isDebuggerActive();
|
||||
bool isMidThreadPreemption = device.getPreemptionMode() == PreemptionMode::MidThread;
|
||||
|
||||
if (isMidThreadPreemption || debuggerActive) {
|
||||
if (isMidThreadPreemption || debuggingEnabled) {
|
||||
auto sipAllocation = SipKernel::getSipKernelAllocation(device);
|
||||
|
||||
auto sip = reinterpret_cast<STATE_SIP *>(preambleCmdStream.getSpace(sizeof(STATE_SIP)));
|
||||
@@ -84,8 +84,9 @@ template <typename GfxFamily>
|
||||
size_t PreemptionHelper::getRequiredStateSipCmdSize(const Device &device) {
|
||||
size_t size = 0;
|
||||
bool isMidThreadPreemption = device.getPreemptionMode() == PreemptionMode::MidThread;
|
||||
bool debuggingEnabled = device.getDebugger() != nullptr || device.isDebuggerActive();
|
||||
|
||||
if (isMidThreadPreemption || device.isDebuggerActive()) {
|
||||
if (isMidThreadPreemption || debuggingEnabled) {
|
||||
size += sizeof(typename GfxFamily::STATE_SIP);
|
||||
}
|
||||
return size;
|
||||
|
||||
Reference in New Issue
Block a user