mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 06:49:52 +08:00
fix(debugger): pass correct sipAllocation to makeResident
- sipAllocation for context must be resident in Offline mode Related-To: NEO-7630 Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
8516f7f6ef
commit
997b599168
@@ -4160,7 +4160,7 @@ HWTEST2_F(CommandStreamReceiverHwTest,
|
||||
|
||||
commandStreamReceiver.flushImmediateTask(commandStream, commandStream.getUsed(), immediateFlushTaskFlags, *pDevice);
|
||||
|
||||
auto sipAllocation = NEO::SipKernel::getSipKernel(*pDevice).getSipAllocation();
|
||||
auto sipAllocation = NEO::SipKernel::getSipKernel(*pDevice, nullptr).getSipAllocation();
|
||||
|
||||
EXPECT_TRUE(commandStreamReceiver.isMadeResident(sipAllocation));
|
||||
|
||||
@@ -4187,6 +4187,46 @@ HWTEST2_F(CommandStreamReceiverHwTest,
|
||||
EXPECT_TRUE(commandStreamReceiver.isMadeResident(sipAllocation));
|
||||
}
|
||||
|
||||
HWTEST2_F(CommandStreamReceiverHwTest,
|
||||
givenOfflineDebuggingModeWhenFlushTaskImmediateCalledThenCorrectContextSipIsResident,
|
||||
IsAtLeastXeHpCore) {
|
||||
using STATE_SIP = typename FamilyType::STATE_SIP;
|
||||
|
||||
pDevice->getExecutionEnvironment()->rootDeviceEnvironments[0]->initDebuggerL0(pDevice);
|
||||
pDevice->getExecutionEnvironment()->setDebuggingMode(DebuggingMode::Offline);
|
||||
|
||||
auto &commandStreamReceiver = pDevice->getUltCommandStreamReceiver<FamilyType>();
|
||||
commandStreamReceiver.storeMakeResidentAllocations = true;
|
||||
|
||||
EXPECT_FALSE(commandStreamReceiver.getSipSentFlag());
|
||||
commandStreamReceiver.setSipSentFlag(true);
|
||||
EXPECT_TRUE(commandStreamReceiver.getSipSentFlag());
|
||||
commandStreamReceiver.setSipSentFlag(false);
|
||||
EXPECT_FALSE(commandStreamReceiver.getSipSentFlag());
|
||||
|
||||
commandStreamReceiver.flushImmediateTask(commandStream, commandStream.getUsed(), immediateFlushTaskFlags, *pDevice);
|
||||
|
||||
auto sipAllocation = NEO::SipKernel::getSipKernel(*pDevice, &commandStreamReceiver.getOsContext()).getSipAllocation();
|
||||
|
||||
EXPECT_TRUE(commandStreamReceiver.isMadeResident(sipAllocation));
|
||||
|
||||
HardwareParse hwParserCsr;
|
||||
hwParserCsr.parseCommands<FamilyType>(commandStreamReceiver.commandStream, 0);
|
||||
auto stateSipCmd = hwParserCsr.getCommand<STATE_SIP>();
|
||||
ASSERT_NE(nullptr, stateSipCmd);
|
||||
EXPECT_EQ(sipAllocation->getGpuAddressToPatch(), stateSipCmd->getSystemInstructionPointer());
|
||||
|
||||
EXPECT_TRUE(commandStreamReceiver.getSipSentFlag());
|
||||
|
||||
commandStreamReceiver.flushImmediateTask(commandStream,
|
||||
commandStream.getUsed(),
|
||||
immediateFlushTaskFlags,
|
||||
*pDevice);
|
||||
|
||||
EXPECT_TRUE(commandStreamReceiver.getSipSentFlag());
|
||||
EXPECT_TRUE(commandStreamReceiver.isMadeResident(sipAllocation));
|
||||
}
|
||||
|
||||
HWCMDTEST_F(IGFX_XE_HP_CORE, CommandStreamReceiverHwTest, givenScratchSpaceSurfaceStateEnabledWhenRequiredScratchSpaceIsSetThenPerThreadScratchSizeIsAlignedNextPow2) {
|
||||
auto commandStreamReceiver = std::make_unique<MockCsrHw<FamilyType>>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
auto scratchController = static_cast<MockScratchSpaceControllerXeHPAndLater *>(commandStreamReceiver->getScratchSpaceController());
|
||||
|
||||
Reference in New Issue
Block a user