Add OsContext argument to MemoryManager::makeNonResidentEvictionAllocations

OsContext has to propagate through following calls first:
- WddmCommandStreamReceiver<GfxFamily>::processEviction
- CommandStreamReceiver::makeSurfacePackNonResident

Change-Id: I7559c7406b2860c51905c9961cec251fac231b08
Signed-off-by: Maciej Dziuban <maciej.dziuban@intel.com>
This commit is contained in:
Maciej Dziuban
2018-10-03 17:48:59 +02:00
committed by sys_ocldev
parent 2d7077e138
commit bc4700a193
14 changed files with 28 additions and 28 deletions

View File

@@ -1263,7 +1263,7 @@ TEST_F(DrmCommandStreamLeaksTest, givenFragmentedAllocationsWithResuedFragmentsW
EXPECT_EQ(3u, residency->size());
tCsr->makeSurfacePackNonResident(tCsr->getResidencyAllocations());
tCsr->makeSurfacePackNonResident(tCsr->getResidencyAllocations(), *osContext);
//check that each packet is not resident
EXPECT_FALSE(graphicsAllocation->fragmentsStorage.fragmentStorageData[0].residency->resident);
@@ -1285,7 +1285,7 @@ TEST_F(DrmCommandStreamLeaksTest, givenFragmentedAllocationsWithResuedFragmentsW
EXPECT_EQ(3u, residency->size());
tCsr->makeSurfacePackNonResident(tCsr->getResidencyAllocations());
tCsr->makeSurfacePackNonResident(tCsr->getResidencyAllocations(), *osContext);
EXPECT_EQ(0u, residency->size());
@@ -1544,7 +1544,7 @@ TEST_F(DrmCommandStreamLeaksTest, FlushMultipleTimes) {
csr->alignToCacheLine(cs);
BatchBuffer batchBuffer3{cs.getGraphicsAllocation(), 16, 0, nullptr, false, false, QueueThrottle::MEDIUM, cs.getUsed(), &cs};
csr->flush(batchBuffer3, EngineType::ENGINE_RCS, csr->getResidencyAllocations(), *osContext);
csr->makeSurfacePackNonResident(csr->getResidencyAllocations());
csr->makeSurfacePackNonResident(csr->getResidencyAllocations(), *osContext);
mm->freeGraphicsMemory(allocation);
mm->freeGraphicsMemory(allocation2);
@@ -1630,7 +1630,7 @@ TEST_F(DrmCommandStreamLeaksTest, MakeResidentClearResidencyAllocationsInCommand
EXPECT_NE(0u, csr->getResidencyAllocations().size());
csr->processResidency(csr->getResidencyAllocations(), *device->getOsContext());
csr->makeSurfacePackNonResident(csr->getResidencyAllocations());
csr->makeSurfacePackNonResident(csr->getResidencyAllocations(), *osContext);
EXPECT_EQ(0u, csr->getResidencyAllocations().size());
mm->freeGraphicsMemory(allocation1);
@@ -1648,7 +1648,7 @@ TEST_F(DrmCommandStreamLeaksTest, givenMultipleMakeResidentWhenMakeNonResidentIs
EXPECT_NE(0u, csr->getResidencyAllocations().size());
csr->processResidency(csr->getResidencyAllocations(), *device->getOsContext());
csr->makeSurfacePackNonResident(csr->getResidencyAllocations());
csr->makeSurfacePackNonResident(csr->getResidencyAllocations(), *osContext);
EXPECT_EQ(0u, csr->getResidencyAllocations().size());
EXPECT_FALSE(allocation1->isResident(0u));

View File

@@ -552,7 +552,7 @@ TEST_F(WddmCommandStreamTest, processEvictionPlacesAllAllocationsOnTrimCandidate
EXPECT_EQ(2u, csr->getEvictionAllocations().size());
csr->processEviction();
csr->processEviction(*device->getOsContext());
EXPECT_EQ(2u, mockWddmMM->trimCandidateList.size());
@@ -570,7 +570,7 @@ TEST_F(WddmCommandStreamTest, processEvictionClearsEvictionAllocations) {
EXPECT_EQ(1u, csr->getEvictionAllocations().size());
csr->processEviction();
csr->processEviction(*device->getOsContext());
EXPECT_EQ(0u, csr->getEvictionAllocations().size());
@@ -700,7 +700,7 @@ TEST_F(WddmCommandStreamMockGdiTest, makeResidentClearsResidencyAllocations) {
csr->processResidency(csr->getResidencyAllocations(), *device->getOsContext());
csr->makeSurfacePackNonResident(csr->getResidencyAllocations());
csr->makeSurfacePackNonResident(csr->getResidencyAllocations(), *device->getOsContext());
EXPECT_EQ(0u, csr->getResidencyAllocations().size());
EXPECT_EQ(0u, csr->getEvictionAllocations().size());