Skip to content

gpu: establish the D3D12ConfigureVirtualMemoryX startup contract #874

Open

Description

@R0Y00

Main startup status and the next milestone live in #870. This issue tracks GPU tasks, claims and review dependencies.

GPU tasks

Task Owner and status Deliverable Acceptance command Depends on
Slot 67 translated compute through indirect Dispatch (#2492) Fixture completed in #2771. Fenced pixel follow-up #3222 merged. The original-executable investigation continues in #870. Source-built GPU-written arguments, translated slot 67 output and offscreen pixels. Includes omitted-writer, missing-translation and stale-SRV controls. Build startup_stream_consumer; run `ctest --preset release --no-tests=error -j 1 -R '^startup_slot67_indirect_dispatch_(warp|hardware)
Startup shader s_bfm_b64 (#2007) Author rebase requested; independent reviewer wanted. Verify both result words and the negative controls on the rebased head. WARP and hardware command in the linked review request. #1723, #2007
BVH destination address placement (#1758) MasterDomino, claimed · PR #1860 merged, Windows Release 6/6 · RX 9070 XT cleared address check with the opt-in · measurement Explicit startup configuration on the traced non-fixed XMem path. Check the entire 40-bit range in the consumer address domain. Exercise exhaustion and rollback; keep ordinary and fixed-address cases. Run `ctest --preset release --no-tests=error -R '^(xmem_startup_below_40 xmem_shim_mapped_pages)' -V`.
Slot 148 upload lifetime (#1758) Main development owns production wiring; JustinDCosta, ABI/fence fixture claimed, awaiting integration baseline Verify CPU/GPU address relationship and alignment, reject allocation after Close, then check A and B after completion when Reset occurs with A held behind a GPU fence. Add and run ctest --preset dev --no-tests=error -R '^startup_list_upload_slot148_(hardware|warp)$' -V with the slot wiring. Upload arena #1774, merged, Standalone delayed-fence #2068, WARP and RTX 4060 Laptop 2/2, Close/Reset #1770, measured endpoint #1758
Linear buffer shared/copy backing (#1914) MasterDomino, claimed · #1942 test fixture merged · Release 5/5 on WARP and RTX 4060 Laptop, including three negative controls. Production buffer slice remains open One source-built buffer through shared, forced-copy and forced-share-failure paths. Verify late CPU writes, fence-completed CPU alias readback and in-flight backing lifetime. Reuse the vm_translation, vm_copy_queue and era_gpu_alias fixtures. Record the exact new test command, adapter, driver, copy bytes, backing usage and HRESULTs with the PR. Approved scope. Independent of slot 148.
Scene composite pixel provenance (#1628) MasterDomino, fixture merged (#1642) Source / destination-before / destination-after on one command list ctest --preset dev --no-tests=error -R '^startup_composite_provenance_(hardware|warp)$' -V (requested fixture) Independent; #1137 records earlier observations
Packed screen position (#1629) RenzoWit35, scanner; MasterDomino, aggregate record checks; KelboLive, draft #1725; existing gradient passes Intel Arc 140T and WARP Prove the PSO input-mask source and select the correct register in a gradient fixture ctest --preset dev --no-tests=error -R '^startup_packed_screen_position_(hardware|warp)$' -V (requested fixture) May run alongside #1628
Descriptor paging across two logical heaps @Jess-Doit · PR #1074 · RTX/WARP combined 19/19; merged b9beb159; RTX 3090 and WARP retest (all 14 descriptor cases passed) A source-built case copies distinct descriptors across a page boundary and reads both heaps through one shared shader-visible heap. A stale page or swapped heap must change the readback. ctest --preset dev --no-tests=error -R '^descriptor_heap_paging_' -V Merged baseline #1054 · Paging scope · GTX 1060/WARP report
CPU-copied descriptor records @Jess-Doit · local RTX/WARP 10/10; merged f01259c9; RX 590 and WARP descriptor cases 10/10 Verify the copied record selects the second output word. The stale mirror selects the first word and an unknown ID is refused before submission. On #1060, build offscreen_check, then run ctest --preset dev --no-tests=error -R '^descriptor_(window|record_copy)_' -V. PR #1060 builds on merged #1054.
Raw UAV stores through two address windows @zohaiblazuli · #1025 merged at 436ac1bf; RTX 4060 Laptop/WARP 8/8; RX 590 and WARP raw-window cases 4/4 Source-built scalar and four-DWORD stores, untouched sentinels, swapped bindings, and rejection of misaligned or out-of-range requests before dispatch. Build vm_copy_queue_check, then run ctest --preset release --no-tests=error -R '^vm_(copy_queue|page_provenance|raw_srv|raw_uav)_' -V. Both raw-window fixtures are covered by #1025.
COPY → DIRECT cross-page ordering retest @Holastor · RX 6600M hardware 2/2; matched source revision d4cbfcd; RX 590 ordered copy failed; WARP and page provenance passed; RTX 3090 hardware 2/2 at a7710b73; RX 9070 XT and WARP 4/4 at 82749f0f; RTX 4090 and WARP 4/4 at 1744710c Post adapter, driver, Windows build and readback or skip counts for an early read, a post-copy read and a post-remap read. Build vm_copy_queue_check, then run ctest --preset release --no-tests=error -R '^vm_(copy_queue|page_provenance)_hardware$' -V. Merged baseline #1003.
Rectangle-list expansion @Holastor · Python, RTX and WARP verified at cbf3c8bb; merged 2db96ba5 Review the source-built geometry contract, distinct corner attributes, and winding and malformed-count controls. On #1068, run ctest --preset dev --no-tests=error -R '^rectlist_' -V. PR #1068 · Startup observation
CreateSamplerX desktop sampler contract @Not-Saii · claimed; PR #1121 · merged; 4/4 on WARP and RTX 4060 Laptop in maintenance Release retest; author reports 4/4 in both presets on WARP and RTX 4090 Add a source-built test with distinguishable address modes and explicit LOD limits. Read back values on WARP and hardware, and use a deliberately swapped sampler to catch descriptor or address-mode mistakes. Record which filter fields are supported. Add and run ctest --preset dev --no-tests=error -R '^startup_sampler_x_' -V on the proposed PR. Startup boundary #870 · XCL public ABI notes

Comment here with the row, your environment and any overlapping work before starting. Build the named target first and report the exact command, result and capability skip separately. Link the resulting PR or retest here. The controlled frame-event fixture from @Holastor has merged in #1014.

Original GPU virtual-memory task

Refs #870. The startup preflight found a direct import for D3D12ConfigureVirtualMemoryX. The desktop D3D12 shim already covers the device creation and root signature imports used by the startup fixture.

Acceptance

  • Identify the ABI, configuration fields, call order and observed return behavior from evidence that can be shared or reproduced independently.
  • Propose a desktop implementation only for the verified behavior. Add a source-built fixture with one valid input and a failure case that detects any resource or state changes.
  • Report the first open contract question if the available evidence cannot support an implementation.

Available to claim. Comment with your environment and links to overlapping GPU VA work. Keep candidate binaries, dumps and private logs local.

-V. | #1867, #2470, [closed #3209](https://github.com/R0Y00/Xbox2Windows/issues/3209) | | Startup shader s_bfm_b64(#2007) | Author rebase requested; [independent reviewer wanted](https://github.com/R0Y00/Xbox2Windows/pull/2007#issuecomment-7171040347). | Verify both result words and the negative controls on the rebased head. | WARP and hardware command in the linked review request. | #1723, #2007 | | BVH destination address placement (#1758) | [MasterDomino, claimed](https://github.com/R0Y00/Xbox2Windows/issues/1758#issuecomment-7141337878) · [PR #1860 merged, Windows Release 6/6](https://github.com/R0Y00/Xbox2Windows/pull/1860) · [RX 9070 XT cleared address check with the opt-in](https://github.com/R0Y00/Xbox2Windows/issues/1758#issuecomment-7142481719) · [measurement](https://github.com/R0Y00/Xbox2Windows/issues/1758#issuecomment-7141035594) | Explicit startup configuration on the traced non-fixed XMem path. Check the entire 40-bit range in the consumer address domain. Exercise exhaustion and rollback; keep ordinary and fixed-address cases. | Runctest --preset release --no-tests=error -R '^(xmem_startup_below_40|xmem_shim_mapped_pages)' -V. | [Approved contract](https://github.com/R0Y00/Xbox2Windows/issues/1758#issuecomment-7141264763) | | Slot 148 upload lifetime (#1758) | Main development owns production wiring; [JustinDCosta, ABI/fence fixture claimed](https://github.com/R0Y00/Xbox2Windows/issues/874#issuecomment-7143305649), [awaiting integration baseline](https://github.com/R0Y00/Xbox2Windows/issues/874#issuecomment-7143374903) | Verify CPU/GPU address relationship and alignment, reject allocation after Close, then check A and B after completion when Reset occurs with A held behind a GPU fence. | Add and run ctest --preset dev --no-tests=error -R '^startup_list_upload_slot148_(hardware|warp)$' -Vwith the slot wiring. | [Upload arena #1774, merged](https://github.com/R0Y00/Xbox2Windows/pull/1774), [Standalone delayed-fence #2068, WARP and RTX 4060 Laptop 2/2](https://github.com/R0Y00/Xbox2Windows/pull/2068#issuecomment-7148303189), [Close/Reset #1770](https://github.com/R0Y00/Xbox2Windows/pull/1770), [measured endpoint #1758](https://github.com/R0Y00/Xbox2Windows/issues/1758#issuecomment-7141035594) | | Linear buffer shared/copy backing (#1914) | [MasterDomino, claimed](https://github.com/R0Y00/Xbox2Windows/issues/1914#issuecomment-7144664623) · [#1942 test fixture merged](https://github.com/R0Y00/Xbox2Windows/pull/1942) · Release 5/5 on WARP and RTX 4060 Laptop, including three negative controls. Production buffer slice remains open | One source-built buffer through shared, forced-copy and forced-share-failure paths. Verify late CPU writes, fence-completed CPU alias readback and in-flight backing lifetime. | Reuse the vm_translation, vm_copy_queue and era_gpu_alias fixtures. Record the exact new test command, adapter, driver, copy bytes, backing usage and HRESULTs with the PR. | [Approved scope](https://github.com/R0Y00/Xbox2Windows/issues/1914#issuecomment-7144624407). Independent of slot 148. | | Scene composite pixel provenance (#1628) | [MasterDomino](https://github.com/R0Y00/Xbox2Windows/issues/874#issuecomment-7136210574), fixture merged (#1642) | Source / destination-before / destination-after on one command list |ctest --preset dev --no-tests=error -R '^startup_composite_provenance_(hardware|warp)$' -V(requested fixture) | Independent; #1137 records earlier observations | | Packed screen position (#1629) | [RenzoWit35](https://github.com/R0Y00/Xbox2Windows/issues/1629#issuecomment-7136400484), scanner; [MasterDomino](https://github.com/R0Y00/Xbox2Windows/issues/1629#issuecomment-7136461775), aggregate record checks; [KelboLive, draft #1725](https://github.com/R0Y00/Xbox2Windows/pull/1725); [existing gradient passes Intel Arc 140T and WARP](https://github.com/R0Y00/Xbox2Windows/issues/1629#issuecomment-7142663677) | Prove the PSO input-mask source and select the correct register in a gradient fixture |ctest --preset dev --no-tests=error -R '^startup_packed_screen_position_(hardware|warp)$' -V(requested fixture) | May run alongside #1628 | | Descriptor paging across two logical heaps | @Jess-Doit · [PR #1074](https://github.com/R0Y00/Xbox2Windows/pull/1074) · [RTX/WARP combined 19/19](https://github.com/R0Y00/Xbox2Windows/pull/1074#issuecomment-7118166765); [merged b9beb159](https://github.com/R0Y00/Xbox2Windows/commit/b9beb1591679101594f52c887efc469bd568a190); [RTX 3090 and WARP retest](https://github.com/R0Y00/Xbox2Windows/issues/874#issuecomment-7119158297) (all 14 descriptor cases passed) | A source-built case copies distinct descriptors across a page boundary and reads both heaps through one shared shader-visible heap. A stale page or swapped heap must change the readback. |ctest --preset dev --no-tests=error -R '^descriptor_heap_paging_' -V| [Merged baseline #1054](https://github.com/R0Y00/Xbox2Windows/pull/1054) · [Paging scope](https://github.com/R0Y00/Xbox2Windows/issues/874#issuecomment-7117289535) · [GTX 1060/WARP report](https://github.com/R0Y00/Xbox2Windows/issues/874#issuecomment-7117989966) | | CPU-copied descriptor records | @Jess-Doit · [local RTX/WARP 10/10](https://github.com/R0Y00/Xbox2Windows/pull/1060#issuecomment-7117788843); [merged f01259c9](https://github.com/R0Y00/Xbox2Windows/commit/f01259c9f9a96eb065de8e02203d4233fa9003dc); [RX 590 and WARP descriptor cases 10/10](https://github.com/R0Y00/Xbox2Windows/issues/874#issuecomment-7142075731) | Verify the copied record selects the second output word. The stale mirror selects the first word and an unknown ID is refused before submission. | On #1060, buildoffscreen_check, then run ctest --preset dev --no-tests=error -R '^descriptor_(window|record_copy)' -V. | [PR #1060](https://github.com/R0Y00/Xbox2Windows/pull/1060) builds on merged #1054. | | Raw UAV stores through two address windows | @zohaiblazuli · [#1025 merged at 436ac1bf](https://github.com/R0Y00/Xbox2Windows/commit/436ac1bf39128901fed5ef567dadd92b404ac5f4); [RTX 4060 Laptop/WARP 8/8](https://github.com/R0Y00/Xbox2Windows/issues/874#issuecomment-7125760614); [RX 590 and WARP raw-window cases 4/4](https://github.com/R0Y00/Xbox2Windows/issues/874#issuecomment-7142075731) | Source-built scalar and four-DWORD stores, untouched sentinels, swapped bindings, and rejection of misaligned or out-of-range requests before dispatch. | Build vm_copy_queue_check, then run ctest --preset release --no-tests=error -R '^vm(copy_queue|page_provenance|raw_srv|raw_uav)' -V. | Both raw-window fixtures are covered by [#1025](https://github.com/R0Y00/Xbox2Windows/pull/1025). | | COPY → DIRECT cross-page ordering retest | @Holastor · [RX 6600M hardware 2/2](https://github.com/R0Y00/Xbox2Windows/issues/874#issuecomment-7118233810); matched source revision d4cbfcd4; [RX 590 ordered copy failed; WARP and page provenance passed](https://github.com/R0Y00/Xbox2Windows/issues/874#issuecomment-7142379308); [RTX 3090 hardware 2/2 at a7710b73](https://github.com/R0Y00/Xbox2Windows/issues/874#issuecomment-7119158297); [RX 9070 XT and WARP 4/4 at 82749f0f](https://github.com/R0Y00/Xbox2Windows/issues/874#issuecomment-7142495780); [RTX 4090 and WARP 4/4 at 1744710c](https://github.com/R0Y00/Xbox2Windows/issues/874#issuecomment-7147350817) | Post adapter, driver, Windows build and readback or skip counts for an early read, a post-copy read and a post-remap read. | Build vm_copy_queue_check, then run ctest --preset release --no-tests=error -R '^vm(copy_queue|page_provenance)hardware$' -V. | [Merged baseline #1003](https://github.com/R0Y00/Xbox2Windows/pull/1003). | | Rectangle-list expansion | @Holastor · [Python, RTX and WARP verified at cbf3c8bb](https://github.com/Holastor/Xbox2Windows/commit/cbf3c8bb844b605162794901bdeeeb7c3b579193); [merged 2db96ba5](https://github.com/R0Y00/Xbox2Windows/commit/2db96ba52cb4b72cfb4df4190fc37dfcbee98046) | Review the source-built geometry contract, distinct corner attributes, and winding and malformed-count controls. | On #1068, run ctest --preset dev --no-tests=error -R '^rectlist' -V. | [PR #1068](https://github.com/R0Y00/Xbox2Windows/pull/1068) · [Startup observation](https://github.com/R0Y00/Xbox2Windows/issues/870#issuecomment-7116272710) | | CreateSamplerXdesktop sampler contract | @Not-Saii · [claimed](https://github.com/R0Y00/Xbox2Windows/issues/874#issuecomment-7118790643); [PR #1121](https://github.com/R0Y00/Xbox2Windows/pull/1121) · merged; 4/4 on WARP and RTX 4060 Laptop in maintenance Release retest; author reports 4/4 in both presets on WARP and RTX 4090 | Add a source-built test with distinguishable address modes and explicit LOD limits. Read back values on WARP and hardware, and use a deliberately swapped sampler to catch descriptor or address-mode mistakes. Record which filter fields are supported. | Add and runctest --preset dev --no-tests=error -R '^startup_sampler_x_' -V` on the proposed PR. | Startup boundary #870 · XCL public ABI notes |

Comment here with the row, your environment and any overlapping work before starting. Build the named target first and report the exact command, result and capability skip separately. Link the resulting PR or retest here. The controlled frame-event fixture from @Holastor has merged in #1014.

Original GPU virtual-memory task

Refs #870. The startup preflight found a direct import for D3D12ConfigureVirtualMemoryX. The desktop D3D12 shim already covers the device creation and root signature imports used by the startup fixture.

Acceptance

  • Identify the ABI, configuration fields, call order and observed return behavior from evidence that can be shared or reproduced independently.
  • Propose a desktop implementation only for the verified behavior. Add a source-built fixture with one valid input and a failure case that detects any resource or state changes.
  • Report the first open contract question if the available evidence cannot support an implementation.

Available to claim. Comment with your environment and links to overlapping GPU VA work. Keep candidate binaries, dumps and private logs local.

Activity

  1. added
    help wanted
    on Nov 23, 2026
  2. lukaslw-lab commented on Nov 23, 2026

    @lukaslw-lab
    Contributor

    AI-assisted (Claude Code).

    I'd like to take #874. A short static pass on the package's main executable (file reads only, nothing executed) found the following.

    Observation Value
    Import references one jmp [IAT] thunk, one direct call site
    Call hr = D3D12ConfigureVirtualMemoryX(&cfg): one pointer argument, HRESULT checked with SUCCEEDED
    cfg 32 bytes, zero-initialised on the stack; only the DWORD at offset 4 is written
    Offset 4 value ceil(size / 16 GiB) + 2, where size is 16 GiB or 24 GiB (so 3 or 4)
    size source HKLM\Software\Microsoft\Windows NT\CurrentVersion\OEM\ConsoleMode (DWORD); one mode gives 16 GiB, the others 24 GiB; a missing key takes the 24 GiB path
    Call order once per process (static guard), before the D3D12 device is created; immediately followed by two XMemVirtualAlloc(NULL, size, 0x20402000, …) reservations of size (4th/5th arguments 0x21/4 and 3/0x801)
    Failure handling a failed HRESULT or a null reservation only reaches int 3; execution continues

    Plan:

    • Contract note first: the ABI above, the remaining unknowns (the meaning of offset 4 and of the 28 zero bytes, whether configuration must precede the reservations) and what the desktop side can verify. No public Microsoft reference documents the struct, so I'll label anything beyond the observed call as proposed policy.
    • Shim: a d3d12_xs export that accepts this shape and refuses anything else (a null pointer, non-zero reserved bytes, a second configuration) without state changes.
    • Fixture: a source-built EXE that imports it by name, run under the Windows loader and pe_map: one valid call, plus failure cases with a canary struct showing nothing changed.
    • XMemVirtualAlloc with these flags belongs to the XMem side (runtime: establish contracts for the XMem default allocation pair #875/runtime: export the default XMem allocation pair #879, runtime: define the physical-page allocation contract for startup #880). I'll only record the order here and won't touch xmem_shim.

    Environment: Windows 10 Pro 22H2 (19045), MSVC 19.52, RTX 3080 Ti, plus in-box WARP and WARP 1.0.22 (w10 preset).
    Related: #870 (milestone), #875/#879 and #880 (XMem side).

  3. R0Y00 commented on Nov 23, 2026

    @R0Y00
    OwnerAuthor

    Thanks for taking #874. Please start with the contract note and a source-built EXE using a recording provider. That can prove the named import, 32-byte input snapshot, call order relative to the reservation calls, and propagation of a chosen failure HRESULT under Windows and pe_map. Keep the observed DWORD values as input samples while its meaning and required effect are open. A canary can catch argument writes. For a production shim, also show what configuration changes on Windows and which later operation observes it before treating the call as successful.

  4. lukaslw-lab commented on Nov 23, 2026

    @lukaslw-lab
    Contributor

    AI-assisted (Claude Code).

    Follow-up on "which later operation observes it" (static read of the main executable, nothing executed; fixture in #891). RVAs are for my local build.

    Observation Where (RVA)
    The configuration call and both reservations run in a one-time init reached from the static-initializer table, so before main. init 0x1e0a320, call 0x1e1cfe0
    A later startup function creates the device through D3D12XboxCreateDevice, then calls the range setup. 0x19f4df0: device 0x19f4f4f, setup 0x19f5284
    The range setup keeps reservation A (0x21/4) and B (3/0x801) and the size as globals. With a device, it maps physical pages into a third range and passes that to a device method (slot +0x250). Without one, it frees A and B and uses a single reservation for both. 0x1e6c110
    An allocator returns 64 KiB blocks in A. A helper returns block - A + B, and callers write through + A - B. 0x221b9e0, 0x43c4830
    A helper takes a resource's +0x58 method result (GetGPUVirtualAddress in the desktop vtable) and maps [B, B+size) back to A. 0x4fd2980

    Over 40 functions read A, B or the size.

    Reading: B is the GPU virtual-address view of the memory whose CPU view is A, at equal offsets. The operation that observes the configuration is this offset translation. On Windows, D3D12 picks GPU addresses itself, so a bare S_OK would leave GPU addresses outside B, and the helper would return them untranslated.

    Open: whether this call or the XMem attribute words make B a GPU window, and what the 3/4 DWORD means. The game's own no-device path uses A == B, which is one desktop policy worth testing. It relates to the mapping work claimed on #880 and to #888's reservation type: two views of one section would reproduce the A/B layout.

  5. R0Y00 commented on Nov 23, 2026

    @R0Y00
    OwnerAuthor

    #891 is merged. The source-built fixture now checks the two 32-byte inputs, both reservation calls, HRESULT propagation, and the input and canary controls under Windows and pe_map. The observations above give the next test a concrete consumer: can a source-built caller preserve the same offset when translating between its CPU range and a live D3D12 resource’s GPU address? Please keep the no-device shared-range case distinct from the device path, and show a mismatched-range control. The DWORD samples remain observations; the required Windows-side configuration effect is still open.

  6. R0Y00 commented on Nov 23, 2026

    @R0Y00
    OwnerAuthor

    #912 has merged. The device fixture verified the same CPU/GPU offset with a live D3D12 heap, and the 64 KiB shifted-window control missed all 1,024 intended words in an independent RTX 4060 Laptop run. The shared-range case also passes separately. Keep this issue open for the production configuration call. The next source-built check should identify which state a successful configuration changes, which later operation observes it, and what failed configuration leaves intact.

  7. lukaslw-lab commented on Nov 23, 2026

    @lukaslw-lab
    Contributor

    AI-assisted (Claude Code).

    Following the sparse-tile result on #870, I checked whether one reserved buffer can serve as the whole configured GPU range (B, 16 or 24 GiB). It works on WARP 1.0.22 but not on the other two adapters I have.

    Setup (local probe, source-built, not yet in the repository): CreateReservedResource buffer as the window, tiles from an ordinary two-tile DEFAULT heap, staging and readback in 64 KiB pagefile sections opened with OpenExistingHeapFromFileMapping. One tile is mapped, filled by CopyBufferRegion from staging, and read by a compute dispatch through a root UAV at window GPU VA + offset. Windows 10 19045, D3D12 10.0.19041.7291, debug layer on.

    Adapter VA bits per resource 16/24 GiB reserved buffer Tile below 4 GiB Tile at or above 4 GiB
    WARP 1.0.22 (app-local) 40 created 13/13 pass 13/13 pass (24 GiB window, offset 4 GiB)
    RTX 3080 Ti, driver 610.47 40 created 13/13 pass mapping has no effect: reads 0, also by copy; no debug message, no wrap to offset mod 4 GiB
    In-box WARP 10.0.19041.7811 32 E_OUTOFMEMORY above 4095 MiB copy lands, but the root-UAV dispatch reads 0 —

    Where the copy goes and when the queue sees updates (all passing cases):

    • UpdateTileMappings followed by ExecuteCommandLists on the same queue needs no fence; the copy and dispatch see the new mapping.
    • A copy submitted before the mapping is discarded (the tile was NULL), and the tile keeps its earlier bytes.
    • CPU writes to the staging section after a copy are not seen until the next copy.
    • Remapping to another pool tile and back keeps the first tile's bytes; NULL and unmapped tiles read 0.

    So one 16/24 GiB window is not portable. Splitting it works: six 4 GiB reserved windows (24 GiB), each with tiles mapped at its start, middle and last 64 KiB from an 18-tile pool, each filled with a distinct pattern and read back by dispatch:

    Adapter Six 4 GiB windows Result
    RTX 3080 Ti, driver 610.47 created, GPU VAs 0x2e0000000 + i × 4 GiB (adjacent here; D3D12 does not promise it) 18/18 tiles, unmapped tiles read 0 in all six
    WARP 1.0.22 created, 0x8000000000000000 + i × 2^40 18/18, same
    In-box WARP 10.0.19041.7811 (4095 MiB each) created 0/18, device removed 0x887A0020

    A B → GPU range table per window therefore covers both working adapters. In-box WARP 19041 fails root-UAV reads into reserved buffers at any size, so a WARP fixture would need WARP 1.0.22 or a newer in-box build. I'd propose that split as the production configuration effect, and put the probe's checks into the repository fixture: success, invalid configuration (no windows created, existing device and mappings untouched), and the ordering controls above.

  8. lukaslw-lab commented on Nov 23, 2026

    @lukaslw-lab
    Contributor

    AI-assisted (Claude Code).

    Static read of the main executable (file reads only, nothing executed; RVAs for my local build): after device creation the title maps B's 64 KiB pages to a page pool through a copy queue, and maps pages from the same pool into A for the CPU. This is the later GPU-side operation on B.

    Step Observation Where (RVA)
    Pool XMemAllocatePhysicalPages for size / 64 KiB pages, mapped into a third reservation P (0x23/0x2004) with XMemMapPhysicalPages range setup 0x1e6c110
    Register device->vtbl[+0x250](P, page_count, &out), HRESULT, int 3 on failure 0x1e6c2bb
    Queue device->vtbl[+0x40] with IID ID3D12CommandQueue and desc {Type 3 (COPY), priority 0, flags 0, node mask 1} 0x1e6c2ef
    CPU view per batch, free pool pages are scatter-mapped into A with XMemMapPhysicalPagesScatter 0xf2c470
    GPU view the same batch builds entries {B + page << 16, page count, records} with 12-byte records {1, pool page index, 1} and calls copy_queue->vtbl[+0xF8](count, entries, P, …) 0xf2cc7f

    The batch code runs before a DirectStorage queue submit (XCRDAPI.dll!DStorageGetFactory). The earlier +0x250 call on a DirectStorage wrapper object is a different call: it only records (kind, A address, 64 KiB-rounded size) in that batch.

    Reading:

    • The 12-byte records have the shape of D3D12's tile-range data (range flag, heap offset in tiles, tile count), keyed by a GPU address in B. On desktop the same structure is a reserved resource for B, a tile pool for P, and UpdateTileMappings on a queue. My window probe measured exactly that, including the ordering: a mapping update is visible to later work on the same queue without a fence.
    • One difference stays: on the console A and B appear to share the physical page (both sides take their page from the same pool slot in the same loop). On desktop the tile pool cannot be the shared CPU heap (D3D12 debug error 493 in the test reported on P0: main executable startup progress #870), so a copy from the A-side page is still needed.
    • D3D12ConfigureVirtualMemoryX's own effect is still inferred. The likeliest reading is that it reserves the GPU virtual range that B's reservation later occupies, sized by the 3 or 4 sample. That fits the proposed production effect: on success, reserve the B windows (at most 4 GiB each) for the device; on refusal, reserve nothing.

    The +0x250 and +0xF8 slots are past the desktop vtables, so their exact signatures are open; only the argument shapes above are observed.

  9. R0Y00 commented on Nov 23, 2026

    @R0Y00
    OwnerAuthor

    The latest local startup reached the pre-device configuration and moved on to memory allocation. It still stops before the actual device call. In a separate source-built fixture the default Device11 block and first DIRECT queue succeeded, while nondefault queue-ring settings were refused.

    @lukaslw-lab, please keep your sparse-range work and the device/queue evidence linked here. The next independent check is a source-built configure → create device → create first DIRECT queue sequence. Check that the resource address remains usable and that a rejected configuration or queue request leaves the valid state intact. Reuse #912's shifted-window witness where it applies. Report adapter VA limits and capability skips separately, and keep the large reserved-buffer result separate from the default queue result.

  10. R0Y00 commented on Nov 23, 2026

    @R0Y00
    OwnerAuthor

    Claimable follow-up: explicit graphics queue capacity

    Extend the existing source-built deferred-device test with a versioned device description that requests a nondefault graphics command-queue capacity. Determine which effects the caller can observe, and exercise creation, more than one submission, fence completion, and cleanup on failure. Use a real Windows queue on hardware and WARP. If a field cannot be represented on Windows, identify the exact rejected category in the test.

    This complements the existing sparse-address tests. Please claim the fixture here before opening a PR and link any other work on device or queue creation. Use synthetic input and public declarations.

  11. R0Y00 commented on Nov 23, 2026

    @R0Y00
    OwnerAuthor

    #986 has merged at 2f2893f after both Windows and both Linux checks passed. The separate source-built queue-ordering check is available on main. I reran cd9ff65 under Windows 11 26200.9974 on in-box WARP and RTX 4060 Laptop. Both matched 16,384 words before and after the remap, and the early read differed from all 16,384 expected remapped words. Keeping the old physical tile made the ordered read fail all 16,384 words on each adapter. The check uses a COPY fence signaled after the remap and a DIRECT wait before the second read. #968 still owns the production window range and its cleanup. The independent nondefault queue-capacity claim also stays open.

  12. 103 remaining items

  13. roansystemlabs commented on Nov 25, 2026

    @roansystemlabs
    Contributor

    Coordination note for #1629: per the go-ahead there, I'm opening a translator-side PR for the source-built association check. tools/startup/gfx2hlsl.py lays out the pixel entry VGPRs by the address mask and loads them by the enable mask, and takes both masks from a per-pipeline description next to the request files. A decoy pipeline, a stale or foreign description, a missing mask and contradictory masks are each refused by name, with no translated draw. The PR also adds a CTest built from source on the #1634 gradient fixture.

    It touches only the translator and tests: no runtime, D3D12, residency or virtual-memory code, so it doesn't overlap with the lines already taken here. The description file is a proposal. Capturing it in the runtime, and the provenance of the composite's masks, stay with main development and #870.

    AI-assisted.

  14. added
    priority: P0
    on Nov 30, 2026
  15. Jess-Doit commented on Nov 30, 2026

    @Jess-Doit
    Contributor

    Budget samples from a GTX 1060 6 GB run with the shared presets, as a follow-up to the summary above.

    The run: main bee9c64d with #3664 on Windows 10 19045, started with run_preset.py --console x --gpu nvidia, so X2W_D3D12_BUDGET=1 and X2W_D3D12_RELEASE_RETIRED=1 were on.

    time local / budget live textures (count) live buffers (count) heap upload
    5 s 0.59 / 5.14 GiB 0.28 GiB (32) 0.17 GiB (2) 2.15 GiB 0.02 GiB
    78 s 5.31 / 4.90 GiB 4.22 GiB (1,227) 1.03 GiB (3,334) 2.15 GiB 0.10 GiB
    228 s 5.96 / 4.91 GiB 4.84 GiB (1,571) 1.04 GiB (3,362) 2.15 GiB 0.27 GiB
    303 s 8.20 / 4.90 GiB 7.07 GiB (2,534) 1.04 GiB (3,362) 2.15 GiB 0.32 GiB
    378 s 8.71 / 4.89 GiB 7.59 GiB (2,850) 1.04 GiB (3,372) 2.15 GiB 0.39 GiB
    about 505 s 9.59 / 5.16 GiB 8.36 GiB (2,991) 1.16 GiB (3,991) 2.15 GiB 0.49 GiB
    • The budget is passed by the loading screen (about 80 s). Live textures account for almost all of the growth after that, and buffers stay near 1 GiB.
    • The textures are live. The retained columns stayed small, and RELEASE_RETIRED had dropped 5,000 desktop references by the end.
    • The device was removed at 517 s (0x887a0005, first seen after a queue execute), during the prologue. The title then stopped itself through its own watchdog about 40 s later (#870).
    • Same pattern without the presets. Three runs with slot 57 refused reached 9.5–10 GiB local and stopped the same way.

    So on a 6 GB card, the live texture set at the prologue (about 3,000 textures, 8.4 GiB) is close to twice the local budget. The next step on this host would be a run with DRED, to classify the removal as a page fault or a hang.

    AI-assisted.

  16. Jess-Doit commented on Dec 1, 2026

    @Jess-Doit
    Contributor

    Follow-up to the budget samples above: I repeated that preset run with DRED forced on, as a local diagnostic patch. DRED enabled auto-breadcrumbs, breadcrumb contexts and page-fault reporting before device creation.

    Device removed 538.6 s, 0x887a0005, first seen after a queue execute
    Runtime debug output before it only D3D12: Removing Device., with no error message
    DRED breadcrumbs GetAutoBreadcrumbsOutput1 S_OK, 0 nodes, 0 unfinished
    DRED page fault GetPageFaultAllocationOutput1 S_OK, VA 0, no existing or recently freed allocation
    Local video memory 9.40 / 5.28 GiB; live textures 8.17 GiB (2,901)
    Host commit 36.2 / 41.3 GB

    No command list was in flight on the GPU and nothing faulted. So this is not a GPU hang (that would be DXGI_ERROR_DEVICE_HUNG with breadcrumbs left) and not a page fault on a freed or missing resource. It reads as the runtime removing the device at about 1.8 times the local budget, which points back at the size of the live texture set rather than at a bad command.

    AI-assisted.

  17. Jess-Doit commented on Dec 1, 2026

    @Jess-Doit
    Contributor

    A census of how much of the live texture set lies on title memory that another live texture also covers. The question was whether sharing title pages between textures, instead of one desktop copy per placement, could fit this on a 6 GB card. On this run, it cannot.

    The run: GTX 1060 6 GB, Windows 10 19045, shared presets, main bee9c64d with #3664, plus a local diagnostic patch (not for upstream). The patch takes every live texture that has a budget ticket and title memory, as the span [title address, + desktop bytes from its ticket]. The desktop size stands in for the console footprint, which the placed-texture record does not keep. Sum is what the desktop copies cost; union is the title memory those spans cover.

    time live textures sum union same start overlapping another
    early 32 287 MiB 274 MiB 0 10 (17 MiB)
    loading screen 1,299 4,555 MiB 4,259 MiB 208 242 (487 MiB)
    1,687 5,126 MiB 4,830 MiB 208 242 (487 MiB)
    2,807 7,638 MiB 7,342 MiB 208 242 (487 MiB)
    at removal, 553 s 3,219 8,349 MiB 8,053 MiB 208 242 (487 MiB)
    • The overlap is fixed early. 242 textures and 487 MiB, set by the loading screen. After that, union grows with sum.
    • All later growth is distinct title memory. Shared title pages would save at most about 300 MiB, roughly 4%. The set the title keeps live really is about 8 GiB on its own.
    • Local was 9.99 / 5.27 GiB at the removal.
    • Records without a desktop copy. About 32,000 more live texture records had no desktop copy (no budget ticket) by the end. They cost nothing on the card.

    So on a 6 GB card the live set has to shrink in a different way: drop the desktop copies of textures that have not been used recently, and upload them again from title memory on their next use. Once nothing recorded or submitted still refers to a texture, its copy can be released, which RELEASE_RETIRED already does for released textures. The next measurement would be how many of these 3,219 textures went unused over the last few seconds before the removal. That needs a last-use mark per texture, which the stand-in does not keep yet.

    AI-assisted.

  18. Jess-Doit commented on Dec 1, 2026

    @Jess-Doit
    Contributor

    A design question that follows from the overlap census.

    Sharing title pages would save about 4% of the 8 GiB live texture set on that run. The other way to shrink the set is to release the desktop copies of live textures that are not in use and upload them again from title memory on their next use. That needs a usage signal per texture. With the shared presets, the stand-in does not have one:

    • Draws. The draws use native shaders that reach textures through the descriptor heaps, so no per-texture step runs at draw time. A local last-use stamp on the address-SRV read path in d3d12_draw.inl, and on the Dispatch read path in d3d12_compute_dispatch.inl, saw 0 reads in 34,541 translated draws.
    • Descriptors. With X2W_D3D12_INLINE_DESCRIPTORS=1 the title writes its descriptors itself. retire_view_refs is then not maintained, and both uses of it in d3d12_xs_device.cpp are guarded by !inline_descriptors_on(). So no live descriptor slot count is kept for a texture either.
    • Render-target flag. At the loading screen of that run, 784 of the 1,280 live textures with a desktop copy (3.2 of 4.5 GiB) were created with ALLOW_RENDER_TARGET or ALLOW_DEPTH_STENCIL. Leaving out "targets" by their flag would therefore leave out most of the set.

    Ways I can see to get a signal. I have not started any of them:

    1. Scan the title's descriptor heaps. Periodically walk the title's shader-visible descriptor heap memory for the stand-in's view tokens, and mark the textures they name. Release only textures named by no token and held by no recorded list or submission (the RELEASE_RETIRED hold rule).
    2. Evict only without inline descriptors. Allow eviction only with X2W_D3D12_INLINE_DESCRIPTORS unset, using retire_view_refs == 0 plus the list holds. The presets record inline descriptors as a measured gain, so that trades one against the other.
    3. Something already planned in design: runtime model for the console's unified CPU/GPU memory (copies vs direct use of title memory) #1914's memory model that would make this unnecessary.

    On a 6 GB card the runs reach about 9.5 GiB local and the device is removed soon after the prologue loads. Is one of these the direction you want? If 2 is acceptable as a measurement, I can count the textures no descriptor slot names, on the same host with inline descriptors off.

    AI-assisted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedpriority: P0

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions