Add missing makeResident call on debug surface.

Change-Id: I9c2d1bcf608dbfc71a3859b237e249d41810c153
This commit is contained in:
Mrozek, Michal
2018-11-15 16:08:22 +01:00
committed by sys_ocldev
parent a49b1950eb
commit b102f8556e
2 changed files with 6 additions and 1 deletions

View File

@@ -394,6 +394,9 @@ CompletionStamp CommandStreamReceiverHw<GfxFamily>::flushTask(
if (dispatchFlags.preemptionMode == PreemptionMode::MidThread || device.isSourceLevelDebuggerActive()) {
auto sipType = SipKernel::getSipKernelType(device.getHardwareInfo().pPlatform->eRenderCoreFamily, device.isSourceLevelDebuggerActive());
makeResident(*device.getExecutionEnvironment()->getBuiltIns()->getSipKernel(sipType, device).getSipAllocation());
if (debugSurface) {
makeResident(*debugSurface);
}
}
if (experimentalCmdBuffer.get() != nullptr) {

View File

@@ -33,6 +33,7 @@ class EnqueueDebugKernelTest : public ProgramSimpleFixture,
pDevice->executionEnvironment->sourceLevelDebugger.reset(new SourceLevelDebugger(nullptr));
if (pDevice->getHardwareInfo().pPlatform->eRenderCoreFamily >= IGFX_GEN9_CORE) {
pDevice->getMutableDeviceInfo()->sourceLevelDebuggerActive = true;
std::string filename;
std::string kernelOption(CompilerOptions::debugKernelEnable);
KernelFilenameHelper::getKernelFilenameFromInternalOption(kernelOption, filename);
@@ -85,7 +86,7 @@ class EnqueueDebugKernelTest : public ProgramSimpleFixture,
};
HWTEST_F(EnqueueDebugKernelTest, givenDebugKernelWhenEnqueuedThenSSHAndBtiAreCorrectlySet) {
if (pDevice->getHardwareInfo().pPlatform->eRenderCoreFamily >= IGFX_GEN9_CORE) {
if (pDevice->isSourceLevelDebuggerActive()) {
using BINDING_TABLE_STATE = typename FamilyType::BINDING_TABLE_STATE;
using RENDER_SURFACE_STATE = typename FamilyType::RENDER_SURFACE_STATE;
std::unique_ptr<MockCommandQueueHw<FamilyType>> mockCmdQ(new MockCommandQueueHw<FamilyType>(&context, pDevice, 0));
@@ -103,6 +104,7 @@ HWTEST_F(EnqueueDebugKernelTest, givenDebugKernelWhenEnqueuedThenSSHAndBtiAreCor
auto &commandStreamReceiver = pDevice->getCommandStreamReceiver();
auto debugSurface = commandStreamReceiver.getDebugSurfaceAllocation();
EXPECT_EQ(1u, debugSurface->getTaskCount(0u));
EXPECT_EQ(debugSurface->getGpuAddress(), debugSurfaceState->getSurfaceBaseAddress());
}