Add functionality to make resident before locking resource

Change-Id: I0963c1edcb43f409e9dd62cb46a0da1f2b05667b
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
Mateusz Jablonski
2019-01-16 15:09:33 +01:00
committed by sys_ocldev
parent 72f17d6435
commit ad3bfd84cb
11 changed files with 357 additions and 36 deletions

View File

@@ -301,6 +301,11 @@ void WddmMemoryManager::freeGraphicsMemoryImpl(GraphicsAllocation *gfxAllocation
return;
}
if (input->isLocked() && input->needsMakeResidentBeforeLock) {
auto evictionStatus = wddm->evictTemporaryResource(input);
DEBUG_BREAK_IF(evictionStatus == EvictionStatus::FAILED);
}
for (auto &osContext : this->registeredOsContexts) {
if (osContext) {
auto &residencyController = osContext->get()->getResidencyController();