mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-08 22:12:59 +08:00
fix: flush dc when blocking flag set
Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
d96d092602
commit
6fcb0f1407
@@ -644,6 +644,40 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, givenUpdateTaskCountFromWaitEnable
|
||||
EXPECT_EQ(cmd->getDcFlushEnable(), mockCsr->getDcFlushSupport());
|
||||
}
|
||||
|
||||
HWTEST_F(CommandStreamReceiverFlushTaskTests, givenUpdateTaskCountFromWaitEnabledAndBlockingFlagWhenFlushTaskThenTaskCountIsFlushed) {
|
||||
DebugManagerStateRestore restorer;
|
||||
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;
|
||||
|
||||
DispatchFlags dispatchFlags = DispatchFlagsHelper::createDefaultDispatchFlags();
|
||||
dispatchFlags.preemptionMode = PreemptionHelper::getDefaultPreemptionMode(pDevice->getHardwareInfo());
|
||||
dispatchFlags.guardCommandBufferWithPipeControl = false;
|
||||
dispatchFlags.blocking = true;
|
||||
|
||||
mockCsr->flushTask(commandStream,
|
||||
0,
|
||||
&dsh,
|
||||
&ioh,
|
||||
&ssh,
|
||||
taskLevel,
|
||||
dispatchFlags,
|
||||
*pDevice);
|
||||
|
||||
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) {
|
||||
CommandQueueHw<FamilyType> commandQueue(nullptr, pClDevice, 0, false);
|
||||
auto &commandStream = commandQueue.getCS(4096u);
|
||||
|
||||
Reference in New Issue
Block a user