Do not wait on CPU for fence.

- If allocation is passed for destruction it means that it is ready to
be destroyed, there is no need to wait for tag.

Change-Id: I6b85ed62250aca8ee6293956b6178ce19bdb1f30
This commit is contained in:
Mrozek, Michal
2018-09-06 17:58:32 +02:00
committed by sys_ocldev
parent cb2b45625a
commit df41112b6a
11 changed files with 23 additions and 76 deletions

View File

@@ -83,10 +83,10 @@ bool WddmMock::createAllocation64k(WddmAllocation *alloc) {
return createAllocationResult.success = Wddm::createAllocation64k(alloc);
}
bool WddmMock::destroyAllocations(D3DKMT_HANDLE *handles, uint32_t allocationCount, uint64_t lastFenceValue, D3DKMT_HANDLE resourceHandle, OsContextWin *osContext) {
bool WddmMock::destroyAllocations(D3DKMT_HANDLE *handles, uint32_t allocationCount, D3DKMT_HANDLE resourceHandle) {
destroyAllocationResult.called++;
if (callBaseDestroyAllocations) {
return destroyAllocationResult.success = Wddm::destroyAllocations(handles, allocationCount, lastFenceValue, resourceHandle, osContext);
return destroyAllocationResult.success = Wddm::destroyAllocations(handles, allocationCount, resourceHandle);
} else {
return true;
}
@@ -107,7 +107,7 @@ bool WddmMock::destroyAllocation(WddmAllocation *alloc, OsContextWin *osContext)
cpuPtr = alloc->getAlignedCpuPtr();
}
}
auto success = destroyAllocations(allocationHandles, allocationCount, alloc->getResidencyData().lastFence, resourceHandle, osContext);
auto success = destroyAllocations(allocationHandles, allocationCount, resourceHandle);
::alignedFree(cpuPtr);
releaseReservedAddress(reserveAddress);
return success;