Skip to content

Latest commit

 

History

History
95 lines (70 loc) · 4.43 KB

nf-dxgi1_2-idxgidevice2-reclaimresources.md

File metadata and controls

95 lines (70 loc) · 4.43 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NF:dxgi1_2.IDXGIDevice2.ReclaimResources
IDXGIDevice2::ReclaimResources (dxgi1_2.h)
Restores access to resources that were previously offered by calling IDXGIDevice2::OfferResources.
IDXGIDevice2 interface [DXGI]
ReclaimResources method
IDXGIDevice2.ReclaimResources
IDXGIDevice2::ReclaimResources
ReclaimResources
ReclaimResources method [DXGI]
ReclaimResources method [DXGI]
IDXGIDevice2 interface
direct3ddxgi.idxgidevice2_reclaimresources
dxgi1_2/IDXGIDevice2::ReclaimResources
direct3ddxgi\idxgidevice2_reclaimresources.htm
direct3ddxgi
30533605-0F5A-4D15-B01E-7C23E2AE775E
12/05/2018
IDXGIDevice2 interface [DXGI],ReclaimResources method, IDXGIDevice2.ReclaimResources, IDXGIDevice2::ReclaimResources, ReclaimResources, ReclaimResources method [DXGI], ReclaimResources method [DXGI],IDXGIDevice2 interface, direct3ddxgi.idxgidevice2_reclaimresources, dxgi1_2/IDXGIDevice2::ReclaimResources
dxgi1_2.h
Windows
Windows 8 and Platform Update for Windows 7 [desktop apps \| UWP apps]
Windows Server 2012 and Platform Update for Windows Server 2008 R2 [desktop apps \| UWP apps]
Dxgi.lib
Windows
19H1
IDXGIDevice2::ReclaimResources
dxgi1_2/IDXGIDevice2::ReclaimResources
c++
APIRef
kbSyntax
COM
Dxgi.lib
Dxgi.dll
IDXGIDevice2.ReclaimResources

IDXGIDevice2::ReclaimResources

-description

Restores access to resources that were previously offered by calling IDXGIDevice2::OfferResources.

-parameters

-param NumResources [in]

The number of resources in the ppResources argument and pDiscarded argument arrays.

-param ppResources [in]

An array of pointers to IDXGIResource interfaces for the resources to reclaim.

-param pDiscarded [out, optional]

A pointer to an array that receives Boolean values. Each value in the array corresponds to a resource at the same index that the ppResources parameter specifies. The runtime sets each Boolean value to TRUE if the corresponding resource’s content was discarded and is now undefined, or to FALSE if the corresponding resource’s old content is still intact. The caller can pass in NULL, if the caller intends to fill the resources with new content regardless of whether the old content was discarded.

-returns

ReclaimResources returns:

  • S_OK if resources were successfully reclaimed
  • E_INVALIDARG if the resources are invalid

-remarks

After you call IDXGIDevice2::OfferResources to offer one or more resources, you must call ReclaimResources before you can use those resources again. You must check the values in the array at pDiscarded to determine whether each resource’s content was discarded. If a resource’s content was discarded while it was offered, its current content is undefined. Therefore, you must overwrite the resource’s content before you use the resource.

To reclaim shared resources, call ReclaimResources only on one of the sharing devices. To ensure exclusive access to the resources, you must use an IDXGIKeyedMutex object and then call ReclaimResources only while you hold the mutex.

Platform Update for Windows 7:  The runtime validates that ReclaimResources is used correctly on non-shared resources but doesn't perform the intended functionality. For more info about the Platform Update for Windows 7, see Platform Update for Windows 7.

-see-also

IDXGIDevice2

IDXGIDevice2::OfferResources