mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-25 13:33:02 +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
@@ -202,11 +202,11 @@ void CommandQueue::initializeGpgpuInternals() const {
|
||||
auto &productHelper = device->getProductHelper();
|
||||
|
||||
if (device->getDevice().getDebugger() && !this->gpgpuEngine->commandStreamReceiver->getDebugSurfaceAllocation()) {
|
||||
auto maxDbgSurfaceSize = NEO::SipKernel::getSipKernel(device->getDevice()).getStateSaveAreaSize(&device->getDevice());
|
||||
auto maxDbgSurfaceSize = NEO::SipKernel::getSipKernel(device->getDevice(), nullptr).getStateSaveAreaSize(&device->getDevice());
|
||||
auto debugSurface = this->gpgpuEngine->commandStreamReceiver->allocateDebugSurface(maxDbgSurfaceSize);
|
||||
memset(debugSurface->getUnderlyingBuffer(), 0, debugSurface->getUnderlyingBufferSize());
|
||||
|
||||
auto &stateSaveAreaHeader = SipKernel::getSipKernel(device->getDevice()).getStateSaveAreaHeader();
|
||||
auto &stateSaveAreaHeader = SipKernel::getSipKernel(device->getDevice(), nullptr).getStateSaveAreaHeader();
|
||||
if (stateSaveAreaHeader.size() > 0) {
|
||||
NEO::MemoryTransferHelper::transferMemoryToAllocation(productHelper.isBlitCopyRequiredForLocalMemory(rootDeviceEnvironment, *debugSurface),
|
||||
device->getDevice(), debugSurface, 0, stateSaveAreaHeader.data(),
|
||||
|
||||
@@ -124,7 +124,7 @@ HWTEST_F(CommandQueueHwTest, WhenDebugSurfaceIsAllocatedThenBufferIsZeroed) {
|
||||
auto mem = dbgSurface->getUnderlyingBuffer();
|
||||
ASSERT_NE(nullptr, mem);
|
||||
|
||||
auto &stateSaveAreaHeader = SipKernel::getSipKernel(device->getDevice()).getStateSaveAreaHeader();
|
||||
auto &stateSaveAreaHeader = SipKernel::getSipKernel(device->getDevice(), nullptr).getStateSaveAreaHeader();
|
||||
mem = ptrOffset(mem, stateSaveAreaHeader.size());
|
||||
auto size = dbgSurface->getUnderlyingBufferSize() - stateSaveAreaHeader.size();
|
||||
EXPECT_TRUE(memoryZeroed(mem, size));
|
||||
@@ -155,7 +155,7 @@ HWTEST_F(CommandQueueHwTest, WhenConstructingCommandQueueDebugOnButIgcDoesNotRet
|
||||
auto dbgSurface = mockCmdQueueHw1.getGpgpuCommandStreamReceiver().getDebugSurfaceAllocation();
|
||||
EXPECT_NE(dbgSurface, nullptr);
|
||||
|
||||
auto &stateSaveAreaHeader = SipKernel::getSipKernel(device->getDevice()).getStateSaveAreaHeader();
|
||||
auto &stateSaveAreaHeader = SipKernel::getSipKernel(device->getDevice(), nullptr).getStateSaveAreaHeader();
|
||||
EXPECT_EQ(static_cast<size_t>(0), stateSaveAreaHeader.size());
|
||||
}
|
||||
|
||||
|
||||
@@ -200,7 +200,7 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, givenCsrInBatchingModeAndMidThread
|
||||
*pDevice);
|
||||
|
||||
auto cmdBuffer = mockedSubmissionsAggregator->peekCommandBuffers().peekHead();
|
||||
auto sipAllocation = SipKernel::getSipKernel(*pDevice).getSipAllocation();
|
||||
auto sipAllocation = SipKernel::getSipKernel(*pDevice, nullptr).getSipAllocation();
|
||||
bool found = false;
|
||||
for (auto allocation : cmdBuffer->surfaces) {
|
||||
if (allocation == sipAllocation) {
|
||||
@@ -232,7 +232,7 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, givenCsrInDefaultModeAndMidThreadP
|
||||
dispatchFlags,
|
||||
*pDevice);
|
||||
|
||||
auto sipAllocation = SipKernel::getSipKernel(*pDevice).getSipAllocation();
|
||||
auto sipAllocation = SipKernel::getSipKernel(*pDevice, nullptr).getSipAllocation();
|
||||
bool found = false;
|
||||
for (auto allocation : mockCsr->copyOfAllocations) {
|
||||
if (allocation == sipAllocation) {
|
||||
|
||||
@@ -167,7 +167,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, CommandStreamReceiverFlushTaskXeHPAndLaterTests, gi
|
||||
auto sipIterator = find<STATE_SIP *>(cmdList.begin(), cmdList.end());
|
||||
auto sipCmd = genCmdCast<STATE_SIP *>(*sipIterator);
|
||||
|
||||
auto sipAllocation = SipKernel::getSipKernel(*pDevice).getSipAllocation();
|
||||
auto sipAllocation = SipKernel::getSipKernel(*pDevice, nullptr).getSipAllocation();
|
||||
|
||||
EXPECT_EQ(sipAllocation->getGpuAddressToPatch(), sipCmd->getSystemInstructionPointer());
|
||||
}
|
||||
@@ -210,7 +210,7 @@ HWTEST2_F(CommandStreamReceiverFlushTaskXeHPAndLaterTests, givenProgramPipeContr
|
||||
auto sipIterator = find<STATE_SIP *>(cmdList.begin(), cmdList.end());
|
||||
auto sipCmd = genCmdCast<STATE_SIP *>(*sipIterator);
|
||||
|
||||
auto sipAllocation = SipKernel::getSipKernel(*pDevice).getSipAllocation();
|
||||
auto sipAllocation = SipKernel::getSipKernel(*pDevice, nullptr).getSipAllocation();
|
||||
|
||||
EXPECT_EQ(sipAllocation->getGpuAddressToPatch(), sipCmd->getSystemInstructionPointer());
|
||||
}
|
||||
@@ -259,7 +259,7 @@ HWTEST2_F(CommandStreamReceiverFlushTaskXeHPAndLaterTests, givenProgramExtendedP
|
||||
|
||||
auto cmdLRI = genCmdCast<MI_LOAD_REGISTER_IMM *>(*itorLRI);
|
||||
auto sipAddress = cmdLRI->getDataDword() & 0xfffffff8;
|
||||
auto sipAllocation = SipKernel::getSipKernel(*mockDevice).getSipAllocation();
|
||||
auto sipAllocation = SipKernel::getSipKernel(*mockDevice, nullptr).getSipAllocation();
|
||||
|
||||
EXPECT_EQ(sipAllocation->getGpuAddressToPatch(), sipAddress);
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ HWTEST_F(CommandStreamReceiverWithActiveDebuggerTest, givenCsrWithActiveDebugger
|
||||
dispatchFlags,
|
||||
baseDevice);
|
||||
|
||||
auto sipAllocation = SipKernel::getSipKernel(baseDevice).getSipAllocation();
|
||||
auto sipAllocation = SipKernel::getSipKernel(baseDevice, nullptr).getSipAllocation();
|
||||
bool found = false;
|
||||
for (auto allocation : mockCsr->copyOfAllocations) {
|
||||
if (allocation == sipAllocation) {
|
||||
@@ -87,7 +87,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, CommandStreamReceiverWithActiveDebuggerTest, givenCs
|
||||
dispatchFlags,
|
||||
baseDevice);
|
||||
|
||||
auto sipAllocation = SipKernel::getSipKernel(baseDevice).getSipAllocation();
|
||||
auto sipAllocation = SipKernel::getSipKernel(baseDevice, nullptr).getSipAllocation();
|
||||
|
||||
HardwareParse hwParser;
|
||||
hwParser.parseCommands<FamilyType>(preambleStream);
|
||||
@@ -150,7 +150,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, CommandStreamReceiverWithActiveDebuggerTest, givenCs
|
||||
dispatchFlags,
|
||||
baseDevice);
|
||||
|
||||
auto sipAllocation = SipKernel::getSipKernel(baseDevice).getSipAllocation();
|
||||
auto sipAllocation = SipKernel::getSipKernel(baseDevice, nullptr).getSipAllocation();
|
||||
|
||||
HardwareParse hwParser;
|
||||
hwParser.parseCommands<FamilyType>(preambleStream);
|
||||
|
||||
Reference in New Issue
Block a user