Skip to content

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

Merged
aslan2142 merged 2 commits into
ProjectLeonida:mainfrom
milk4sale:docs/d3d12-builder-52
Nov 25, 2026
Merged

aslan2142 merged 2 commits into
ProjectLeonida:mainfrom
milk4sale:docs/d3d12-builder-52

Conversation

@milk4sale

Copy link
Copy Markdown
Contributor

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 d3d12: an enhanced texture barrier into LAYOUT_UNDEFINED closes and keeps the layout (D3D-BARRIER-INTO-UNDEFINED) #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

… streams are implemented (DOC-BVH-BUILDER-52)

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 8f208d0, and embedded_shaders.md section 7
already recorded 52 of 52 for main 8575d36.

Measured on main 3aa9754 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 <noreply@anthropic.com>

@abnalstlll-byte abnalstlll-byte left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Brings the branch up to date with main 68d1331. 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 ProjectLeonida#930).

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@aslan2142
aslan2142 merged commit cc22b7d into ProjectLeonida:main Nov 25, 2026
2 checks passed
@aslan2142

Copy link
Copy Markdown
Collaborator

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 Coordinating who works on what #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 Coordinating who works on what #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 [integration] Linux/Proton and native Windows: boot through the story load (RT-PROTON-STORY-LOAD) #984 or [integration] Windows offline boot to the first-run UI (RT-WINDOWS-FIRST-RUN-UI) #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

Copy link
Copy Markdown
Contributor Author

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 up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants