startup: count acceleration-structure refusals by name in the slot 70 census #2800

Merged
RenzoWit35 merged 1 commit from upstream-pr/2808 into main 2026-11-26 11:11:19 +00:00
RenzoWit35 commented 2026-11-26 11:01:25 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by RenzoWit35 on 2026-11-26T11:01:25Z.


Change

publish_as_srv in src/startup_stubs/d3d12_memory_srv.inl passes as_srv_refusal_name(refusal) (as_unaligned, as_not_placed, as_wrong_state) to refuse_memory_srv, which calls memory_srv_census.note. Neither memory_srv_reasons (memory_srv_census.h) nor SLOT70_REASONS (tools/startup/triage_run.py) listed them, so both reports folded them into "other".

  • Add the three names to both tables, after gpu_written_resource and before buffer_unavailable (the order device_memory_srv reaches them), with a group comment in the style of the existing ones.
  • memory_srv_reason_has_shape: the three reasons keep no shape. The acceleration-structure path does not read the resource description (memory_srv_refusal skips the readability check for such a view, and resolve_as_srv_desc takes only the location and view), so a "shape" built from it would describe whatever the caller left in that argument. This matches the existing exclusions for reasons that do not depend on the description. Question for review: if you would rather keep shapes for these, drop the three extra lines in memory_srv_reason_has_shape.
  • Update the expected report line in tests/startup_memory_srv_census_check.cpp and tests/startup_memory_srv_diag_check.py, and the sentence in docs/startup-runtime.md that lists the reasons without a shape.
  • The census report line gains three counters, so indexes after gpu_written_resource shift by three. Nothing uses the indexes outside memory_srv_census.h (lookups are by name).

Verification

  • Reachability: git grep -n -e refuse_memory_srv -e as_srv_refusal_name -- src on origin/main. Every reason the .inl can log: the 16 already listed, plus the three above. console_address_hold returns only console_layout_xg_rows, console_layout_without_footprints, console_layout_beyond_xg_size. No other name is missing from either list.
  • tests/startup_memory_srv_census_check.cpp (CTest startup_memory_srv_census): iterates every name as_srv_refusal_name returns (stops at "none"), requires an index below memory_srv_reason_count, no shape, and the name in a fresh report with other 0. The hard-coded summary line also changed.
  • tests/startup_triage_run_check.py: the three names added to the every-reason case list, plus a check that reads the names from memory_srv_as.h and requires them in SLOT70_REASONS.
  • Commands and results (worktree, fixed tree):
    • out\pe-env\Scripts\python.exe -B tests\startup_triage_run_check.py: startup triage_run checks: 0 failed.
    • cmake --build out/build/dev --target startup_memory_srv_census_check then ctest --test-dir out/build/dev -R '^startup_memory_srv_census$': passed.
    • cmake --build out/build/dev --target startup_stream_consumer then ctest -R '^startup_memory_srv_diag_(warp|supported_control_warp)$': both passed (this check parses the census report line).
  • Negative controls:
    • Python: with the three names removed from SLOT70_REASONS the check fails with 4 failures (reported list lacks them, three "SLOT70_REASONS lacks ..." lines).
    • C++: the new test compiled against git show origin/main:src/startup_stubs/memory_srv_census.h fails (3x "acceleration-structure refusal has its own census reason", "as_unaligned is reported by name", "summary").

Evidence and follow-up

  • Not run: the _hardware variants of startup_memory_srv_diag, the full CTest suite, the Linux CI Python list as a whole. The census has no _control target of its own; the controls above were run by hand.
  • No game files; synthetic inputs only.
  • Overlap: #2251 (census) and #1938 (acceleration-structure views) are merged; no open PR found touching these lists.

AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6625205601 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2808). Originally posted by [RenzoWit35](https://github.com/RenzoWit35) on 2026-11-26T11:01:25Z. --- ## Change `publish_as_srv` in `src/startup_stubs/d3d12_memory_srv.inl` passes `as_srv_refusal_name(refusal)` (`as_unaligned`, `as_not_placed`, `as_wrong_state`) to `refuse_memory_srv`, which calls `memory_srv_census.note`. Neither `memory_srv_reasons` (`memory_srv_census.h`) nor `SLOT70_REASONS` (`tools/startup/triage_run.py`) listed them, so both reports folded them into "other". - Add the three names to both tables, after `gpu_written_resource` and before `buffer_unavailable` (the order `device_memory_srv` reaches them), with a group comment in the style of the existing ones. - `memory_srv_reason_has_shape`: the three reasons keep no shape. The acceleration-structure path does not read the resource description (`memory_srv_refusal` skips the readability check for such a view, and `resolve_as_srv_desc` takes only the location and view), so a "shape" built from it would describe whatever the caller left in that argument. This matches the existing exclusions for reasons that do not depend on the description. Question for review: if you would rather keep shapes for these, drop the three extra lines in `memory_srv_reason_has_shape`. - Update the expected report line in `tests/startup_memory_srv_census_check.cpp` and `tests/startup_memory_srv_diag_check.py`, and the sentence in `docs/startup-runtime.md` that lists the reasons without a shape. - The census report line gains three counters, so indexes after `gpu_written_resource` shift by three. Nothing uses the indexes outside `memory_srv_census.h` (lookups are by name). ## Verification - Reachability: `git grep -n -e refuse_memory_srv -e as_srv_refusal_name -- src` on origin/main. Every reason the `.inl` can log: the 16 already listed, plus the three above. `console_address_hold` returns only `console_layout_xg_rows`, `console_layout_without_footprints`, `console_layout_beyond_xg_size`. No other name is missing from either list. - `tests/startup_memory_srv_census_check.cpp` (CTest `startup_memory_srv_census`): iterates every name `as_srv_refusal_name` returns (stops at "none"), requires an index below `memory_srv_reason_count`, no shape, and the name in a fresh report with `other 0`. The hard-coded summary line also changed. - `tests/startup_triage_run_check.py`: the three names added to the every-reason case list, plus a check that reads the names from `memory_srv_as.h` and requires them in `SLOT70_REASONS`. - Commands and results (worktree, fixed tree): - `out\pe-env\Scripts\python.exe -B tests\startup_triage_run_check.py`: `startup triage_run checks: 0 failed`. - `cmake --build out/build/dev --target startup_memory_srv_census_check` then `ctest --test-dir out/build/dev -R '^startup_memory_srv_census$'`: passed. - `cmake --build out/build/dev --target startup_stream_consumer` then `ctest -R '^startup_memory_srv_diag_(warp|supported_control_warp)$'`: both passed (this check parses the census report line). - Negative controls: - Python: with the three names removed from `SLOT70_REASONS` the check fails with 4 failures (reported list lacks them, three "SLOT70_REASONS lacks ..." lines). - C++: the new test compiled against `git show origin/main:src/startup_stubs/memory_srv_census.h` fails (3x "acceleration-structure refusal has its own census reason", "as_unaligned is reported by name", "summary"). ## Evidence and follow-up - Not run: the `_hardware` variants of `startup_memory_srv_diag`, the full CTest suite, the Linux CI Python list as a whole. The census has no `_control` target of its own; the controls above were run by hand. - No game files; synthetic inputs only. - Overlap: #2251 (census) and #1938 (acceleration-structure views) are merged; no open PR found touching these lists. AI-assisted.
upstream-sync closed this pull request 2026-11-26 12:04:46 +00:00
tedin7 commented 2026-11-26 12:04:47 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-26T11:07:21Z.

Review: COMMENTED


Review of head 68fdf7ec (comment only).

Checked against origin/main:

  • The three names match as_srv_refusal_name in memory_srv_as.h exactly (as_unaligned, as_not_placed, as_wrong_state); order in memory_srv_reasons and SLOT70_REASONS matches.
  • No shape for these reasons is consistent with the existing exclusions: the acceleration-structure path does not read the resource description. Fine to keep as is.
  • Both new tests guard the behavior: the C++ test enumerates names from as_srv_refusal_name, and the Python test reads them from the header, so a fourth refusal that is not listed fails.
  • No sibling table left out: only memory_srv_census.h and triage_run.py hold the list; the summary line in the C++ test and the docs sentence were updated.
  • No other open or merged PR covers this slice (searched "acceleration-structure census").

Commands run locally (Linux):

  • python3 tests/startup_triage_run_check.py -> 0 failed
  • python3 tests/docs_links_check.py -> ok; python3 tests/bidi_controls_check.py -> ok; git diff --check origin/main...HEAD -> clean
  • Mutation: removing as_wrong_state from SLOT70_REASONS makes startup_triage_run_check.py fail (2 failures); restored afterwards.

Not run here: the C++ census test (needs the Windows build); a Win2025 run follows.

AI-assisted; commands listed were executed locally.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6073051596 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2808#pullrequestreview-6073051596). Originally posted by [tedin7](https://github.com/tedin7) on 2026-11-26T11:07:21Z. **Review:** COMMENTED --- Review of head 68fdf7ec (comment only). Checked against origin/main: - The three names match `as_srv_refusal_name` in `memory_srv_as.h` exactly (`as_unaligned`, `as_not_placed`, `as_wrong_state`); order in `memory_srv_reasons` and `SLOT70_REASONS` matches. - No shape for these reasons is consistent with the existing exclusions: the acceleration-structure path does not read the resource description. Fine to keep as is. - Both new tests guard the behavior: the C++ test enumerates names from `as_srv_refusal_name`, and the Python test reads them from the header, so a fourth refusal that is not listed fails. - No sibling table left out: only `memory_srv_census.h` and `triage_run.py` hold the list; the summary line in the C++ test and the docs sentence were updated. - No other open or merged PR covers this slice (searched "acceleration-structure census"). Commands run locally (Linux): - `python3 tests/startup_triage_run_check.py` -> 0 failed - `python3 tests/docs_links_check.py` -> ok; `python3 tests/bidi_controls_check.py` -> ok; `git diff --check origin/main...HEAD` -> clean - Mutation: removing `as_wrong_state` from `SLOT70_REASONS` makes `startup_triage_run_check.py` fail (2 failures); restored afterwards. Not run here: the C++ census test (needs the Windows build); a Win2025 run follows. AI-assisted; commands listed were executed locally.
tedin7 commented 2026-11-26 12:04:55 +00:00 (Migrated from github.com)

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


Win2025 WARP receipt for head 68fdf7ec (no update needed, up to date).

Verified on Windows Server 2025 (Build 26100, MSVC 14.44.35207 + D3D12 WARP) at commit 68fdf7ec18c06b1c72b22594beaa0b93364002d0:

  • Debug (--preset dev):
    • Build (cmake --build --preset dev --target d3d12_xs_device_obj d3d12_xs_shim startup_memory_srv_census_check startup_stub_xcrdapi -- -j 2): 30.36s (configure 2.27s)
    • Test (ctest --preset dev -R 'startup_memory_srv_census|startup_memory_srv_diag|startup_triage_run' --parallel 6 --no-tests=error --output-on-failure): 6/6 passed (3.46s: startup_memory_srv_census 0.02s, startup_triage_run 0.67s, startup_memory_srv_diag_supported_control_warp 0.79s, startup_memory_srv_diag_warp 0.78s, startup_memory_srv_diag_hardware 0.83s, runtime_startup_triage_run_cli_check 3.29s)
  • Release /O2 (--preset release):
    • Build (cmake --build --preset release --target d3d12_xs_device_obj d3d12_xs_shim startup_memory_srv_census_check startup_stub_xcrdapi -- -j 2): 50.63s (configure 1.93s)
    • Test (ctest --preset release -R 'startup_memory_srv_census|startup_memory_srv_diag|startup_triage_run' --parallel 6 --no-tests=error --output-on-failure): 6/6 passed (2.49s: startup_memory_srv_census 0.02s, startup_triage_run 0.46s, startup_memory_srv_diag_warp 0.64s, startup_memory_srv_diag_supported_control_warp 0.64s, startup_memory_srv_diag_hardware 0.65s, runtime_startup_triage_run_cli_check 2.35s)
  • Windows Python checks: tests/startup_triage_run_check.py ok (0.4s)
  • sccache: 2/16 hits; wall 93.7s

Real-GPU run not available (RunPod stopped).

AI-assisted; commands listed were executed locally.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7190340686 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2808#issuecomment-7190340686). Originally posted by [tedin7](https://github.com/tedin7) on 2026-11-26T11:09:06Z. --- Win2025 WARP receipt for head 68fdf7ec (no update needed, up to date). Verified on Windows Server 2025 (Build 26100, MSVC 14.44.35207 + D3D12 WARP) at commit `68fdf7ec18c06b1c72b22594beaa0b93364002d0`: - **Debug (`--preset dev`)**: - Build (`cmake --build --preset dev --target d3d12_xs_device_obj d3d12_xs_shim startup_memory_srv_census_check startup_stub_xcrdapi -- -j 2`): `30.36s` (configure `2.27s`) - Test (`ctest --preset dev -R 'startup_memory_srv_census|startup_memory_srv_diag|startup_triage_run' --parallel 6 --no-tests=error --output-on-failure`): **6/6 passed** (`3.46s`: `startup_memory_srv_census` `0.02s`, `startup_triage_run` `0.67s`, `startup_memory_srv_diag_supported_control_warp` `0.79s`, `startup_memory_srv_diag_warp` `0.78s`, `startup_memory_srv_diag_hardware` `0.83s`, `runtime_startup_triage_run_cli_check` `3.29s`) - **Release `/O2` (`--preset release`)**: - Build (`cmake --build --preset release --target d3d12_xs_device_obj d3d12_xs_shim startup_memory_srv_census_check startup_stub_xcrdapi -- -j 2`): `50.63s` (configure `1.93s`) - Test (`ctest --preset release -R 'startup_memory_srv_census|startup_memory_srv_diag|startup_triage_run' --parallel 6 --no-tests=error --output-on-failure`): **6/6 passed** (`2.49s`: `startup_memory_srv_census` `0.02s`, `startup_triage_run` `0.46s`, `startup_memory_srv_diag_warp` `0.64s`, `startup_memory_srv_diag_supported_control_warp` `0.64s`, `startup_memory_srv_diag_hardware` `0.65s`, `runtime_startup_triage_run_cli_check` `2.35s`) - **Windows Python checks**: `tests/startup_triage_run_check.py` ok (`0.4s`) - `sccache`: 2/16 hits; wall `93.7s` Real-GPU run not available (RunPod stopped). 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!2800
No description provided.