OfferResourcesDXGI callback function

Called by the Microsoft DirectX Graphics Infrastructure (DXGI) runtime to request that the user-mode display driver offer video memory resources for reuse. Implemented by Windows Display Driver Model (WDDM) 1.2 and later user-mode display drivers.

Syntax


pfnOfferResources OfferResourcesDXGI;

HRESULT __stdcall* OfferResourcesDXGI(
    DXGI_DDI_ARG_OFFERRESOURCES *pResources
)
{ ... }

Parameters

pResources

A pointer to a DXGI_DDI_ARG_OFFERRESOURCES structure that defines the video memory resources that the driver offers.

Return value

Returns one of the following values.

Return codeDescription
S_OK

The video memory resources were successfully offered.

D3DDDIERR_DEVICEREMOVED

The driver detected that the display adapter was removed, so the driver did not complete the operation.

If the driver is not aware of the adapter removal, the driver is not required to return this error code.

 

Remarks

If the user-mode driver does not have outstanding work queued that references an allocation that it has been asked to offer, then it can offer the allocation immediately or postpone the offer until the next call is made to the Flush(D3D11_1) or PresentDXGI functions. However, the driver must always process all batched offer calls that have been submitted through Flush(D3D11_1) or PresentDXGI.

If the driver uses the renaming service of the video memory manager, then the driver should offer the last allocation instance.

This function is declared in Dxgiddi.h as follows.


HRESULT ( __stdcall /*APIENTRY*/ * pfnOfferResources ) (DXGI_DDI_ARG_OFFERRESOURCES*);


Requirements

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Target platform

Desktop

Version

WDDM 1.2 and later

Header

Dxgiddi.h (include D3dumddi.h)

See also

DXGI1_2_DDI_BASE_FUNCTIONS
Flush(D3D11_1)
pfnReclaimResources
PresentDXGI

 

 

Send comments about this topic to Microsoft

Show: