Video memory offer and reclaim

Windows Display Driver Model (WDDM) 1.2 and later user-mode display drivers must use the memory offer and reclaim feature, available starting with Windows 8, to reduce memory overhead needed for temporary surfaces in local and system memory.

Minimum WDDM version 1.2
Minimum Windows version 8
Driver implementation—Full graphics and Render only Mandatory
WHCK requirements and tests Device.Graphics…OfferReclaim

Especially in mobile scenarios, graphics-intensive apps that need hardware acceleration can make heavy use of GPU resources. Also, in many mobile devices the GPU is integrated into the CPU chipset and the GPU uses portions of system memory as video memory. To ensure reasonable system performance when multiple apps make heavy use of a GPU that in turn makes heavy demand on system memory, the memory footprint of display drivers should be minimized. The offer/reclaim device driver interfaces (DDIs) provide a mechanism to do this.

An API is available for apps to offer unneeded memory that the system can later reclaim for other uses, as well as to reclaim memory that was recently discarded. See the Microsoft DirectX Graphics Infrastructure (DXGI) app programming topic, DXGI 1.2 Improvements.

Offer and reclaim DDI

New functions are available starting with Windows 8 for the user-mode driver to offer or reclaim memory.

The driver calls these system-provided functions to offer or reclaim memory allocations:

The driver implements these functions if it supports Microsoft Direct3D 10 hardware:

The driver implements the following functions if it supports Microsoft Direct3D 9 hardware. Also, if apps offer or reclaim their allocations while using the Direct3D 11 API running on Direct3D 9 hardware, the Direct3D runtime calls these functions:

Use these associated structures and enumerations:

To support the offer/reclaim feature, starting with Windows 8 this structure has two new members:

You should carefully test that your driver handles this feature correctly because after an allocation is discarded, all data in it is lost.

Hardware certification requirements

For info on requirements that hardware devices must meet when they implement this feature, refer to the relevant WHCK documentation on Device.Graphics…OfferReclaim. Note that these requirements list the scenarios in which the driver must offer allocations.

See WDDM 1.2 features for a review of features added with Windows 8.

Send comments about this topic to Microsoft