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

Manually merged
github merged 2 commits from gh-pr/1087/head into gh-pr/1087/base 2026-11-26 09:37:24 +00:00
Owner

@⁠milk4sale on GitHub · 2026-11-24 18:11 UTC · original
milk4sale:docs/d3d12-builder-52 → main · +37 −40 · 3 files · 2 commits · merged 2026-11-25 01:21 UTC

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

**@⁠milk4sale** on GitHub · 2026-11-24 18:11 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1087) `milk4sale:docs/d3d12-builder-52` → `main` · +37 −40 · 3 files · 2 commits · merged 2026-11-25 01:21 UTC Claimed in the coordination issue as: DOC-BVH-BUILDER-52 ([claim](https://git.gtahub.st/github/ubiquitarianism--leonida/issues/14)) ### 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)
docs/d3d12_vulkan.md, docs/embedded_shaders.md and the index row in
docs/README.md said 51 of the 52 XboxBvhBuilder.dll programs translate and
one rule, buffer_store_short, was missing. The rule has been in
tools/rdna2spirv.py since 8f208d09a, and embedded_shaders.md section 7
already recorded 52 of 52 for main 8575d36e.

Measured on main 3aa975421 with a 1.0.2.1 package: 52 containers extracted,
52 translated, 52 pass spirv-val, natively and with --wave64-emulate.

- d3d12_vulkan.md: the eight passages that give the count (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.
- d3d12_vulkan.md section 3.6: pipeline-state streams (CreatePipelineState)
  were described as not implemented yet, 50 lines above the section that
  documents them; an unknown subobject type is E_INVALIDARG, not a logged
  hard error.
- embedded_shaders.md: sections 4, 5 and 7 (the result table, the blocker
  tables, "What this changes" and the build step's report line). The dated
  measurements of 51 modules stay as they are.

Open question 20's row in d3d12_vulkan.md has the same count and is left
alone: pull request 381 rewrites that line.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
Brings the branch up to date with main 68d1331e5. No conflicts; the merged tree was tested before the push (every standalone
test file under tests/ passes except tests/test_ci_registration.py, which fails on main alone since #930).

Co-Authored-By: Claude Fable 5.2 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 09:37:23 +00:00
github manually merged commit 767479b809 into gh-pr/1087/base 2026-11-26 09:37:24 +00:00
Author
Owner

@⁠abnalstlll-byte on GitHub · 2026-11-24 18:49 UTC · original · approved these changes

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.

**@⁠abnalstlll-byte** on GitHub · 2026-11-24 18:49 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1087#pullrequestreview-6045333594) · **approved these changes** 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.
Author
Owner

@⁠aslan2142 on GitHub · 2026-11-25 01:21 UTC · original

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).

**@⁠aslan2142** on GitHub · 2026-11-25 01:21 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1087#issuecomment-7149456864) 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).
Author
Owner

@⁠milk4sale on GitHub · 2026-11-25 02:55 UTC · original

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).

**@⁠milk4sale** on GitHub · 2026-11-25 02:55 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1087#issuecomment-7151355649) 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).
This discussion has been locked. Commenting is limited to contributors.
No description provided.