mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-09 06:23:01 +08:00
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:
committed by
sys_ocldev
parent
2d7077e138
commit
bc4700a193
@@ -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));
|
||||
|
||||
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user