Add new wddm eviction parameter

Related-To: NEO-7179

Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
This commit is contained in:
Zbigniew Zdanowicz
2022-07-18 13:25:50 +00:00
committed by Compute-Runtime-Automation
parent a12c138c16
commit d19cab1fb3
10 changed files with 50 additions and 18 deletions

View File

@@ -359,13 +359,14 @@ std::vector<std::unique_ptr<HwDeviceId>> Wddm::discoverDevices(ExecutionEnvironm
return hwDeviceIds;
}
bool Wddm::evict(const D3DKMT_HANDLE *handleList, uint32_t numOfHandles, uint64_t &sizeToTrim) {
bool Wddm::evict(const D3DKMT_HANDLE *handleList, uint32_t numOfHandles, uint64_t &sizeToTrim, bool evictNeeded) {
NTSTATUS status = STATUS_SUCCESS;
D3DKMT_EVICT evict = {};
evict.AllocationList = handleList;
evict.hDevice = device;
evict.NumAllocations = numOfHandles;
evict.NumBytesToTrim = 0;
evict.Flags.EvictOnlyIfNecessary = evictNeeded ? 0 : 1;
status = getGdi()->evict(&evict);