mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-25 13:33:02 +08:00
Revert "fix: skip always resident allocations during trim"
This reverts commit c9457bb5eb.
Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
7550e55d64
commit
2d8397a36f
@@ -561,55 +561,6 @@ TEST_F(WddmResidencyControllerWithGdiTest, WhenTrimmingToBudgetThenEvictedAlloca
|
||||
EXPECT_TRUE(allocation3.getResidencyData().resident[osContextId]);
|
||||
}
|
||||
|
||||
TEST_F(WddmResidencyControllerWithGdiTest, givenAlwaysResidentAllocationWhenTrimResidencyToBudgetCalledThenDontEvict) {
|
||||
gdi->setNonZeroNumBytesToTrimInEvict();
|
||||
|
||||
MockWddmAllocation allocation(rootDeviceEnvironment->getGmmHelper());
|
||||
|
||||
allocation.getResidencyData().resident[osContextId] = true;
|
||||
allocation.getResidencyData().updateCompletionData(0, osContextId);
|
||||
|
||||
*residencyController->getMonitoredFence().cpuAddress = 1;
|
||||
residencyController->getMonitoredFence().lastSubmittedFence = 1;
|
||||
residencyController->getMonitoredFence().currentFenceValue = 1;
|
||||
|
||||
wddm->evictResult.called = 0;
|
||||
|
||||
csr->getEvictionAllocations().push_back(&allocation);
|
||||
allocation.updateResidencyTaskCount(GraphicsAllocation::objectAlwaysResident, osContextId);
|
||||
|
||||
std::mutex mtx;
|
||||
std::unique_lock<std::mutex> lock(mtx);
|
||||
residencyController->trimResidencyToBudget(3 * 4096, lock);
|
||||
|
||||
EXPECT_TRUE(allocation.getResidencyData().resident[osContextId]);
|
||||
}
|
||||
|
||||
TEST_F(WddmResidencyControllerWithGdiTest, givenAlwaysResidentAllocationWhenTrimResidencyCalledThenDontEvict) {
|
||||
gdi->setNonZeroNumBytesToTrimInEvict();
|
||||
|
||||
MockWddmAllocation allocation(rootDeviceEnvironment->getGmmHelper());
|
||||
|
||||
allocation.getResidencyData().resident[osContextId] = true;
|
||||
allocation.getResidencyData().updateCompletionData(0, osContextId);
|
||||
|
||||
*residencyController->getMonitoredFence().cpuAddress = 1;
|
||||
residencyController->getMonitoredFence().lastSubmittedFence = 1;
|
||||
residencyController->getMonitoredFence().currentFenceValue = 1;
|
||||
|
||||
wddm->evictResult.called = 0;
|
||||
|
||||
csr->getEvictionAllocations().push_back(&allocation);
|
||||
allocation.updateResidencyTaskCount(GraphicsAllocation::objectAlwaysResident, osContextId);
|
||||
|
||||
D3DKMT_TRIMNOTIFICATION trimNotification = {0};
|
||||
trimNotification.Flags.PeriodicTrim = 1;
|
||||
trimNotification.NumBytesToTrim = 0;
|
||||
residencyController->trimResidency(trimNotification.Flags, trimNotification.NumBytesToTrim);
|
||||
|
||||
EXPECT_TRUE(allocation.getResidencyData().resident[osContextId]);
|
||||
}
|
||||
|
||||
TEST_F(WddmResidencyControllerWithGdiTest, GivenLastFenceIsGreaterThanMonitoredWhenTrimmingToBudgetThenWaitForCpu) {
|
||||
gdi->setNonZeroNumBytesToTrimInEvict();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user