pfnOfferAllocationsCb function

Called by the user-mode display driver to offer video memory allocations for reuse.

Syntax


__checkReturn HRESULT APIENTRY pfnOfferAllocationsCb(
  _In_  HANDLE hDevice,
  _In_  const D3DDDICB_OFFERALLOCATIONS *pData
);

Parameters

hDevice [in]

A handle to the display device (graphics context). The Direct3D runtime passed the user-mode driver this handle as the hDevice member of the D3DDDIARG_CREATEDEVICE structure at device creation.

pData [in]

A pointer to a D3DDDICB_OFFERALLOCATIONS structure that defines the video memory allocations that the driver offers.

Return value

Returns one of the following values.

Return codeDescription
S_OK

The allocations were successfully offered.

Note  If the driver does not need to call pfnOfferAllocationsCb, it should return S_OK.

D3DDDIERR_DEVICEREMOVED

The video memory manager or display miniport driver could not complete the operation because either a Plug and Play (PnP) Stop event or a Timeout Detection and Recovery (TDR) event occurred.

Note  If this error code is returned, the driver's calling function (typically the pfnOfferResources routine) must return this error code to the Direct3D runtime.

E_INVALIDARG

An invalid parameter was supplied.

 

Remarks

The user-mode display driver calls pfnOfferAllocationsCb to notify the Microsoft DirectX graphics kernel subsystem that, after it completes any previously submitted render operations, it can offer the allocations' memory for other processes to use.

After the driver calls pfnOfferAllocationsCb to offer an allocation to reuse, it must call pfnReclaimAllocationsCb before it locks the allocation or submits it for rendering operations.

Requirements

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Header

D3dumddi.h (include D3dumddi.h)

See also

D3DDDIARG_CREATEDEVICE
D3DDDICB_OFFERALLOCATIONS
D3DDDI_DEVICECALLBACKS
pfnOfferResources
pfnReclaimAllocationsCb

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft