RT-COMPUTE-SPILL-DIAG: add compute root spills and startup diagnostics #1487

Open
github-bot wants to merge 1 commit from github-bot/gh-1487 into main AGit
Owner

@⁠fuegon7 on GitHub · 2026-11-25 01:36 UTC · original
fuegon7:codex/compute-root-spill-xmem-diagnostics → main · +227 −41 · 6 files · 1 commits · open

Claimed in the coordination issue as: RT-COMPUTE-SPILL-DIAG

Depends on: none

Fixes: none

What and why

Implements the measured compute root-argument layout for parameters beyond the inline s4..s31 window. Spill arguments are packed in root order into a host-visible upload buffer; each dispatch snapshots its values and puts the buffer GPU address in s0:s1. Graphics root signatures that exceed their measured layout remain rejected.

Adds focused diagnostics around compute pipeline matching/creation and large XMem physical-page allocation/mapping, to make early retail startup failures easier to localize.

Observed on a retail startup run: the 99,776-page XMem allocation and mapping succeeded; compute PSO #36 for bvh/ReloadTriangles was created successfully and execution reached ExecuteCommandLists. The title then raised an access violation reading 0x100000000. Six CreatePipelineState calls also failed because their vertex shader hashes had no translated-shader match. These observations do not establish the cause of the crash, and this PR is not presented as a confirmed fix for it. The spill dispatch path still needs validation against a game shader that actually spills.

No game files, translated shaders, or raw logs are included.

Tested

git diff --check passed. Build.bat and the test suites were not run here; the contributor will run Build.bat locally. The retail startup run reached ExecuteCommandLists and reproduced the access violation described above; it is diagnostic evidence, not a successful launch or correctness test.

GPUs tested: NVIDIA GeForce RTX 3070 Ti, Windows 11; driver version was not recorded. System: Intel Core i7-12700K, 32 GB RAM. No GPU correctness tests were run.

AI-assisted: yes

Checklist

  • Based on current main and merges cleanly (the comparison shows it can be automatically merged).
  • One topic: runtime compute root arguments and diagnostics from the same startup investigation.
  • No game data, keys or decryption, including in logs or reports quoted here.
  • A new translator rule is in the contract table of docs/design.md, with how it was confirmed. N/A: this PR adds no translator rule.
**@⁠fuegon7** on GitHub · 2026-11-25 01:36 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1487) `fuegon7:codex/compute-root-spill-xmem-diagnostics` → `main` · +227 −41 · 6 files · 1 commits · open Claimed in the coordination issue as: RT-COMPUTE-SPILL-DIAG Depends on: none Fixes: none ### What and why Implements the measured compute root-argument layout for parameters beyond the inline s4..s31 window. Spill arguments are packed in root order into a host-visible upload buffer; each dispatch snapshots its values and puts the buffer GPU address in s0:s1. Graphics root signatures that exceed their measured layout remain rejected. Adds focused diagnostics around compute pipeline matching/creation and large XMem physical-page allocation/mapping, to make early retail startup failures easier to localize. Observed on a retail startup run: the 99,776-page XMem allocation and mapping succeeded; compute PSO #36 for bvh/ReloadTriangles was created successfully and execution reached ExecuteCommandLists. The title then raised an access violation reading 0x100000000. Six CreatePipelineState calls also failed because their vertex shader hashes had no translated-shader match. These observations do not establish the cause of the crash, and this PR is not presented as a confirmed fix for it. The spill dispatch path still needs validation against a game shader that actually spills. No game files, translated shaders, or raw logs are included. ### Tested git diff --check passed. Build.bat and the test suites were not run here; the contributor will run Build.bat locally. The retail startup run reached ExecuteCommandLists and reproduced the access violation described above; it is diagnostic evidence, not a successful launch or correctness test. GPUs tested: NVIDIA GeForce RTX 3070 Ti, Windows 11; driver version was not recorded. System: Intel Core i7-12700K, 32 GB RAM. No GPU correctness tests were run. AI-assisted: yes ### Checklist - [x] Based on current main and merges cleanly (the comparison shows it can be automatically merged). - [x] One topic: runtime compute root arguments and diagnostics from the same startup investigation. - [x] No game data, keys or decryption, including in logs or reports quoted here. - [ ] A new translator rule is in the contract table of docs/design.md, with how it was confirmed. N/A: this PR adds no translator rule.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 09:53:43 +00:00
Author
Owner

@⁠ytsodacan on GitHub · 2026-11-25 03:36 UTC · original · edited 2026-11-25 03:43 UTC

[KEEP]

  • The PR is CONFLICTING/DIRTY against main and no CI checks are reported, so it can't be merged as is. It needs a rebase.
  • It says Build.bat and the test suites were not run, and the spill dispatch path hasn't been validated against a shader that actually spills. The description says the access violation at 0x100000000 is not explained.
  • Scope is wide for one change (about 6 files): the spill implementation in runtime/shims/d3d12_com.cpp/.h and d3d12_vulkan_device.cpp, docs/d3d12_vulkan.md rewrites, and unrelated diagnostics in d3d12_xs_device.cpp. Splitting the diagnostics from the spill logic would ease review.
  • It overlaps open #1009 (ROOT-SIG-SPILL-MODEL, immutable compute root-argument blocks), which needs a maintainer decision on which approach to keep.
**@⁠ytsodacan** on GitHub · 2026-11-25 03:36 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1487#issuecomment-7152065241) · edited 2026-11-25 03:43 UTC **[KEEP]** - The PR is `CONFLICTING`/DIRTY against main and no CI checks are reported, so it can't be merged as is. It needs a rebase. - It says Build.bat and the test suites were not run, and the spill dispatch path hasn't been validated against a shader that actually spills. The description says the access violation at 0x100000000 is not explained. - Scope is wide for one change (about 6 files): the spill implementation in `runtime/shims/d3d12_com.cpp`/`.h` and `d3d12_vulkan_device.cpp`, `docs/d3d12_vulkan.md` rewrites, and unrelated diagnostics in `d3d12_xs_device.cpp`. Splitting the diagnostics from the spill logic would ease review. - It overlaps open #1009 (ROOT-SIG-SPILL-MODEL, immutable compute root-argument blocks), which needs a maintainer decision on which approach to keep.
This pull request has changes conflicting with the target branch.
  • docs/d3d12_vulkan.md
  • runtime/shims/d3d12_com.cpp
  • runtime/shims/d3d12_com.h
  • runtime/shims/d3d12_vulkan_device.cpp
  • runtime/shims/xmem.cpp
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/1487/head:github-bot/gh-1487'
git switch 'github-bot/gh-1487'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-1487'
git switch 'github-bot/gh-1487'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-1487'
git switch 'github-bot/gh-1487'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-1487'
git switch 'main'
git merge --squash 'github-bot/gh-1487'
git switch 'main'
git merge --ff-only 'github-bot/gh-1487'
git switch 'main'
git merge 'github-bot/gh-1487'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.