Dont unlock/evict wddm allocations during releasing memory

Change-Id: Ib934867886a883a22fde2f0c03e16338dc215e65
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
Mateusz Jablonski
2019-03-11 10:19:02 +01:00
parent 4386d10e40
commit 3f690e1758
9 changed files with 30 additions and 4 deletions

View File

@@ -1002,7 +1002,15 @@ void Wddm::applyBlockingMakeResident(const D3DKMT_HANDLE &handle) {
while (currentPagingFenceValue > *getPagingFenceAddress())
;
}
void Wddm::removeTemporaryResource(const D3DKMT_HANDLE &handle) {
auto lock = acquireLock(temporaryResourcesLock);
auto position = std::find(temporaryResources.begin(), temporaryResources.end(), handle);
if (position == temporaryResources.end()) {
return;
}
*position = temporaryResources.back();
temporaryResources.pop_back();
}
std::unique_lock<SpinLock> Wddm::acquireLock(SpinLock &lock) {
return std::unique_lock<SpinLock>{lock};
}