Gets the residency status of an array of resources.
public:
HRESULT QueryResourceResidency(
const IUnknown *ppResources,
DXGI_RESIDENCY *pResidencyStatus,
UINT NumResources
)
ppResources
Type: IUnknown *
[in] An array of IDXGIResource interfaces.
pResidencyStatus
Type: DXGI_RESIDENCY *
[out] 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.
Type: HRESULT
Returns S_OK if successfull; otherwise, returns DXGI_ERROR_DEVICE_REMOVED, E_INVALIDARG, or E_POINTER (see WinError.h for more information).
The information returned by the pResidencyStatus argument array describes the residency status at the time that the QueryResourceResidency method was called. Note that 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_EVICTED_TO_DISK flag.
Note
This method should not be called every frame as it incurs a non-trivial amount of overhead.
Header: Declared in d3d11_x.h (dxgi.h on other Windows platforms).
Library: Use d3d11_x.lib (dxgi.lib on other Windows platforms).