fix: Correctly flush DC when reuse heap

Related-To: NEO-8067

Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
This commit is contained in:
Lukasz Jobczyk
2023-07-20 12:02:24 +00:00
committed by Compute-Runtime-Automation
parent 7cea7122c2
commit b06f605895
2 changed files with 7 additions and 1 deletions

View File

@@ -615,6 +615,7 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, givenUpdateTaskCountFromWaitEnable
DebugManager.flags.UpdateTaskCountFromWait.set(3);
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
mockCsr->overrideDispatchPolicy(DispatchMode::ImmediateDispatch);
pDevice->resetCommandStreamReceiver(mockCsr);
mockCsr->useNewResourceImplicitFlush = false;
mockCsr->useGpuIdleImplicitFlush = false;
@@ -635,7 +636,12 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, givenUpdateTaskCountFromWaitEnable
parseCommands<FamilyType>(commandStream);
auto itorPipeControl = find<typename FamilyType::PIPE_CONTROL *>(cmdList.begin(), cmdList.end());
if (MemorySynchronizationCommands<FamilyType>::isBarrierWaRequired(pDevice->getRootDeviceEnvironment())) {
itorPipeControl++;
}
EXPECT_NE(itorPipeControl, cmdList.end());
auto cmd = genCmdCast<typename FamilyType::PIPE_CONTROL *>(*itorPipeControl);
EXPECT_EQ(cmd->getDcFlushEnable(), mockCsr->getDcFlushSupport());
}
HWTEST_F(CommandStreamReceiverFlushTaskTests, givenCsrInDefaultModeWhenFlushTaskIsCalledThenFlushedTaskCountIsModifed) {