feat(d3d12_x): add the title buffer window below 4 GB #36
No reviewers
Labels
No labels
accessibility
bug
ci
docs
documentation
duplicate
enhancement
fixes issue
good first issue
help wanted
invalid
library request
libs
needs rebase
question
relinker
stale
tools
unblocks title
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Dark3581--AnyBox!36
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/36/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?
@Dark3581 on GitHub · 2026-11-22 11:06 UTC · original
Dark3581:feat/buffer-window→main· +432 −3 · 11 files · 1 commits · merged 2026-11-22 11:09 UTCWhat
The mechanism behind option A of the GPU memory note on #4: one buffer window below 4 GB that the CPU and the GPU share at the same addresses.
TitleBufferWindowfinds a free range below 4 GB (VirtualQuery, aligned to the allocation granularity and the driver's import alignment), commits it, imports it as one Vulkan buffer withVK_EXT_external_memory_hostand a device address, and gives the heap base = device address − window start (modulo 2^64), the value translated shaders add to every console address they read. Translated shaders set the high dword of descriptor-table pointers to 0 (25,252 of 25,889 modules of one title's store), which is why the window has to sit below 4 GB.VulkanDevicegains ahostMemoryImportrequirement: it then needs and enablesVK_EXT_external_memory_hostand records the import alignment andvkGetMemoryHostPointerPropertiesEXT.anybox-pipeline-probe window [--mib N] [--validate]: a compute shader reads 4,096 32-bit pointers from a table inside the window and loads through heap base + each pointer, writing results back into the window; two rounds, with the CPU changing the data between them, so both directions are checked without copies.Tested
check_conventions.pyanddebt_fold.py --checkpass.window --validate(64 MiB at0x10000000): 8,192 of 8,192 reads correct, 0 validation errors. The device address was below the window start, so the heap base wrapped (0xfffffffff7150000) and the 64-bit addition in the shader still landed correctly.0x10000000) and 2 GiB (at0x7fff0000) import and pass; 3 GiB finds no free range below 4 GB in the probe process. No game data in the PR.Checklist
main; no other open PR implements the same functionspython tools/check_conventions.pypasses (no comments in code, one declaration per export, Conventional Commit subjects)AbxNotImplemented/AbxUnsupported); silent stubs are listed under Silent stubs through a debt fragmentdocs/dev/debt/changes/<branch>.md