d3d12_xs: add D3D12ConfigureVirtualMemoryX and XMemRegisterGraphicsMemoryConfiguration #989
No reviewers
Labels
No labels
accessibility
awaiting author
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
priority: P0
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/R0Y00--Xbox2Windows!989
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/989/head"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@EvilOpus on GitHub · 2026-11-23 20:06 UTC · original
EvilOpus:d3d12xs/configure-virtual-memory→main· +170 −1 · 4 files · 1 commits · closed without mergingSummary
Export
D3D12ConfigureVirtualMemoryX(@5) andXMemRegisterGraphicsMemoryConfiguration(@25) from the desktopd3d12_xs.dllshim.On the console,
D3D12XboxCreateDevicecallsD3D12ConfigureVirtualMemoryX, which reserves GPU virtual address space viaVdEraConfigureVirtualMemoryand registers the page-table parameters with xmem viaXMemRegisterGraphicsMemoryConfiguration. The desktop shim validates the input, returns a plausible GPU VA range and stores the graphics memory configuration.Refs #874
Struct layouts
From PDB analysis of the ERA
d3d12_xs.dllandxmem.dll(GDK 261000gameKit/symbols):_XMEM_GRAPHICS_MEMORY_CONFIG(24 bytes):+0x00uint32gpuPageTableSize+0x04uint32framePreserveBufferSize+0x08uint64minGpuAddress+0x10uint64maxGpuAddressD3D12ConfigureVirtualMemoryXinput (32 bytes):+0x00uint32flags(only bit 0 observed)+0x04uint32gpuPageTablePages(max 33 = 132 MB)+0x08uint32framePreserveBufferSize+0x0Cuint32+0x10uint64minGpuAddress(output)+0x18uint64maxGpuAddress(output)The ERA DLL computes
gpuPageTableSize = gpuPageTablePages << 22before callingXMemRegisterGraphicsMemoryConfiguration.Test command and result
The
configure_vmscenario covers:E_INVALIDARGmax_gpu_address; flags=1 acceptedXMemRegisterGraphicsMemoryConfiguration(nullptr)does not crashWhat was measured
The struct layouts and validation limits (flags mask, 33-page maximum,
gpuPageTablePages << 22scaling) are from Hex-Rays decompilation of the ERA DLLs with PDB symbols. The return code0x10000000is from the ERAD3D12ConfigureVirtualMemoryX(VdEraConfigureVirtualMemoryORed with0x10000000). The desktop GPU VA range is a placeholder; the actual range on console comes from the kernel.What remains a hypothesis
Whether all titles pass the same page-table page counts and flags, and whether any title inspects the returned min/max addresses beyond storing them.
@R0Y00 on GitHub · 2026-11-23 20:10 UTC · original
#968 already owns the configure/reservation implementation and #986 covers the separate queue-ordering check. Please hold this overlapping implementation. The generated VA span is derived from the request without reserving a usable Windows range. Returning success would publish addresses with no backing contract. If you have public, independently reproducible evidence for a distinct part of the ABI, please link it on #874 or in the overlapping PR. Replace the private-symbol and decompilation-derived contract details in this PR with public references or source-built fixture evidence, and keep the underlying material local.
Pull request closed