scripts: build llvm-mc 23.1.5 by default, so the pipeline library translates #1923
Open
github-bot
wants to merge 2 commits from
github-bot/gh-1923 into main
AGit
pull from: github-bot/gh-1923
merge into: github:main
github:main
github:docs/animation-merge-remnants
github:docs/story-dedup-and-cli
github:docs/restofworld-merge-remnants
github:docs/gamedata-dedup-tables
github:docs/textures-bcpack-tables-and-cli
github:docs/exe-fail-fast-shims-sync
github:fix/address-guard-wraparound-parity
github:fix/cvt-f16-denorm-and-clamp
github:docs/pso-cache-scope-note
github:docs/viewer-readme
github:docs/textures-arrays-dds-preview
github:docs/conformance-readme-status
github:fix/docs-validators-fences-urls
github:claude/loop-total
github:claude/pops-collision-seed
github:claude/dstorage-hold-page-reads
github:claude/host-image-copy-switch
github:feat/gdk-lifecycle-window-hook
github:claude/d16s8-uav-nvidia-fallback
github:feat/mfplat-offline-shim
github:claude/gameinput-slow-reader
github:fix/rt-null-barrier-clear
github:claude/depth-resolve-sample-positions
github:integration/palmetto-parity
github:claude/valu-literal-sext
github:claude/slot74-pool-handle
github:claude/rgb9e5-uint-alias-view
github:claude/fssm-root-layout-tables
github:feat/gdk-speech-display-lifecycle
github:asset-audio-skip-current
github:qemmhd/old-9940-rectangle-quad-lists
github:feat/ws2-offline-shim
github:qemmhd/rt-d16-unorm-uav
github:feat/xs-device-stops-7-9
github:qemmhd/rt-depth-same-base-shapes
github:qemmhd/rt-lazy-attachment-variant
github:feat/acphal-xma2-decoder
github:asset-audio-skip
github:codex/coord-claim-check-20261124-7e48
github:feat/xs-frame-pacing-presentx
github:feat/xs-device-vm-options
github:old-pr/9844
github:old-pr/9978
github:old-pr/9815
github:old-pr/10057
github:old-pr/9874
github:old-pr/9965
github:old-pr/9863
github:old-pr/10068
github:old-pr/10066
github:old-pr/10067
github:old-pr/10007
github:old-pr/10061
github:old-pr/10065
github:old-pr/10059
github:old-pr/10063
github:old-pr/10055
github:old-pr/10062
github:old-pr/10042
github:old-pr/10041
github:old-pr/10049
github:old-pr/10047
github:old-pr/10046
github:old-pr/10045
github:old-pr/10056
github:old-pr/10043
github:old-pr/10036
github:old-pr/10034
github:old-pr/9984
github:old-pr/10052
github:old-pr/10038
github:old-pr/10033
github:old-pr/10028
github:old-pr/10050
github:old-pr/9891
github:old-pr/9889
github:old-pr/10051
github:old-pr/10019
github:old-pr/10027
github:old-pr/10029
github:old-pr/10031
github:old-pr/10026
github:old-pr/9941
github:old-pr/10030
github:old-pr/10040
github:old-pr/9990
github:old-pr/10021
github:old-pr/9962
github:old-pr/10022
github:old-pr/10020
github:old-pr/10015
github:old-pr/10025
github:old-pr/9886
github:old-pr/10048
github:old-pr/10014
github:old-pr/10011
github:old-pr/9861
github:old-pr/10010
github:old-pr/10008
github:old-pr/9860
github:old-pr/10006
github:old-pr/9920
github:old-pr/9995
github:old-pr/10000
github:old-pr/10016
github:old-pr/10004
github:old-pr/10023
github:old-pr/9982
github:old-pr/9981
github:old-pr/9983
github:old-pr/9970
github:old-pr/9969
github:old-pr/9968
github:old-pr/9971
github:old-pr/9972
github:old-pr/9942
github:old-pr/9963
github:old-pr/9960
github:old-pr/9964
github:old-pr/9985
github:old-pr/9973
github:old-pr/9862
github:old-pr/9953
github:old-pr/10017
github:old-pr/9952
github:old-pr/9955
github:old-pr/9946
github:old-pr/9954
github:old-pr/9938
github:old-pr/9956
github:old-pr/9856
github:old-pr/9947
github:old-pr/9924
github:old-pr/9961
github:old-pr/9927
github:old-pr/9979
github:old-pr/10032
github:old-pr/9926
github:old-pr/5237
github:old-pr/9951
github:old-pr/9931
github:old-pr/9902
github:old-pr/9921
github:old-pr/9994
github:old-pr/9775
github:old-pr/9768
github:old-pr/9905
github:old-pr/9936
github:old-pr/9901
github:old-pr/9904
github:old-pr/9906
github:old-pr/9988
github:old-pr/9908
github:old-pr/9909
github:old-pr/9911
github:old-pr/9912
github:old-pr/9913
github:old-pr/9887
github:old-pr/9916
github:old-pr/9919
github:old-pr/9925
github:old-pr/9933
github:old-pr/9935
github:old-pr/9918
github:old-pr/9879
github:old-pr/9880
github:old-pr/9881
github:old-pr/9996
github:old-pr/9876
github:old-pr/9892
github:old-pr/9899
github:old-pr/9915
github:old-pr/9914
github:old-pr/9872
github:old-pr/9869
github:old-pr/9866
github:old-pr/9819
github:old-pr/10012
github:old-pr/9857
github:old-pr/9893
github:old-pr/9897
github:old-pr/9928
github:old-pr/9868
github:old-pr/9917
github:old-pr/9940
github:old-pr/9873
github:old-pr/9816
github:old-pr/10009
github:old-pr/9900
github:old-pr/9966
github:old-pr/9859
github:old-pr/9843
github:old-pr/9991
github:old-pr/10058
github:old-pr/9883
github:old-pr/9838
github:old-pr/9835
github:old-pr/9959
github:old-pr/9895
github:old-pr/9837
github:old-pr/9858
github:old-pr/9865
github:old-pr/9864
github:old-pr/9840
github:old-pr/9820
github:old-pr/4669
github:old-pr/9848
github:old-pr/9850
github:old-pr/9810
github:old-pr/9799
github:old-pr/9853
github:old-pr/9875
github:old-pr/9831
github:old-pr/9796
github:old-pr/9801
github:old-pr/9813
github:old-pr/9794
github:old-pr/7417
github:old-pr/9781
github:old-pr/9806
github:old-pr/9958
github:old-pr/9809
github:old-pr/9791
github:old-pr/9792
github:old-pr/10053
github:old-pr/9784
github:old-pr/9789
github:old-pr/9849
github:old-pr/9846
github:old-pr/9773
github:old-pr/9785
github:old-pr/9803
github:old-pr/9826
github:old-pr/9839
github:old-pr/9922
github:old-pr/9948
github:old-pr/7189
github:old-pr/9957
github:old-pr/9823
github:old-pr/9807
github:old-pr/9851
github:old-pr/9774
github:old-pr/9830
github:old-pr/9836
github:old-pr/9822
github:old-pr/9783
github:old-pr/9833
github:old-pr/9890
github:old-pr/9770
github:old-pr/9769
github:old-pr/9772
github:old-pr/9787
github:old-pr/9852
github:old-pr/9834
github:old-pr/9845
github:old-pr/9871
github:old-pr/9771
github:old-pr/9776
github:old-pr/10005
github:old-pr/9949
github:old-pr/9923
github:old-pr/9805
github:old-pr/9829
github:old-pr/9790
github:old-pr/9827
github:old-pr/9929
github:old-pr/9855
github:old-pr/9934
github:old-pr/9907
github:old-pr/9910
github:old-pr/9779
github:old-pr/9780
github:old-pr/9885
github:old-pr/9882
github:old-pr/9877
github:old-pr/9998
github:old-pr/4251
github:old-pr/9987
github:old-pr/9989
github:old-pr/9950
github:old-pr/9777
github:old-pr/10044
github:old-pr/9884
github:old-pr/2906
github:old-pr/5076
github:old-pr/9937
github:old-pr/9986
github:old-pr/3014
github:old-pr/9943
github:old-pr/9939
github:old-pr/4682
github:old-pr/4765
No reviewers
Labels
Clear labels
accessibility
Barrier affecting people with disabilities
bug
Something isn't working
documentation
Improvements or additions to documentation
duplicate
This issue or pull request already exists
enhancement
New feature or request
good first issue
Good for newcomers
help wanted
Extra attention is needed
invalid
This doesn't seem right
missing claim
Needs a claim in #14
needs rebase
Conflicts with the base branch: rebase it on main
question
Further information is requested
wontfix
This will not be worked on
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
missing claim
needs rebase
question
wontfix
Milestone
Clear milestone
No items
No milestone
Assignees
Clear assignees
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.
Dependencies
No dependencies set
Reference
github/ubiquitarianism--leonida!1923
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-1923"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@fiestorra on GitHub · 2026-11-25 15:54 UTC · original
fiestorra:carry/llvm-mc-23-default→main· +73 −32 · 12 files · 2 commits · openClaimed in the coordination issue as: LIBRARY-TRANSLATION-GAP (#1608)
What and why
scripts/build_llvm_mc.ps1built LLVM 21.1.8 by default. That version'sgfx1013decoder cannot decode 840 of the2,684 compute programs in the pipeline library of 1.0.2.1: their listings carry 79,490 rejected words (and 8,310
exp invalid_target_Nlines), the translator refuses all of them asfall-through into undecodable words, and theshadersstage keeps 1,844 of 2,684. LLVM 21 does translate all 26,503 shaders ofshaders.rpf; the pipeline libraryis the part it loses.
The same bytes disassembled with LLVM 23.1.5 (the release
docs/testing.mdand the corpus runs already name) have norejected word in those 840, and 839 of them translate and pass
spirv-val; the 840th wantss_sethalt, which thetranslator does not implement, under either version.
So this changes the helper's default
-Versionto 23.1.5, the docs that name the minimum version (README.md,docs/design.md,docs/testing.md,docs/linux.md), and the three user-facing messages that still said 21+:make_game.py'sshaderspreflight,shader_disasm.py's probe error andmc_command.py's install hint (the sametext is used when the fixture assembler is missing, but recommending 21+ there sends users to the version that loses
the library).
tests/test_make_game_pipeline_preflight.py,tests/test_make_game_preflight.pyandtests/test_mc_command.pyasserted those texts and are updated with them.It is not a decoder workaround: #998 and #1712 patch around LLVM 21 in
tools/and are untouched here; this removesthe cause for anyone who builds
llvm-mcwith the helper.Tested
All numbers on
main71a769d7d,-mcpu=gfx1013,--stages cs, 1.0.2.1, withllvm-mc21.1.8 at%USERPROFILE%\.leonida\llvm-mcand 23.1.5 at%USERPROFILE%\.leonida\llvm-mc-23(native Windows builds from thellvmorg-21.1.8andllvmorg-23.1.5tags).invalid instruction encodingwords and 8,310exp invalid_target_Nwith 21.1.8;0 and 0 with 23.1.5 (
library.jsontotals: 1,844 of 2,684).spirv-val(was 0/840). Therefusal is
s_sethalt, the same with the 21.1.8 listing, so it is not a decode difference.prints some operands differently; they still carry 1,317 known data words from 1,887) and 1,674 of 1,674 pass,
the other 170 are byte-identical. So the stage goes from 1,844/2,684 to 2,683/2,684, the last being
s_sethalt.tests/test_docs_*,tests/test_make_game_preflight.py,tests/test_make_game_pipeline_preflight.py,tests/test_mc_command.py,tests/test_shader_disasm.py,tests/test_llvm_source_version.py,tests/test_llvm_install_*.py,tests/test_build_llvm_mc_*.py,tests/test_build_percent_path.py: pass.python -m compileallandgit diff --check: clean. No unit test covers the default tag: it downloads and buildsLLVM, which CI cannot do.
What this does not prove: the helper itself was not rebuilt here; the 23.1.5 binary measured is a native Windows build
from the
llvmorg-23.1.5tag on this machine (build log endsrc=0). The 26,503-shader corpus was not re-measuredwith 23.1.5 in this run (the README's 23.1.5 rerun covers it). Whether
s_sethaltcan be expressed in SPIR-V is notinvestigated. Every module was checked with
spirv-val; none was run on a GPU.GPUs tested: n/a (no GPU test; translation and
spirv-valonly)AI-assisted: yes (DeepSeek Harness)
Checklist
mainand merges cleanly (a conflicting pull request is labeledneeds rebase).docs/design.md, with how it was confirmed.Written with an AI assistant.
Why the version matters beyond the pipeline library
Measured on the retail title afterwards, and it is stronger than the translate count the description uses:
E_INVALIDARGat device slot 67 (Xbox DeserializeComputePipelineStateX), 847 programs short.So without this change the
shadersstage silently produces a library that is 847 compute programs short, and every pipeline state that uses one of them fails at creation among ~25,000 that succeed. The failures are per-call log lines, which is why they read as noise.Details, with the counts and the method: #1608 and the like-for-like control in the next comment.
The three red jobs in the current run (
linux-gpu-tools,macos,windows) are analysed in the thread below and are not from this diff: thelinux-gpu-toolscompile error is in code identical onmain,cs_imgatomic_extis the fixture owned by #1518, andvk_xdxr_postbuild_readbackis a runtime test this branch does not touch.@fiestorra on GitHub · 2026-11-26 06:04 UTC · original
The three red jobs are not from this change. The diff touches
README.md,docs/design.md,docs/linux.md,docs/testing.md,make_game.py,scripts/build_llvm_mc.ps1,tools/mc_command.py,tools/shader_disasm.pyand three test files — nothing underruntime/, and nothing that changes behaviour: the tool edits are the two user-facing "LLVM 21+" strings plus the doc block, and the script edit is the default version.What each job actually failed on:
linux-gpu-tools:runtime/test/vk_null_descriptor_test.cpp:97cannot seeLEONIDA_TEST_NULL_DESCRIPTORS_SPV. That line, the#ifndefguard on line 249 that is supposed to cover it, and thetarget_compile_definitionsinruntime/CMakeLists.txt:2199are identical onmainand on this branch (git grepagainstorigin/main) — I did not touch any of the three, so this is a main-side configuration break, not something this branch introduces.macos:cs_imgatomic_ext failed, the GPU fixture that is already red on the matching adapter and is owned by #1518. Same reason it was red before this branch existed.windows: 423 of 424 tests pass; the only failure isvk_xdxr_postbuild_readback, a Vulkan test of the runtime that this branch does not modify.Local control on this branch, for whatever it is worth: the three test files this PR does change pass, and the
make_gamepreflight, resume and interrupt files pass too (47 tests, 7 subtests).checkhas not started yet for this PR, so its result cannot be the reason either.If a maintainer wants a re-run to confirm the flakes, I would rather that than a change to this branch: editing unrelated
runtime/code to make a red job green is exactly the kind of "acts but changes nothing" PR this project rejects. I can rebase onto currentmain(a73a57e13) if the branch is behind it.Written with an AI assistant.
@fiestorra on GitHub · 2026-11-26 06:46 UTC · original
finding: the 849
E_INVALIDARGat device slot 67 (Xbox DeserializeComputePipelineStateX) in my earlier--runreports are caused by the shader library being translated with LLVM 21.1.8, and they disappear with LLVM 23.1.5. Counts only, same machine and package (RTX 4090, driver 32.0.16.2124, Windows 11),LEONIDA_D3D12=vulkan.The mechanism: the shim builds the FSPX payload and calls
self->real->CreateComputePipelineState; the payload is well formed there (kind 0 = 28 B, kind 1 = 20 B, kind 6 = 98 KB in the failing calls), so theE_INVALIDARGcomes from our Vulkan layer not finding the program. Summing theN shaders: M translatedlines of the twoshadersstage logs:shadersrun847 missing against 849 failures at the slot.
End to end: re-running the stage with
LLVM_MCpointing at an LLVM 23.1.5llvm-mcand then booting for 300 s with--trace-d3d12gives 0 slot-67 failures and 2,689 successful slot-67 calls, against 849 failures in the previous 900 s run with the 21.1.8 library. A 900 s control with the new library is running so the comparison is like for like.This is what #1923 is for, and it makes the case stronger than "the pipeline library translates 2,683 of 2,684": without the version bump, the
shadersstage silently produces a library that is 847 programs short, and every compute pipeline state that uses one of them fails at creation. The failures are logged per call, so they are easy to miss among 25,000 successful ones.Not proven: that those 847 programs now compute the right values (they exist and their PSO is created, nothing more), and nothing about the still-static frame in the boot.
Written with an AI assistant.
@fiestorra on GitHub · 2026-11-26 07:01 UTC · original
Like-for-like control, same 900 s and same machine as the run that reported the failures: with the LLVM 23.1.5 library there are 0 slot-67 failures and 2,689 successful calls, against 849 failures with the 21.1.8 library. The rest of the run matches what it was: 70,204
PresentX(74,068 before), 25,450 graphics PSOs (25,007 before), same 4,621,204,361-byte cache loaded. The 2,689 successful calls are identical in the 300 s and 900 s runs, so the title asks for its compute pipeline states early and does not come back for them.So the failures were not a defect worth a separate fix: they were the 847 programs the
shadersstage could not translate on LLVM 21.1.8, and this change is what puts them back.Written with an AI assistant.
3e2c7caf50to92cdd35f06@fiestorra on GitHub · 2026-11-26 12:50 UTC · original
The docs no longer say 21 is enough, and a test pins the default
Head
736299450, one commit on top of92cdd35f0.docs/testing.md: thellvm-mcbullet now separates the two requirements — LLVM 21+ to assemble the test fixtures, 23+ for theshadersstage — instead of saying "21+" and contradicting line 49 of the same file.docs/linux.md: the bullet namesllvm-23first for theshadersstage and keeps thellvm-21naming only where it is about the distribution's versioned binary names.tests/test_llvm_source_version.pygainedDefaultVersionTest, which readsscripts/build_llvm_mc.ps1and requires[string]$Version = "23.1.5". The existing tests cover an explicit-Version; nothing covered the default, which is the one the fix turns on, so an accidental revert would have passed.check_no_game_data.pypasses on the three files and the test module runs green here (Ran 7 tests, OK).Still open, and I agree they are the real fix: nothing checks the version at run time (
probe()and the post-build probe only check thats_endpgmdisassembles, which 21 does),CONTRIBUTING.md/runtime/test/shaders/build.pystill say 21+, and CI installsllvm-21because it only assembles fixtures. Allvm-mc --versionread inprobe()that warns below 23 is the next commit; I did not want to change the build's failure mode in the same push as the docs.CI: the five jobs have been queued since 11:33 UTC and 591 runs are queued repo-wide, so there is no signal from the current head yet.
Written with an AI assistant.
@fiestorra on GitHub · 2026-11-26 22:12 UTC · original
The red jobs are not this diff (read from the job logs)
Head
736299450. The diff touchesREADME.md,docs/{design,linux,testing}.md,make_game.py,scripts/build_llvm_mc.ps1,tools/{mc_command,shader_disasm}.pyand four tests — noruntime/file. The two failing jobs fail elsewhere:linux-gpu-tools, step Build:runtime/test/vk_null_descriptor_test.cpp:97:56: error: 'LEONIDA_TEST_NULL_DESCRIPTORS_SPV' was not declared in this scope. That define is only added when the configure step findsglslangValidator, and this runner does not have it; the failure is the test's, not the toolchain default's.windows:99% tests passed, 1 tests failed out of 452, and the one isvk_xdxr_postbuild_readback— a postbuild read-back underruntime/test, again a file this branch does not touch.So the default of 23.1.5 is not what turns them red. The
check,semantic-tests,translator-testsandstdlib-tests-linuxjobs are still queued, along with the rest of the repository's queue.Written with an AI assistant.
@fiestorra on GitHub · 2026-11-26 22:55 UTC · original
Updating my own message: when I wrote it,
windowswas still queued; it has since failed, so here is what it says and whether it is mine.windows, step CPU runtime tests:451/455...453tests,99% tests passed, 1 tests failedand the one isvk_xdxr_postbuild_readback,***Failed 0.02 sec. Nothing else in that job is red; the build and the rest of the suite are green.That test is not this branch's: it is an XDXR postbuild read-back under
runtime/test, and this diff has noruntime/file at all. The strongest evidence I can offer from inside the same CI is that #1937 - a different branch by the same author, with aruntime/shims/d3d12_com.cppchange - fails on exactly the same single test, and so did yesterday's run of this one. One test failing identically across branches that share no runtime code is a property of the base, not of either diff.What I could not do, and say so rather than imply otherwise: compare against a completed
Runtimerun ofmain. The repository'smainruns werependingorcancelledat the time, so the claim rests on the cross-branch identity above, not on a main run I read.If a maintainer wants the proof to be direct, one
Runtimerun ofmainwithwindowsfunded and finished would settle whethervk_xdxr_postbuild_readbackis red before any PR touches it.Written with an AI assistant.
736299450fto4f19f41aec@fiestorra on GitHub · 2026-11-27 07:53 UTC · original
Rebased onto current
main(d1dff7949), and here is why: the shared red jobs were not this diff, and the reason is now measured rather than assumed.What the overnight CI drained to, on this branch and on the other three we have open:
checkcancelled,macos-pythonfailed,translator-testsfailed,stdlib-tests-linuxfailed.macos-pythonfails onmaintoo. Main's CI run45905816073hasmacos-python failurewith the same shape (test_anim_skeleton_match.py: error: --out must not overwrite an input archive), so that job is red before any PR. Not ours and not fixable from here.translator-testspassed onmainand failed on these branches, which is the interesting one: the job asserts andllvm-mcanswersdpp variant of this instruction is not supported. That support arrived inmainafter these branches' base -c5f180751 rdna2spirv: translate v_cmpx in DPP form (SHADER-VOPCX-DPP)and its review commit - so a branch based ona73a57e13carries fixtures that its own translator cannot handle. Rebased ontod1dff7949,tests/semantic/test_dpp_compare.pyandtest_dpp_bound_ctrl_modifiers.pyboth run OK on the new head.New head after the rebase:
4f19f41ae,MERGEABLE.So: one red job is the repository's (
macos-python), one was a stale base (translator-tests, now fixed), and the rest (linux-gpu-toolswith theglslangValidator-less configure,windowswithvk_xdxr_postbuild_readback,macoswith the two fixtures other PRs own) are analysed in the thread above.Written with an AI assistant.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.