mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-24 12:23:05 +08:00
Add missing makeResident call on debug surface.
Change-Id: I9c2d1bcf608dbfc71a3859b237e249d41810c153
This commit is contained in:
committed by
sys_ocldev
parent
a49b1950eb
commit
b102f8556e
@@ -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) {
|
||||
|
||||
@@ -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());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user