mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 14:55:24 +08:00
fix: clear residency container when failed to make resident
Related-To: NEO-14143 Signed-off-by: Maciej Plewka <maciej.plewka@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
c741628b00
commit
577c99fe9c
@@ -862,6 +862,23 @@ TEST_F(WddmResidencyControllerWithMockWddmTest, givenMakeResidentFailsWhenCallin
|
||||
EXPECT_EQ(2u, wddm->makeResidentResult.called);
|
||||
}
|
||||
|
||||
TEST_F(WddmResidencyControllerWithMockWddmTest, givenMakeResidentFailsWhenCallingMakeResidentResidencyAllocationsThenResidencyContainerIsCleared) {
|
||||
MockWddmAllocation allocation1(gmmHelper);
|
||||
MockWddmAllocation allocation2(gmmHelper);
|
||||
MockWddmAllocation allocation3(gmmHelper);
|
||||
MockWddmAllocation allocation4(gmmHelper);
|
||||
|
||||
wddm->makeResidentNumberOfBytesToTrim = 4 * 4096;
|
||||
wddm->makeResidentStatus = false;
|
||||
|
||||
ResidencyContainer residencyPack{&allocation1, &allocation2, &allocation3, &allocation4};
|
||||
bool requiresBlockingResidencyHandling = true;
|
||||
bool result = residencyController->makeResidentResidencyAllocations(residencyPack, requiresBlockingResidencyHandling);
|
||||
|
||||
EXPECT_FALSE(result);
|
||||
EXPECT_EQ(residencyPack.size(), 0u);
|
||||
}
|
||||
|
||||
TEST_F(WddmResidencyControllerWithMockWddmTest, givenMakeResidentFailsWhenCallingMakeResidentResidencyAllocationsThenDontMarkTripleAllocationsAsResident) {
|
||||
MockWddmAllocation allocation1(gmmHelper);
|
||||
MockWddmAllocation allocation2(gmmHelper);
|
||||
|
||||
Reference in New Issue
Block a user