Add missing makeResident call

Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
This commit is contained in:
Dunajski, Bartosz
2022-12-14 15:47:56 +00:00
committed by Compute-Runtime-Automation
parent a734921113
commit 1783f5b740
2 changed files with 6 additions and 0 deletions

View File

@@ -189,6 +189,7 @@ HWTEST2_F(AppendMemoryCopy, givenAsyncImmediateCommandListWhenAppendingMemoryCop
DebugManagerStateRestore restore;
NEO::DebugManager.flags.EnableFlushTaskSubmission.set(1);
auto ultCsr = static_cast<UltCommandStreamReceiver<FamilyType> *>(device->getNEODevice()->getDefaultEngine().commandStreamReceiver);
ultCsr->storeMakeResidentAllocations = true;
auto cmdQueue = std::make_unique<Mock<CommandQueue>>();
cmdQueue->csr = ultCsr;
@@ -220,6 +221,7 @@ HWTEST2_F(AppendMemoryCopy, givenAsyncImmediateCommandListWhenAppendingMemoryCop
ASSERT_EQ(ZE_RESULT_SUCCESS, commandList->appendMemoryCopy(dstPtr, srcPtr, 8, nullptr, 0, nullptr));
EXPECT_EQ(expectedSize, ultCsr->getCS(0).getUsed());
EXPECT_TRUE(ultCsr->isMadeResident(commandList->commandContainer.getCommandStream()->getGraphicsAllocation()));
size_t offset = 0;
if constexpr (FamilyType::isUsingMiMemFence) {
@@ -282,6 +284,7 @@ HWTEST2_F(AppendMemoryCopy, givenSyncImmediateCommandListWhenAppendingMemoryCopy
DebugManagerStateRestore restore;
NEO::DebugManager.flags.EnableFlushTaskSubmission.set(1);
auto ultCsr = static_cast<UltCommandStreamReceiver<FamilyType> *>(device->getNEODevice()->getDefaultEngine().commandStreamReceiver);
ultCsr->storeMakeResidentAllocations = true;
auto cmdQueue = std::make_unique<Mock<CommandQueue>>();
cmdQueue->csr = ultCsr;
@@ -313,6 +316,7 @@ HWTEST2_F(AppendMemoryCopy, givenSyncImmediateCommandListWhenAppendingMemoryCopy
ASSERT_EQ(ZE_RESULT_SUCCESS, commandList->appendMemoryCopy(dstPtr, srcPtr, 8, nullptr, 0, nullptr));
EXPECT_EQ(expectedSize, ultCsr->getCS(0).getUsed());
EXPECT_TRUE(ultCsr->isMadeResident(commandList->commandContainer.getCommandStream()->getGraphicsAllocation()));
size_t offset = 0;
if constexpr (FamilyType::isUsingMiMemFence) {

View File

@@ -210,6 +210,8 @@ CompletionStamp CommandStreamReceiverHw<GfxFamily>::flushBcsTask(LinearStream &c
makeResident(*getTagAllocation());
}
makeResident(*commandStreamTask.getGraphicsAllocation());
bool submitCSR = (commandStreamStartCSR != commandStreamCSR.getUsed());
void *bbEndLocation = nullptr;