XGMemory Reference

XGMemory is a helper library that manages dynamic mappings for resource memory, in particular, mixed ESRAM and system memory layouts for render targets. XGMemory is used to flexibly allocate and reuse a fixed set of ESRAM and system memory pages across one or more layouts. Each layout is a unique virtual address range where multiple resources can be placed for rendering.

The Xbox Graphics Memory (XGMemory) API provides ESRAM support, and is declared in the XGMemory.h header file. The full implementation can be found in that header and the corresponding xgmemory.inl file in the same directory. There is no .lib file; everything in the XGMemory API is defined in xgmemory.inl.

XGMemory supports D3D11.x and D3D12.x.

Classes

Name Description
XGFreeList Do not use. Internal use only.
XGMemoryLayout Represents a single layout of a virtual address range, mapped to ESRAM and/or system memory pages stored within the XGMemoryLayoutEngine.
XGMemoryLayoutEngine The memory layout engine for ESRAM and system pages.
XGRefCount Do not use. Internal use only.

Structures

Name Description
XGMemoryLayoutMapping Represents a single mapping within a memory layout.
XGMemoryPageRange Represents a range of 64KB pages in the virtual address space of a layout.

Enumerations

Name Description
XG_COPY_MAPPING_FLAGS Flags to control XGMemoryLayout::CopyMapping, such as whether to replace the mapping of ESRAM pages, and whether to replace the mapping of system memory pages.
XG_LAYOUT_PATTERN_TYPE The layout pattern type ID, when receiving an encoded pattern from PIX data.
XG_RELINQUISH_MAPPING_FLAGS Flags to control XGMemoryLayoutEngine::RelinquishMapping, such as whether to preserve the mapping of ESRAM pages, and whether to preserve the mapping of system memory pages.

See also