PFND3DDDI_OFFERALLOCATIONS2CB callback function (d3dumddi.h)
Called by the user-mode display driver to offer video memory allocations for reuse.
Syntax
PFND3DDDI_OFFERALLOCATIONS2CB Pfnd3dddiOfferallocations2cb;
HRESULT Pfnd3dddiOfferallocations2cb(
HANDLE hDevice,
const D3DDDICB_OFFERALLOCATIONS2 *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_OFFERALLOCATIONS2 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 pfnOfferAllocations2Cb , 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 pfnOfferAllocations2Cb 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 pfnOfferAllocations2Cb to offer an allocation to reuse, it must call pfnReclaimAllocations3Cb before it locks the allocation or submits it for rendering operations.
pfnOfferAllocations2Cb functions identically to pfnOfferAllocationsCb, except that it takes flags into account through the pData parameter.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 10 |
Minimum supported server | Windows Server 2016 |
Target Platform | Windows |
Header | d3dumddi.h (include D3dumddi.h) |