Maps pages using a run length array of tokens.
public:
HRESULT MapRunLengthArray(
XGMemoryLayoutMapping *pMapping,
const USHORT *pTokens,
UINT32 TokenCount,
UINT32 PageCount,
UINT32 MaxEsramPageCount
)
pMapping
Type: XGMemoryLayoutMapping *
[in, out] The updated mapping result, as a pointer to an XGMemoryLayoutMapping structure.
pTokens
Type: USHORT *
[in] The run length array of tokens.
TokenCount
Type: UINT32
The number of tokens in the run length array of tokens. Each token represents a block of ESRAM or system pages.
PageCount
Type: UINT32
The total number of pages in the run length array of tokens, including system pages and ESRAM pages. This count will adjust the decoded run length array in length and/or ESRAM usage. If the decoded run length array is not large enough to span the entire mapping, system pages will be used to pad to the end of the mapping.
If PageCount is XG_ALL_REMAINING_PAGES, XGMemoryLayout::GetPageCountRemaining is substituted.
MaxEsramPageCount
Type: UINT32
The maximum numer of ESRAM pages in the run length array of tokens. This count will adjust the decoded run length array in length and/or ESRAM usage. If the decoded run length array is not large enough to span the entire mapping, system pages will be used to pad to the end of the mapping.
If MaxEsramPageCount is XG_ALL_REMAINING_PAGES, XGMemoryLayout::GetFreeEsramPageCount is substituted.
Type: HRESULT
S_OK, E_INVALIDARG, or E_OUTOFMEMORY, described in Direct3D 11 return codes.
This method maps pages using a run length array of tokens. Each token represents a block of ESRAM or system pages (see the EsramToken and SystemToken #define macros in xgmemory.h).
The mapping is created with a specific page count and max ESRAM page count. These counts will adjust the decoded run length array in length and/or ESRAM usage. If the decoded run length array is not large enough to span the entire mapping, then system pages will be used to pad to the end of the mapping.
Header: Declared in xgmemory.h.