ID3D10Resource::SetEvictionPriority method (d3d10.h)

Set the eviction priority of a resource.

Syntax

void SetEvictionPriority(
  [in] UINT EvictionPriority
);

Parameters

[in] EvictionPriority

Type: UINT

Eviction priority for the resource, which is one of the following values:

  • DXGI_RESOURCE_PRIORITY_MINIMUM
  • DXGI_RESOURCE_PRIORITY_LOW
  • DXGI_RESOURCE_PRIORITY_NORMAL
  • DXGI_RESOURCE_PRIORITY_HIGH
  • DXGI_RESOURCE_PRIORITY_MAXIMUM

Return value

None

Remarks

Resource priorities determine which resource to evict from video memory when the system has run out of video memory. The resource will not be lost; it will be removed from video memory and placed into system memory, or possibly placed onto the hard drive. The resource will be loaded back into video memory when it is required.

A resource that is set to the maximum priority, DXGI_RESOURCE_PRIORITY_MAXIMUM, is only evicted if there is no other way of resolving the incoming memory request. The Windows Display Driver Model (WDDM) tries to split an incoming memory request to its minimum size and evict lower-priority resources before evicting a resource with maximum priority.

Changing the priorities of resources should be done carefully. The wrong eviction priorities could be a detriment to performance rather than an improvement. See QueryResourceResidency for additional information.

This method is a wrapper for SetEvictionPriority and is provided in the ID3D10Resource Interface interface for convenience.

Requirements

Requirement Value
Target Platform Windows
Header d3d10.h
Library D3D10.lib

See also

ID3D10Resource Interface