refactor: remove dead code

Signed-off-by: Michal Mrozek <michal.mrozek@intel.com>
This commit is contained in:
Michal Mrozek
2024-06-26 07:49:42 +00:00
committed by Compute-Runtime-Automation
parent 5883e9288a
commit 4527d72fde

View File

@@ -65,25 +65,23 @@ MemoryOperationsStatus WddmResidentAllocationsContainer::makeResidentResource(co
}
MemoryOperationsStatus WddmResidentAllocationsContainer::makeResidentResources(const D3DKMT_HANDLE *handles, const uint32_t count, size_t size) {
bool madeResident = false;
while (!(madeResident = wddm->makeResident(handles, count, false, nullptr, size))) {
while (!wddm->makeResident(handles, count, false, nullptr, size)) {
if (evictAllResources() == MemoryOperationsStatus::success) {
continue;
}
if (!(madeResident = wddm->makeResident(handles, count, true, nullptr, size))) {
if (!wddm->makeResident(handles, count, true, nullptr, size)) {
DEBUG_BREAK_IF(true);
return MemoryOperationsStatus::outOfMemory;
};
break;
}
DEBUG_BREAK_IF(!madeResident);
auto lock = acquireLock(resourcesLock);
for (uint32_t i = 0; i < count; i++) {
resourceHandles.push_back(handles[i]);
}
lock.unlock();
wddm->waitOnPagingFenceFromCpu(false);
return madeResident ? MemoryOperationsStatus::success : MemoryOperationsStatus::failed;
return MemoryOperationsStatus::success;
}
void WddmResidentAllocationsContainer::removeResource(const D3DKMT_HANDLE &handle) {