IDXGIDevice::QueryResourceResidency method (dxgi.h)

Gets the residency status of an array of resources.

Syntax

HRESULT QueryResourceResidency(
  [in]  IUnknown       * const *ppResources,
  [out] DXGI_RESIDENCY *pResidencyStatus,
        UINT           NumResources
);

Parameters

[in] ppResources

Type: IUnknown*

An array of IDXGIResource interfaces.

[out] pResidencyStatus

Type: DXGI_RESIDENCY*

An array of DXGI_RESIDENCY flags. Each element describes the residency status for corresponding element in the ppResources argument array.

NumResources

Type: UINT

The number of resources in the ppResources argument array and pResidencyStatus argument array.

Return value

Type: HRESULT

Returns S_OK if successful; otherwise, returns DXGI_ERROR_DEVICE_REMOVED, E_INVALIDARG, or E_POINTER (see Common HRESULT Values and WinError.h for more information).

Remarks

The information returned by the pResidencyStatus argument array describes the residency status at the time that the QueryResourceResidency method was called.

Note  The residency status will constantly change.
 
If you call the QueryResourceResidency method during a device removed state, the pResidencyStatus argument will return the DXGI_RESIDENCY_RESIDENT_IN_SHARED_MEMORY flag.
Note  This method should not be called every frame as it incurs a non-trivial amount of overhead.
 

Requirements

Requirement Value
Target Platform Windows
Header dxgi.h
Library DXGI.lib

See also

DXGI Interfaces

IDXGIDevice