PFND3DDDI_OFFERALLOCATIONSCB callback function (d3dumddi.h)

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

Syntax

PFND3DDDI_OFFERALLOCATIONSCB Pfnd3dddiOfferallocationscb;

HRESULT Pfnd3dddiOfferallocationscb(
  HANDLE hDevice,
  const D3DDDICB_OFFERALLOCATIONS *unnamedParam2
)
{...}

Parameters

hDevice

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.

unnamedParam2

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 code Description
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

Requirement Value
Minimum supported client Windows 8
Minimum supported server Windows Server 2012
Target Platform Desktop
Header d3dumddi.h (include D3dumddi.h)

See also

D3DDDIARG_CREATEDEVICE

D3DDDICB_OFFERALLOCATIONS

D3DDDI_DEVICECALLBACKS

pfnOfferResources

pfnReclaimAllocationsCb