ID3D12Device::Evict method (d3d12.h)

Enables the page-out of data, which precludes GPU access of that data.

Syntax

HRESULT Evict(
       UINT           NumObjects,
  [in] ID3D12Pageable * const *ppObjects
);

Parameters

NumObjects

Type: UINT

The number of objects in the ppObjects array to evict from the device.

[in] ppObjects

Type: ID3D12Pageable*

A pointer to a memory block that contains an array of ID3D12Pageable interface pointers for the objects.

Even though most D3D12 objects inherit from ID3D12Pageable, residency changes are only supported on the following objects: Descriptor Heaps, Heaps, Committed Resources, and Query Heaps

Return value

Type: HRESULT

This method returns one of the Direct3D 12 Return Codes.

Remarks

Evict persists the data associated with a resource to disk, and then removes the resource from the memory pool where it was located. This method should be called on the object which owns the physical memory: either a committed resource (which owns both virtual and physical memory assignments) or a heap - noting that reserved resources do not have physical memory, and placed resources are borrowing memory from a heap.

Refer to the remarks for MakeResident.

Requirements

Requirement Value
Target Platform Windows
Header d3d12.h
Library D3D12.lib
DLL D3D12.dll

See also

ID3D12Device