mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-24 12:23:05 +08:00
fix: Restore main command stream when reset cmd list
Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
6ffa756457
commit
4106398002
@@ -930,6 +930,11 @@ HWTEST2_F(CommandListCreate, givenSecondaryCommandStreamForImmediateCmdListWhenC
|
|||||||
|
|
||||||
EXPECT_EQ(commandList->getCmdContainer().getCommandStream(), secondaryCmdStream);
|
EXPECT_EQ(commandList->getCmdContainer().getCommandStream(), secondaryCmdStream);
|
||||||
EXPECT_TRUE(MemoryPoolHelper::isSystemMemoryPool(commandList->getCmdContainer().getCommandStream()->getGraphicsAllocation()->getMemoryPool()));
|
EXPECT_TRUE(MemoryPoolHelper::isSystemMemoryPool(commandList->getCmdContainer().getCommandStream()->getGraphicsAllocation()->getMemoryPool()));
|
||||||
|
|
||||||
|
commandList->reset();
|
||||||
|
|
||||||
|
EXPECT_FALSE(MemoryPoolHelper::isSystemMemoryPool(commandList->getCmdContainer().getCommandStream()->getGraphicsAllocation()->getMemoryPool()));
|
||||||
|
EXPECT_TRUE(MemoryPoolHelper::isSystemMemoryPool(reinterpret_cast<CmdContainerMock *>(&commandList->getCmdContainer())->secondaryCommandStreamForImmediateCmdList->getGraphicsAllocation()->getMemoryPool()));
|
||||||
}
|
}
|
||||||
|
|
||||||
HWTEST2_F(CommandListCreate, givenNoSecondaryCommandStreamForImmediateCmdListWhenCheckAvailableSpaceThenNotSwapCommandStreams, IsAtLeastSkl) {
|
HWTEST2_F(CommandListCreate, givenNoSecondaryCommandStreamForImmediateCmdListWhenCheckAvailableSpaceThenNotSwapCommandStreams, IsAtLeastSkl) {
|
||||||
|
|||||||
@@ -195,8 +195,18 @@ void CommandContainer::reset() {
|
|||||||
getDeallocationContainer().clear();
|
getDeallocationContainer().clear();
|
||||||
sshAllocations.clear();
|
sshAllocations.clear();
|
||||||
|
|
||||||
this->handleCmdBufferAllocations(1u);
|
auto defaultCmdBuffersCnt = 1u + this->useSecondaryCommandStream;
|
||||||
cmdBufferAllocations.erase(cmdBufferAllocations.begin() + 1, cmdBufferAllocations.end());
|
|
||||||
|
this->handleCmdBufferAllocations(defaultCmdBuffersCnt);
|
||||||
|
cmdBufferAllocations.erase(cmdBufferAllocations.begin() + defaultCmdBuffersCnt, cmdBufferAllocations.end());
|
||||||
|
|
||||||
|
if (this->useSecondaryCommandStream) {
|
||||||
|
if (!NEO::MemoryPoolHelper::isSystemMemoryPool(this->getCommandStream()->getGraphicsAllocation()->getMemoryPool())) {
|
||||||
|
this->swapStreams();
|
||||||
|
}
|
||||||
|
setCmdBuffer(cmdBufferAllocations[1]);
|
||||||
|
this->swapStreams();
|
||||||
|
}
|
||||||
|
|
||||||
setCmdBuffer(cmdBufferAllocations[0]);
|
setCmdBuffer(cmdBufferAllocations[0]);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user