Driver residency in WDDM 2.0
This section provides details about the driver residency changes for Windows Display Driver Model (WDDM) 2.0. The functionality described is available starting with Windows 10.
In this section
Topic | Description |
---|---|
With the introduction of the new residency model, residency is being moved to an explicit list on the device instead of the per-command buffer list. The video memory manager will ensure that all allocations on a particular device residency requirement list are resident before any contexts belonging to that device are scheduled for execution. |
|
With the allocation list going away, the video memory manager no longer has visibility into the allocations being referenced in a particular command buffer. As a result of this, the video memory manager is no longer in a position to track allocation usage and to handle related synchronization. This responsibility will now fall to the user mode driver. In particular, the user mode driver will have to handle the synchronization with respect to direct CPU access to allocation as well as renaming. |
|
For WDDM v2, requirements around Offer and Reclaim are being relaxed. User mode drivers are no longer required to use offer and reclaim on internal allocations. Idle/suspended applications will get rid of driver internal resources by using the TrimAPI that was introduced in Microsoft DirectX 11.1. |
|
Graphics processing unit (GPU) access to allocations which are not resident is illegal and will result in a device removed for the application that generated the error. There are two distinct models of handling such invalid access dependent on whether the faulting engine supports GPU virtual addressing or not:
|
|
In WDDM v2, processes will be assigned budgets for how much memory they can keep resident. This budget can change over time, but generally will only be imposed when the system is under memory pressure. Prior to Microsoft Direct3D 12, the budget is handled by the user mode driver in the form of Trim notifications and MakeResident failures with STATUS_NO_MEMORY. TrimToBudget notification, Evict, and failed MakeResident calls all return the latest budget in the form of an integer NumBytesToTrim value that indicates how much needs to be trimmed in order to fit in the new budget. |