docs: the BVH builder's 52 programs all translate, and pipeline-state streams are implemented (DOC-BVH-BUILDER-52) #1087

Merged
milk4sale merged 2 commits from upstream-pr/1087 into main 2026-11-25 01:21:00 +00:00
milk4sale commented 2026-11-24 18:11:57 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by milk4sale on 2026-11-24T18:11:57Z.


Claimed in the coordination issue as: DOC-BVH-BUILDER-52 (claim)

What and why

Three docs say 51 of the 52 XboxBvhBuilder.dll programs translate and one rule, buffer_store_short, is still missing. That rule has been in tools/rdna2spirv.py since 8f208d09a, and docs/embedded_shaders.md section 7 already records "52 of 52" for main 8575d36e, so the pages contradict themselves and each other.

  • docs/d3d12_vulkan.md: the eight passages that give the count now say all 52 translate and pass spirv-val (sections 4.8 and 7.2, the M6 row, open question 7, the risks list, Appendix A.2). Section 7.2 held the same paragraph twice, the second copy starting mid-sentence; it is one paragraph again. The Appendix A.2 measurement keeps its numbers and says what changed since.
  • docs/d3d12_vulkan.md section 3.6: one sentence said pipeline-state streams (CreatePipelineState) "are not implemented yet", 50 lines above "Implemented (D3D-29): pipeline state streams, mesh PSOs and DispatchMesh". It now points there, and says an unknown subobject type is E_INVALIDARG, as parse_pipeline_stream answers and that section states.
  • docs/embedded_shaders.md: sections 4, 5 and 7: the result table, the two blocker tables, "What this changes" and the build step's report line. The dated measurements of 51 modules (the creation table, the vk_pipeline_check runs) stay as they are.
  • docs/README.md: the index row for embedded_shaders.md.

Left alone on purpose: open question 20's row in d3d12_vulkan.md carries the same count, but #381 rewrites that line, so it needs the number there. The status paragraph at the top, the "Known gaps" paragraphs and the descriptor-path gaps are also stale and are already handled by #424/#429, #381 and #513.

Tested

  • Measured on main 3aa975421 with my own 1.0.2.1 package, using the four tools the build step runs (pe_shader_containers.py --extract, fssm_unpack.py, shader_disasm.py --mcpu gfx1013, rdna2spirv.py --max-shared-memory 32768): 52 containers extracted, 52 FSSM blobs, 52 translated, and spirv-val --target-env vulkan1.2 accepts all 52 modules, both natively and with --wave64-emulate. LLVM 23.1.4. Counts only; the outputs stayed outside the repository.
  • make_game.py's shaders stage, run from main on that package earlier the same day (2026-11-24, about 07:54 UTC), reported 52 of 52 XboxBvhBuilder.dll programs translated.
  • The pipeline-stream sentence was checked against ID3D12Device2::CreatePipelineState and parse_pipeline_stream in runtime/shims/d3d12_vulkan_device.cpp; d3d12_mesh_test builds an MS + PS and a VS + PS PSO from streams.
  • Every tests/test_docs_*.py passes, python -I scripts/check_no_game_data.py on the three files, git diff --check.
  • git merge-tree against the 96 open pull requests that touch any of the three files: 34 already conflict with main by themselves; none conflicts because of this change. It also merges with #1055.

Not run: the creation test on the Vulkan device (bvh_builder_test with LEONIDA_BVH_DEVICE=vulkan); the statement that all 53 pipelines are created there is embedded_shaders.md section 7's measurement on a Radeon, which this change only cites.

GPUs tested: n/a

AI-assisted: yes

Checklist

  • Based on current main and merges cleanly (a conflicting pull request is labeled needs rebase).
  • One topic; follow-up work goes in a new pull request.
  • No game data, keys or decryption (CONTRIBUTING.md), 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.

🤖 Generated with Claude Code

<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5477758550 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/1087). Originally posted by [milk4sale](https://github.com/milk4sale) on 2026-11-24T18:11:57Z. --- Claimed in the coordination issue as: DOC-BVH-BUILDER-52 ([claim](https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7140281473)) ### What and why Three docs say 51 of the 52 `XboxBvhBuilder.dll` programs translate and one rule, `buffer_store_short`, is still missing. That rule has been in `tools/rdna2spirv.py` since `8f208d09a`, and `docs/embedded_shaders.md` section 7 already records "52 of 52" for `main` `8575d36e`, so the pages contradict themselves and each other. - **`docs/d3d12_vulkan.md`:** the eight passages that give the count now say all 52 translate and pass `spirv-val` (sections 4.8 and 7.2, the M6 row, open question 7, the risks list, Appendix A.2). Section 7.2 held the same paragraph twice, the second copy starting mid-sentence; it is one paragraph again. The Appendix A.2 measurement keeps its numbers and says what changed since. - **`docs/d3d12_vulkan.md` section 3.6:** one sentence said pipeline-state streams (`CreatePipelineState`) "are not implemented yet", 50 lines above "Implemented (D3D-29): pipeline state streams, mesh PSOs and `DispatchMesh`". It now points there, and says an unknown subobject type is `E_INVALIDARG`, as `parse_pipeline_stream` answers and that section states. - **`docs/embedded_shaders.md`:** sections 4, 5 and 7: the result table, the two blocker tables, "What this changes" and the build step's report line. The dated measurements of 51 modules (the creation table, the `vk_pipeline_check` runs) stay as they are. - **`docs/README.md`:** the index row for `embedded_shaders.md`. Left alone on purpose: open question 20's row in `d3d12_vulkan.md` carries the same count, but #381 rewrites that line, so it needs the number there. The status paragraph at the top, the "Known gaps" paragraphs and the descriptor-path gaps are also stale and are already handled by #424/#429, #381 and #513. ### Tested - Measured on `main` `3aa975421` with my own 1.0.2.1 package, using the four tools the build step runs (`pe_shader_containers.py --extract`, `fssm_unpack.py`, `shader_disasm.py --mcpu gfx1013`, `rdna2spirv.py --max-shared-memory 32768`): 52 containers extracted, 52 `FSSM` blobs, 52 translated, and `spirv-val --target-env vulkan1.2` accepts all 52 modules, both natively and with `--wave64-emulate`. LLVM 23.1.4. Counts only; the outputs stayed outside the repository. - `make_game.py`'s shaders stage, run from `main` on that package earlier the same day (2026-11-24, about 07:54 UTC), reported `52 of 52 XboxBvhBuilder.dll programs translated`. - The pipeline-stream sentence was checked against `ID3D12Device2::CreatePipelineState` and `parse_pipeline_stream` in `runtime/shims/d3d12_vulkan_device.cpp`; `d3d12_mesh_test` builds an MS + PS and a VS + PS PSO from streams. - Every `tests/test_docs_*.py` passes, `python -I scripts/check_no_game_data.py` on the three files, `git diff --check`. - `git merge-tree` against the 96 open pull requests that touch any of the three files: 34 already conflict with `main` by themselves; none conflicts because of this change. It also merges with #1055. Not run: the creation test on the Vulkan device (`bvh_builder_test` with `LEONIDA_BVH_DEVICE=vulkan`); the statement that all 53 pipelines are created there is `embedded_shaders.md` section 7's measurement on a Radeon, which this change only cites. GPUs tested: n/a AI-assisted: yes ### Checklist - [x] Based on current `main` and merges cleanly (a conflicting pull request is labeled `needs rebase`). - [x] One topic; follow-up work goes in a new pull request. - [x] No game data, keys or decryption (CONTRIBUTING.md), 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. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
abnalstlll-byte commented 2026-11-24 18:49:28 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by abnalstlll-byte on 2026-11-24T18:49:28Z.

Review: APPROVED


Reviewed and verified. Resolves stale documentation across docs/d3d12_vulkan.md, docs/embedded_shaders.md, and docs/README.md, correctly aligning with current main where all 52 XboxBvhBuilder.dll shader programs translate and pass spirv-val, and pipeline-state streams (CreatePipelineState) are fully implemented. 100% clean-room.

<!-- greyfinch-sync:ubiquitarianism/leonida:review:6045333594 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/1087#pullrequestreview-6045333594). Originally posted by [abnalstlll-byte](https://github.com/abnalstlll-byte) on 2026-11-24T18:49:28Z. **Review:** APPROVED --- Reviewed and verified. Resolves stale documentation across docs/d3d12_vulkan.md, docs/embedded_shaders.md, and docs/README.md, correctly aligning with current main where all 52 XboxBvhBuilder.dll shader programs translate and pass spirv-val, and pipeline-state streams (CreatePipelineState) are fully implemented. 100% clean-room.
aslan2142 commented 2026-11-25 01:21:03 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by aslan2142 on 2026-11-25T01:21:03Z.


Merged. Thank you, @milk4sale: the three pages now agree with each other and with the translator on main.

  • Claim: claiming: DOC-BVH-BUILDER-52 in #14 at 18:11:10 UTC, 47 s before this PR opened, by the author and unedited: valid. No other claim or open PR for the same change.
  • The 52: buffer_store_short is on main since 8f208d09a, and section 7 of docs/embedded_shaders.md already recorded 52 of 52 at 8575d36e. The count needs the game files, so no test asserts it; an independent measurement in #14 on a second Radeon also reports 52 translated and 52 valid.
  • "Five rules that closed the last ten": the four earlier blockers plus buffer_store_short, consistent with section 4.
  • Pipeline-state streams: ID3D12Device2::CreatePipelineState calls parse_pipeline_stream in runtime/shims/d3d12_vulkan_device.cpp, whose default: case logs the type and returns E_INVALIDARG; d3d12_mesh_test and d3d12_state_sweep_test create pipeline states from streams. The sentence this replaces was out of date.
  • Nothing new from the game: the changed lines add counts and commit IDs only.
  • Checked on main b4b7756e8 + 767479b80: the semantic suite passes (476 files, 6,223 tests, 0 files failed); the 14 docs and writer tests pass; check_no_game_data.py is clean on the 3 changed files.
  • Overlap: this adds no conflict to #984 or #939, which are being merged now.
  • CI had not finished on this head.

Two older statements stay for a follow-up: the status paragraph at the top of docs/d3d12_vulkan.md still says streams are not implemented, and open question 20 still says 51 of 52.

AI-assisted (Claude Code, Claude Opus 5.5).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7149456864 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/1087#issuecomment-7149456864). Originally posted by [aslan2142](https://github.com/aslan2142) on 2026-11-25T01:21:03Z. --- Merged. Thank you, @milk4sale: the three pages now agree with each other and with the translator on `main`. - **Claim:** `claiming: DOC-BVH-BUILDER-52` in #14 at 18:11:10 UTC, 47 s before this PR opened, by the author and unedited: valid. No other claim or open PR for the same change. - **The 52:** `buffer_store_short` is on `main` since `8f208d09a`, and section 7 of `docs/embedded_shaders.md` already recorded 52 of 52 at `8575d36e`. The count needs the game files, so no test asserts it; an independent measurement in #14 on a second Radeon also reports 52 translated and 52 valid. - **"Five rules that closed the last ten":** the four earlier blockers plus `buffer_store_short`, consistent with section 4. - **Pipeline-state streams:** `ID3D12Device2::CreatePipelineState` calls `parse_pipeline_stream` in `runtime/shims/d3d12_vulkan_device.cpp`, whose `default:` case logs the type and returns `E_INVALIDARG`; `d3d12_mesh_test` and `d3d12_state_sweep_test` create pipeline states from streams. The sentence this replaces was out of date. - **Nothing new from the game:** the changed lines add counts and commit IDs only. - **Checked on `main` `b4b7756e8` + `767479b80`:** the semantic suite passes (476 files, 6,223 tests, 0 files failed); the 14 docs and writer tests pass; `check_no_game_data.py` is clean on the 3 changed files. - **Overlap:** this adds no conflict to #984 or #939, which are being merged now. - **CI had not finished on this head.** Two older statements stay for a follow-up: the status paragraph at the top of `docs/d3d12_vulkan.md` still says streams are not implemented, and open question 20 still says 51 of 52. AI-assisted (Claude Code, Claude Opus 5.5).
milk4sale commented 2026-11-25 02:55:03 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by milk4sale on 2026-11-25T02:55:03Z.


Local stand-in for this pull request's CI, which has been queued here since 22:31 UTC (about 580 runs waiting).

Tested: 767479b80 merged with main b4b7756e8 (2026-11-25 01:13 UTC), in one tree together with #1089, #1090, #1114, #413, next to main alone. The trees came from git merge-tree, and nothing was pushed. Each job used the workflow's own selection from ci.yml and runtime.yml.

Job main + the five pull requests main alone
check steps: compileall, make_game.py --help pass pass
stdlib-tests-linux (every standalone file, run to the end) 492 of 492 pass 491 of 491 pass
translator-tests (pytest files) 1,890 pass, 2 fail 1,886 pass, the same 2 fail
viewer-tests pass pass
semantic-tests 477 files, 6,231 tests, 0 failed
linux-gpu-tools: ctest 76 of 76 pass
linux-gpu-tools: run_gpu_tests.py, plain, LEONIDA_W64_EMULATE=1 --filter cs_, LEONIDA_BARY_FALLBACK=1 0 failures on lavapipe, 0 on the RTX 4070 Ti
no-game-data: scripts/check_no_game_data.py on this pull request's files clean

Docs only: the tests/test_docs_*.py loop and every other standalone file that reads docs/ pass.

The two pytest failures are main's: tests/test_translate.py on the text-only fixture cs_dpp_cmp.asm (test_gpu_samples_translate_and_validate, test_wave64_emulate_uses_no_subgroup_ops). With #1375 applied, both pass.

Not covered: the Windows and macOS jobs.

Setup: Linux (CachyOS), Python 3.14.10 (CI uses 3.12), llvm-mc 23.1.4 (CI uses 19), Node 26.13.1. GPU suite on lavapipe from Mesa 26.2.6 with GALLIUM_OVERRIDE_CPU_CAPS=avx, the code path of CI's runners, which lack AVX-512; and on an RTX 4070 Ti, NVIDIA 620.70.06.

AI-assisted (Claude Code).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7151355649 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/1087#issuecomment-7151355649). Originally posted by [milk4sale](https://github.com/milk4sale) on 2026-11-25T02:55:03Z. --- Local stand-in for this pull request's CI, which has been queued here since 22:31 UTC (about 580 runs waiting). Tested: `767479b80` merged with `main` `b4b7756e8` (2026-11-25 01:13 UTC), in one tree together with #1089, #1090, #1114, #413, next to `main` alone. The trees came from `git merge-tree`, and nothing was pushed. Each job used the workflow's own selection from `ci.yml` and `runtime.yml`. | Job | `main` + the five pull requests | `main` alone | |---|---|---| | `check` steps: compileall, `make_game.py --help` | pass | pass | | `stdlib-tests-linux` (every standalone file, run to the end) | 492 of 492 pass | 491 of 491 pass | | `translator-tests` (pytest files) | 1,890 pass, 2 fail | 1,886 pass, the same 2 fail | | `viewer-tests` | pass | pass | | `semantic-tests` | 477 files, 6,231 tests, 0 failed | | | `linux-gpu-tools`: ctest | 76 of 76 pass | | | `linux-gpu-tools`: `run_gpu_tests.py`, plain, `LEONIDA_W64_EMULATE=1 --filter cs_`, `LEONIDA_BARY_FALLBACK=1` | 0 failures on lavapipe, 0 on the RTX 4070 Ti | | | `no-game-data`: `scripts/check_no_game_data.py` on this pull request's files | clean | | Docs only: the `tests/test_docs_*.py` loop and every other standalone file that reads `docs/` pass. The two pytest failures are `main`'s: `tests/test_translate.py` on the text-only fixture `cs_dpp_cmp.asm` (`test_gpu_samples_translate_and_validate`, `test_wave64_emulate_uses_no_subgroup_ops`). With #1375 applied, both pass. Not covered: the Windows and macOS jobs. Setup: Linux (CachyOS), Python 3.14.10 (CI uses 3.12), llvm-mc 23.1.4 (CI uses 19), Node 26.13.1. GPU suite on lavapipe from Mesa 26.2.6 with `GALLIUM_OVERRIDE_CPU_CAPS=avx`, the code path of CI's runners, which lack AVX-512; and on an RTX 4070 Ti, NVIDIA 620.70.06. AI-assisted (Claude Code).
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
ProjectLeonida/mandy!1087
No description provided.