startup: defer heap-indexed root signatures and refuse real draws under them #1725

Merged
MasterDomino merged 1 commit from upstream-pr/1732 into main 2026-11-24 18:07:27 +00:00
MasterDomino commented 2026-11-24 17:56:08 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by MasterDomino on 2026-11-24T17:56:08Z.


What and why

Refs #870. Follows R0Y00's direction on #870 (17:12Z and 17:21Z): defer the native root bind until a real draw has the indexed heaps it needs, keep the translated path on its own root signature, refuse a real draw that lacks a heap or cannot restore the signature's state, and keep the unflagged path and the existing root-CBV controls. Supersedes the approach of the closed draft #1685 (a one-entry default sampler heap bound before the root signature); the debug-layer message callback with a plain-list control comes from that draft, hence the co-author trailer.

Command-list slot 34 forwarded every title root signature to the desktop list. Title root signatures carry D3D12_ROOT_SIGNATURE_FLAG_CBV_SRV_UAV_HEAP_DIRECTLY_INDEXED and/or SAMPLER_HEAP_DIRECTLY_INDEXED (0x400, 0x800), but slot 32 only tracks the title's heaps and never forwards them, so the debug layer reports message ID 1419 for each flag. In a local startup run (RX 9070 XT, driver 32.0.31044.16, X2W_D3D12_DEBUG=1, 75 s) unmodified main gave 394 ID-1419 messages out of 400 debug messages; a prototype of this change gave 0 of 6, with translated draws unchanged (14,419 vs 14,080, 0 not drawn). Translated draws bind their own root signature (create_translated_root, no flags) and are not a source of the message.

Change

  • Device slot 16 records the two heap-indexing flags of each title root signature (the CreateRootSignature log line now prints them).
  • Slot 34 keeps tracking the title's parameters, root addresses and constants for every root signature. An unflagged root signature is still set on the desktop list immediately. A flagged one is deferred: not set on the desktop list, logged (first three), counted. Root SRVs (slot 44) are not forwarded under a deferred root; their title address is still kept.
  • New header-only helper src/startup_stubs/heap_indexed_root.h: decide_real_root takes the flags, the mirrored view and sampler heaps on the list (bound, entries, whole), the highest index the draw reads (or unknown), and whether every root constant, descriptor table and root descriptor can be set again. It returns bind or a specific refusal: view heap missing, sampler heap missing, both heaps missing, root state not restorable. A heap covers a draw only at indices it holds, so a one-entry sampler heap covers index 0 only and never stands in for the view heap.
  • Real draw (slot 12) under a deferred root: the stand-in has no mirrored heap and keeps root constants and descriptor tables only as title values, so it asks the helper with those facts and the draw is refused, counted per reason, and logged (real draw refused: root signature heap flags 0x..., <reason>, first three per reason, then every 1000th). The x2w-render totals line adds heap-indexed roots deferred N (real draws refused: view heap, sampler heap, both heaps, state). The deferred bind after a bind decision is one line and is not reachable with the stand-in's facts.
  • Docs: docs/startup-runtime.md (Heap-indexed root signatures) and docs/experiments.md.

Tests

Branch startup/root-heap-indexed at 0ceece32, based on e4ac2c78. Windows 11 build 26300, MSVC 19.44.35221, Debug (--preset dev). WARP: Microsoft Basic Render Driver 10.0.26100.9818. Hardware: AMD Radeon RX 9070 XT, driver 32.0.31044.16. The draw fixtures enable the D3D12 debug layer in-process (X2W_TEST_DEBUG_LAYER=1); GPU-based validation off.

. .\tools\dev.ps1
cmake --preset dev
cmake --build --preset dev
ctest --preset dev --no-tests=error -R '^startup_(heap_indexed_root.*|root_heap_(warp|hardware)|root_cbv_(warp|hardware))$' -V
ctest --preset dev --no-tests=error -R '^startup_' -j 4

Real-draw decision coverage (device-free)

startup_heap_indexed_root: passed, 3222 of 3222 decisions as expected. 22 named cases (each flag alone, both, none; one-entry sampler heap at index 0, index 1 and unknown; sampler heap alone under both flags, with one entry and whole; view heap alone; neither; state lost with heaps present; other root flags; the stand-in's own request for each flag set) plus a 3200-case matrix: flags {0, 0x400, 0x800, 0xC00} x view heap {absent, one entry, four entries, whole} x highest view index {0, 1, 3, 4, unknown} x the same for samplers x restorable {no, yes}, compared with expectations written separately in the test.

startup_heap_indexed_root_sampler-alone_control and startup_heap_indexed_root_bind-unrestorable_control (WILL_FAIL): passed, i.e. the check failed with 2192/3200 and 2759/3200 matching under the mutated expectations.

This covers the decision only. No source-built fixture reaches the stand-in's real-draw branch (see Not covered).

Translated GPU readback and debug layer (source-built)

startup_root_heap_{warp,hardware}: the root CBV fixture (a translated pixel shader reading four floats through root parameter 0) with the title root signature created with each flag alone, both, and neither. For every flagged case the same root signature blob is first set on a plain desktop list with no heaps (fail-first control); it must report exactly one ID 1419 per flag, otherwise the run exits 77. Through the stand-in, every case must report 0 messages with ID 1419, draw the exact 32 pixels, and log one deferral line per slot-34 call (none for the unflagged case).

Case WARP RX 9070 XT
bound, flags 0x0 (unflagged, immediate bind) 32 px exact, stand-in 0 x 1419, 0 other errors same
bound, 0x400 control 1 x 1419; 32 px exact (yellow); stand-in 0 x 1419, 0 other errors same
bound, 0x800 control 1 x 1419; 32 px exact; stand-in 0, 0 other same
bound, 0xC00 control 2 x 1419; 32 px exact; stand-in 0, 0 other same
null, 0xC00 control 2 x 1419; 32 px exact (zeros); stand-in 0, 0 other same
switch_root, 0xC00 control 2 x 1419; 32 px exact (zeros, address cleared); stand-in 0, 0 other same

Result: startup_root_heap_warp passed (3.5 s), startup_root_heap_hardware passed (4.7 s). The hardware draw runs on the RX 9070 XT; the pipeline-preparation step of each case uses WARP as in the other stream fixtures.

The existing startup_root_cbv_{warp,hardware} (bound, unbound, null, same_root, switch_root, wrong_type; no debug layer, unflagged root signatures serialized as version 1.0 exactly as before) passed unchanged on both backends.

All startup tests

ctest --preset dev --no-tests=error -R '^startup_' -j 4: 198 tests, 194 passed, 0 failed, 4 skipped. The skips are capability skips unrelated to this change: startup_view_heap_{warp,hardware} and startup_logical_view_{warp,hardware} ("adapter accepts 1245184 descriptors directly"). Docs checks: tests/docs_links_check.py (17 files, 365 links) and tests/bidi_controls_check.py passed.

Negative controls

  • Slot 34 restored to forward every root signature (if (true) in place of if (!pass.root_heap_flags)): startup_root_heap_warp and startup_root_heap_hardware failed with AssertionError: bound 0x400: stand-in list: 1 messages with a control id or id 1419, 0 other errors. Run case by case under the same mutant, the stand-in reported 0 (0x0), 1 (0x400), 1 (0x800), 2 (0xC00), 2 (null 0xC00) and 6 (switch_root 0xC00) ID-1419 messages on both WARP and the RX 9070 XT, so each flag fails independently. startup_root_cbv_{warp,hardware} still passed under that mutant (no debug layer, no flags). Reverted.
  • Helper mutants, each failing startup_heap_indexed_root (exit 1), then reverted (3222/3222 again):
    • a bound sampler heap satisfies the view heap: FAIL both flags, one-entry sampler heap alone: ... -> bind, expected view heap missing (2559/3222);
    • refusal turned into bind when the state cannot be restored: FAIL both flags, both heaps, state lost: ... -> bind, expected root state not restorable (2778/3222);
    • a bound heap covers any index: FAIL sampler flag, one-entry heap, index 1: ... -> bind, expected sampler heap missing (2332/3222).

Not covered

  • The real-draw path end to end. On current main pipeline_real is set only by build_stream_pipeline, which needs compile_translation; that has returned no shader since e658fe24, so no source-built test can reach the real branch of list_draw. The refusal and its counters are checked only through the device-free decision matrix, not through a draw. As asked on #870, no alternate pipeline-build path was added for this slice. Because the stand-in cannot restore root constants and descriptor tables under a deferred root, the real path for flagged roots stays explicitly refused until a real end-to-end fixture exists.
  • Compute root signatures and other command-list slots are unchanged.
  • No claim about full-game startup or frame rate. The in-title message counts above come from a prototype of this change, not from this exact commit.

🤖 Generated with Claude Code

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6588096225 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/1732). Originally posted by [MasterDomino](https://github.com/MasterDomino) on 2026-11-24T17:56:08Z. --- ## What and why Refs #870. Follows R0Y00's direction on #870 (17:12Z and 17:21Z): defer the native root bind until a real draw has the indexed heaps it needs, keep the translated path on its own root signature, refuse a real draw that lacks a heap or cannot restore the signature's state, and keep the unflagged path and the existing root-CBV controls. Supersedes the approach of the closed draft #1685 (a one-entry default sampler heap bound before the root signature); the debug-layer message callback with a plain-list control comes from that draft, hence the co-author trailer. Command-list slot 34 forwarded every title root signature to the desktop list. Title root signatures carry `D3D12_ROOT_SIGNATURE_FLAG_CBV_SRV_UAV_HEAP_DIRECTLY_INDEXED` and/or `SAMPLER_HEAP_DIRECTLY_INDEXED` (`0x400`, `0x800`), but slot 32 only tracks the title's heaps and never forwards them, so the debug layer reports message ID 1419 for each flag. In a local startup run (RX 9070 XT, driver 32.0.31044.16, `X2W_D3D12_DEBUG=1`, 75 s) unmodified main gave 394 ID-1419 messages out of 400 debug messages; a prototype of this change gave 0 of 6, with translated draws unchanged (14,419 vs 14,080, 0 not drawn). Translated draws bind their own root signature (`create_translated_root`, no flags) and are not a source of the message. ## Change - Device slot 16 records the two heap-indexing flags of each title root signature (the `CreateRootSignature` log line now prints them). - Slot 34 keeps tracking the title's parameters, root addresses and constants for every root signature. An unflagged root signature is still set on the desktop list immediately. A flagged one is deferred: not set on the desktop list, logged (first three), counted. Root SRVs (slot 44) are not forwarded under a deferred root; their title address is still kept. - New header-only helper `src/startup_stubs/heap_indexed_root.h`: `decide_real_root` takes the flags, the mirrored view and sampler heaps on the list (bound, entries, whole), the highest index the draw reads (or unknown), and whether every root constant, descriptor table and root descriptor can be set again. It returns `bind` or a specific refusal: view heap missing, sampler heap missing, both heaps missing, root state not restorable. A heap covers a draw only at indices it holds, so a one-entry sampler heap covers index 0 only and never stands in for the view heap. - Real draw (slot 12) under a deferred root: the stand-in has no mirrored heap and keeps root constants and descriptor tables only as title values, so it asks the helper with those facts and the draw is refused, counted per reason, and logged (`real draw refused: root signature heap flags 0x..., <reason>`, first three per reason, then every 1000th). The `x2w-render totals` line adds `heap-indexed roots deferred N (real draws refused: view heap, sampler heap, both heaps, state)`. The deferred bind after a `bind` decision is one line and is not reachable with the stand-in's facts. - Docs: `docs/startup-runtime.md` (Heap-indexed root signatures) and `docs/experiments.md`. ## Tests Branch `startup/root-heap-indexed` at `0ceece32`, based on `e4ac2c78`. Windows 11 build 26300, MSVC 19.44.35221, Debug (`--preset dev`). WARP: Microsoft Basic Render Driver 10.0.26100.9818. Hardware: AMD Radeon RX 9070 XT, driver 32.0.31044.16. The draw fixtures enable the D3D12 debug layer in-process (`X2W_TEST_DEBUG_LAYER=1`); GPU-based validation off. ```powershell . .\tools\dev.ps1 cmake --preset dev cmake --build --preset dev ctest --preset dev --no-tests=error -R '^startup_(heap_indexed_root.*|root_heap_(warp|hardware)|root_cbv_(warp|hardware))$' -V ctest --preset dev --no-tests=error -R '^startup_' -j 4 ``` ### Real-draw decision coverage (device-free) `startup_heap_indexed_root`: passed, 3222 of 3222 decisions as expected. 22 named cases (each flag alone, both, none; one-entry sampler heap at index 0, index 1 and unknown; sampler heap alone under both flags, with one entry and whole; view heap alone; neither; state lost with heaps present; other root flags; the stand-in's own request for each flag set) plus a 3200-case matrix: flags {0, 0x400, 0x800, 0xC00} x view heap {absent, one entry, four entries, whole} x highest view index {0, 1, 3, 4, unknown} x the same for samplers x restorable {no, yes}, compared with expectations written separately in the test. `startup_heap_indexed_root_sampler-alone_control` and `startup_heap_indexed_root_bind-unrestorable_control` (`WILL_FAIL`): passed, i.e. the check failed with 2192/3200 and 2759/3200 matching under the mutated expectations. This covers the decision only. No source-built fixture reaches the stand-in's real-draw branch (see Not covered). ### Translated GPU readback and debug layer (source-built) `startup_root_heap_{warp,hardware}`: the root CBV fixture (a translated pixel shader reading four floats through root parameter 0) with the title root signature created with each flag alone, both, and neither. For every flagged case the same root signature blob is first set on a plain desktop list with no heaps (fail-first control); it must report exactly one ID 1419 per flag, otherwise the run exits 77. Through the stand-in, every case must report 0 messages with ID 1419, draw the exact 32 pixels, and log one deferral line per slot-34 call (none for the unflagged case). | Case | WARP | RX 9070 XT | |---|---|---| | `bound`, flags 0x0 (unflagged, immediate bind) | 32 px exact, stand-in 0 x 1419, 0 other errors | same | | `bound`, 0x400 | control 1 x 1419; 32 px exact (yellow); stand-in 0 x 1419, 0 other errors | same | | `bound`, 0x800 | control 1 x 1419; 32 px exact; stand-in 0, 0 other | same | | `bound`, 0xC00 | control 2 x 1419; 32 px exact; stand-in 0, 0 other | same | | `null`, 0xC00 | control 2 x 1419; 32 px exact (zeros); stand-in 0, 0 other | same | | `switch_root`, 0xC00 | control 2 x 1419; 32 px exact (zeros, address cleared); stand-in 0, 0 other | same | Result: `startup_root_heap_warp` passed (3.5 s), `startup_root_heap_hardware` passed (4.7 s). The hardware draw runs on the RX 9070 XT; the pipeline-preparation step of each case uses WARP as in the other stream fixtures. The existing `startup_root_cbv_{warp,hardware}` (bound, unbound, null, same_root, switch_root, wrong_type; no debug layer, unflagged root signatures serialized as version 1.0 exactly as before) passed unchanged on both backends. ### All startup tests `ctest --preset dev --no-tests=error -R '^startup_' -j 4`: 198 tests, 194 passed, 0 failed, 4 skipped. The skips are capability skips unrelated to this change: `startup_view_heap_{warp,hardware}` and `startup_logical_view_{warp,hardware}` ("adapter accepts 1245184 descriptors directly"). Docs checks: `tests/docs_links_check.py` (17 files, 365 links) and `tests/bidi_controls_check.py` passed. ## Negative controls - Slot 34 restored to forward every root signature (`if (true)` in place of `if (!pass.root_heap_flags)`): `startup_root_heap_warp` and `startup_root_heap_hardware` failed with `AssertionError: bound 0x400: stand-in list: 1 messages with a control id or id 1419, 0 other errors`. Run case by case under the same mutant, the stand-in reported 0 (0x0), 1 (0x400), 1 (0x800), 2 (0xC00), 2 (`null` 0xC00) and 6 (`switch_root` 0xC00) ID-1419 messages on both WARP and the RX 9070 XT, so each flag fails independently. `startup_root_cbv_{warp,hardware}` still passed under that mutant (no debug layer, no flags). Reverted. - Helper mutants, each failing `startup_heap_indexed_root` (exit 1), then reverted (3222/3222 again): - a bound sampler heap satisfies the view heap: `FAIL both flags, one-entry sampler heap alone: ... -> bind, expected view heap missing` (2559/3222); - refusal turned into bind when the state cannot be restored: `FAIL both flags, both heaps, state lost: ... -> bind, expected root state not restorable` (2778/3222); - a bound heap covers any index: `FAIL sampler flag, one-entry heap, index 1: ... -> bind, expected sampler heap missing` (2332/3222). ## Not covered - The real-draw path end to end. On current main `pipeline_real` is set only by `build_stream_pipeline`, which needs `compile_translation`; that has returned no shader since e658fe24, so no source-built test can reach the real branch of `list_draw`. The refusal and its counters are checked only through the device-free decision matrix, not through a draw. As asked on #870, no alternate pipeline-build path was added for this slice. Because the stand-in cannot restore root constants and descriptor tables under a deferred root, the real path for flagged roots stays explicitly refused until a real end-to-end fixture exists. - Compute root signatures and other command-list slots are unchanged. - No claim about full-game startup or frame rate. The in-title message counts above come from a prototype of this change, not from this exact commit. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
MasterDomino commented 2026-11-24 18:03:00 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by MasterDomino on 2026-11-24T17:56:18Z.


@tedin7 this is the single implementation from #870 that replaces #1685; your message-callback counter and plain-list control are in tests/startup_root_heap.cpp (co-author trailer on the commit). A Windows Debug + Release /O2 run from you would be welcome, since I've only run Debug here.

AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7139920230 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/1732#issuecomment-7139920230). Originally posted by [MasterDomino](https://github.com/MasterDomino) on 2026-11-24T17:56:18Z. --- @tedin7 this is the single implementation from #870 that replaces #1685; your message-callback counter and plain-list control are in `tests/startup_root_heap.cpp` (co-author trailer on the commit). A Windows Debug + Release /O2 run from you would be welcome, since I've only run Debug here. AI-assisted.
upstream-sync closed this pull request 2026-11-24 19:01:09 +00:00
tedin7 commented 2026-11-24 19:01:09 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-24T18:06:09Z.

Review: COMMENTED


Review of PR #1732 (0ceece32c0db5aa961bcdb1727ad39b470a0376c).

Findings

No blocking issues found.

  • Note (environment / coverage): On the Windows Server 2025 WARP VM, startup_root_heap_warp capability-skipped (exit 77, debug layer unavailable), so the live debug-layer ID-1419 suppression check in startup_root_heap_{warp,hardware} was not exercised on that node. All other targeted tests—including startup_heap_indexed_root, both WILL_FAIL negative controls, startup_root_cbv_warp, startup_stream_*, and startup_stubs—passed in both Debug and Release /O2.

What looks good

  • Heap-indexed root deferral (src/startup_stubs/d3d12_xs_device.cpp):
    • Device slot 16 (device_create_root_signature) extracts D3D12_ROOT_SIGNATURE_FLAG_CBV_SRV_UAV_HEAP_DIRECTLY_INDEXED (0x400) and SAMPLER_HEAP_DIRECTLY_INDEXED (0x800) into root_heap_flag_map().
    • Command-list slot 34 (list_graphics_root) keeps tracking pass.root and pass.root_address for all root signatures, binds unflagged ones immediately on the desktop list, and defers flagged ones (pass.root_heap_flags, pass.deferred_root, logged first 3, counted in heap_roots_deferred), clearing pass.root_heap_flags / pass.deferred_root when a null or non-root-signature is passed.
    • Slot 44 (list_root_srv) avoids forwarding root SRVs to the desktop list under a deferred root while still recording pass.root_address.
  • Safe refusal of real draws (src/startup_stubs/heap_indexed_root.h, list_draw):
    • Translated draws (!pass.pipeline_real) run before the deferred-root check and continue using their own unflagged root signature. list_draw_indexed in src/startup_stubs/d3d12_draw.inl only dispatches draw_translated and has no real-draw branch.
    • Real draws in list_draw under pass.root_heap_flags consult x2w_startup::decide_real_root with absent mirrored heaps and state_restorable = false, returning safely without drawing or touching uninitialized handles, while updating heap_root_refusals[decision], render_draws_skipped, and x2w-render totals.
    • heap_covers and decide_real_root check heap.bound and (heap.whole || (highest != unknown_heap_index && highest < heap.entries)), keep view and sampler heap requirements independent, and check state_restorable after heap coverage.
  • Coverage separation & title-neutrality:
    • Real-draw decision coverage (startup_heap_indexed_root + two WILL_FAIL controls) and translated GPU readback (startup_root_heap_{warp,hardware}) are reported separately, with the unreached list_draw real-draw branch explicitly noted under "Not covered".
    • Diff and docs are 100% title-neutral.

Checks & verification

  • python3 /root/.local/state/xbox2windows/pipeline/x2w_pipe.py prep-verify 1732 --dir /tmp/rev-x2w-83/1732 --json: git_diff_check, docs_links_check, bidi_controls_check, py_compile (1 file) all passed.
  • Win2025 (x2w_pipe.py win2025 1732 --targets cpu_shim_startup,cpu_shim_startup_guest,cpu_shim_startup_lifted,d3d12_xs_shim,startup_heap_indexed_root_check,startup_stream_consumer,startup_stream_depth,startup_stub_consumer --regex '^(startup_heap_indexed_root|startup_heap_indexed_root_bind-unrestorable_control|startup_heap_indexed_root_sampler-alone_control|startup_root_heap_warp|startup_root_cbv_warp|startup_stream_draw_warp|startup_stream_depth_warp|startup_stream_request_warp|startup_stream_viewport_warp|startup_stubs)$'):
    • Debug (--preset dev): build 21.77s, 9/10 passed (4.72s), startup_root_heap_warp skipped (exit 77).
    • Release /O2 (--preset release): build 38.85s, 9/10 passed (4.88s), startup_root_heap_warp skipped (exit 77).
  • Win2025 --patch mutation (heap_covers in src/startup_stubs/heap_indexed_root.h mutated to return heap.bound;):
    • x2w_pipe.py win2025 1732 --patch ... --skip-release --targets startup_heap_indexed_root_check --regex '^(startup_heap_indexed_root|startup_heap_indexed_root_bind-unrestorable_control|startup_heap_indexed_root_sampler-alone_control)$': startup_heap_indexed_root failed as expected (2332 of 3222 heap-indexed root decisions as expected, exit code 1).

AI-assisted; commands listed were executed locally.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6044725666 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/1732#pullrequestreview-6044725666). Originally posted by [tedin7](https://github.com/tedin7) on 2026-11-24T18:06:09Z. **Review:** COMMENTED --- Review of PR #1732 (`0ceece32c0db5aa961bcdb1727ad39b470a0376c`). ### Findings No blocking issues found. - **Note (environment / coverage):** On the Windows Server 2025 WARP VM, `startup_root_heap_warp` capability-skipped (exit 77, debug layer unavailable), so the live debug-layer ID-1419 suppression check in `startup_root_heap_{warp,hardware}` was not exercised on that node. All other targeted tests—including `startup_heap_indexed_root`, both `WILL_FAIL` negative controls, `startup_root_cbv_warp`, `startup_stream_*`, and `startup_stubs`—passed in both Debug and Release `/O2`. ### What looks good - **Heap-indexed root deferral (`src/startup_stubs/d3d12_xs_device.cpp`):** - Device slot 16 (`device_create_root_signature`) extracts `D3D12_ROOT_SIGNATURE_FLAG_CBV_SRV_UAV_HEAP_DIRECTLY_INDEXED` (`0x400`) and `SAMPLER_HEAP_DIRECTLY_INDEXED` (`0x800`) into `root_heap_flag_map()`. - Command-list slot 34 (`list_graphics_root`) keeps tracking `pass.root` and `pass.root_address` for all root signatures, binds unflagged ones immediately on the desktop list, and defers flagged ones (`pass.root_heap_flags`, `pass.deferred_root`, logged first 3, counted in `heap_roots_deferred`), clearing `pass.root_heap_flags` / `pass.deferred_root` when a null or non-root-signature is passed. - Slot 44 (`list_root_srv`) avoids forwarding root SRVs to the desktop list under a deferred root while still recording `pass.root_address`. - **Safe refusal of real draws (`src/startup_stubs/heap_indexed_root.h`, `list_draw`):** - Translated draws (`!pass.pipeline_real`) run before the deferred-root check and continue using their own unflagged root signature. `list_draw_indexed` in `src/startup_stubs/d3d12_draw.inl` only dispatches `draw_translated` and has no real-draw branch. - Real draws in `list_draw` under `pass.root_heap_flags` consult `x2w_startup::decide_real_root` with absent mirrored heaps and `state_restorable = false`, returning safely without drawing or touching uninitialized handles, while updating `heap_root_refusals[decision]`, `render_draws_skipped`, and `x2w-render totals`. - `heap_covers` and `decide_real_root` check `heap.bound` and `(heap.whole || (highest != unknown_heap_index && highest < heap.entries))`, keep view and sampler heap requirements independent, and check `state_restorable` after heap coverage. - **Coverage separation & title-neutrality:** - Real-draw decision coverage (`startup_heap_indexed_root` + two `WILL_FAIL` controls) and translated GPU readback (`startup_root_heap_{warp,hardware}`) are reported separately, with the unreached `list_draw` real-draw branch explicitly noted under "Not covered". - Diff and docs are 100% title-neutral. ### Checks & verification - `python3 /root/.local/state/xbox2windows/pipeline/x2w_pipe.py prep-verify 1732 --dir /tmp/rev-x2w-83/1732 --json`: `git_diff_check`, `docs_links_check`, `bidi_controls_check`, `py_compile` (1 file) all passed. - Win2025 (`x2w_pipe.py win2025 1732 --targets cpu_shim_startup,cpu_shim_startup_guest,cpu_shim_startup_lifted,d3d12_xs_shim,startup_heap_indexed_root_check,startup_stream_consumer,startup_stream_depth,startup_stub_consumer --regex '^(startup_heap_indexed_root|startup_heap_indexed_root_bind-unrestorable_control|startup_heap_indexed_root_sampler-alone_control|startup_root_heap_warp|startup_root_cbv_warp|startup_stream_draw_warp|startup_stream_depth_warp|startup_stream_request_warp|startup_stream_viewport_warp|startup_stubs)$'`): - Debug (`--preset dev`): build `21.77s`, **9/10 passed** (`4.72s`), `startup_root_heap_warp` skipped (exit 77). - Release `/O2` (`--preset release`): build `38.85s`, **9/10 passed** (`4.88s`), `startup_root_heap_warp` skipped (exit 77). - Win2025 `--patch` mutation (`heap_covers` in `src/startup_stubs/heap_indexed_root.h` mutated to `return heap.bound;`): - `x2w_pipe.py win2025 1732 --patch ... --skip-release --targets startup_heap_indexed_root_check --regex '^(startup_heap_indexed_root|startup_heap_indexed_root_bind-unrestorable_control|startup_heap_indexed_root_sampler-alone_control)$'`: `startup_heap_indexed_root` **failed** as expected (`2332 of 3222 heap-indexed root decisions as expected`, exit code 1). AI-assisted; commands listed were executed locally.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
R0Y00/Xbox2Windows!1725
No description provided.