Maps ESRAM memory to virtual addresses.
Important This API will fail if called on Xbox One X hardware.
HRESULT D3DMapEsramMemory(
UINT Flags,
VOID *pVirtualAddress,
UINT NumPages,
const UINT *pPageList
)
Flags
Type: UINT
Flags to control mapping ESRAM memory. One of the D3D11_MAP_ESRAM_FLAG enumeration constants.
pVirtualAddress
Type: VOID *
The virtual address that ESRAM is to be mapped to. The virtual address range must already be reserved by using VirtualAlloc with MEM_GRAPHICS | MEM_RESERVE and either MEM_LARGE_PAGES or MEM_4MB_PAGES. The virtual address must be aligned to the requested page size (either 64KB or 4MB).
NOTE: The memory at pVirtualAddress is assumed not to be already committed to physical memory. If that assumption is violated, undefined behavior may result.
NumPages
Type: UINT
The number of ESRAM pages to map during this operation. Up to 512 pages can be mapped with 64KB pages, and up to 8 pages can be mapped with 4MB pages. The size of the mapping is NumPages multiplied by the page size specified by Flags.
pPageList
Type: UINT *
[in, optional] An array of ESRAM page numbers. For 64KB pages, valid ESRAM page numbers range from 0-511. For 4MB pages, valid ESRAM page numbers range from 0-7. If pPageList is NULL, then an unmap operation will be performed.
Type: HRESULT
| Value | Description |
|---|---|
| S_OK | Memory was successfully mapped. |
| E_OUTOFMEMORY | Page table memory could not be allocated. |
| E_INVALIDARG | One or more arguments were invalid. |
Header: Declared in d3d11_x.h (d3d11_1.h on other Windows platforms).
Library: Use d3d11_x.lib (d3d11.lib on other Windows platforms).