ID3D12Device::RegisterPagePoolX Method

Registers a page pool so that it can be used as a source for CopyPageMappingsX and similar functions.

Syntax

public:
HRESULT RegisterPagePoolX(
         D3D12_GPU_VIRTUAL_ADDRESS PagePoolAddress,
         UINT PagePoolPageCount,
         HANDLE *pPagePoolHandle
)  

Parameters

PagePoolAddress
Type: D3D12_GPU_VIRTUAL_ADDRESS 

[in] The base address of the page pool. The address must be 64KB page-aligned and in graphics memory (MEM_GRAPHICS).

PagePoolPageCount
Type: UINT 

[in] Specifies the number of pages to allocate in the page pool. The count must be non-zero and the range must specify fully-mapped memory (either system memory or ESRAM).

pPagePoolHandle
Type: HANDLE *

[out] The address of a memory block that receives the page pool handle on successful registration. The handle can be used to later unregister the page pool using UnregisterPagePoolX.

Return value

Type: HRESULT 

E_OUTOFMEMORY if there is insufficient memory for the page pool, E_INVALIDARG if the arguments are invalid, or one of the Direct3D 12 return codes.

Remarks

Page pool registration locks the physical pages in the pool so they can’t be inadvertently freed until the page pool is unmapped. Attempts to use a page pool without previously registering it will cause errors during GPU page-mapping functions.

Page pools only need to be registered once to establish the pool; repeated registrations of the same page pool are not necessary.

Requirements

Header: Declared in d3d12_x.h.

Library: Use d3d12_x.lib.

See also

UnregisterPagePoolX