rdna2spirv: restore the dot4 inline op_sel_hi under exact re-anchoring too (SHADER-FSPX-DOT4-EXACT) #1862
Closed
leonida/mandy
Coderlord wants to merge 0 commits from
fspx-dot4-exact into main
pull from: fspx-dot4-exact
merge into: leonida:main
leonida:main
leonida:github-pr/3295
leonida:beta
leonida:docs/changelog-3483-3500
leonida:github-pr/3294
leonida:github-pr/2975
leonida:github-pr/2815
leonida:feat/gate-driver-start
leonida:feat/skip-pipelines-release
leonida:perf/lazy-compare
leonida:perf/mwaitx-wait
leonida:test/prio-ceiling-main
leonida:fix/ab-cpu-stdout
leonida:fix/gate-old-crashes
leonida:diag/ab-cpu
leonida:test/main-0312
leonida:github-pr/3291
leonida:diag/indirect-clamp-census
leonida:feat/barrier-enhanced
leonida:perf/texture-frame-ceiling
leonida:perf/dstorage-threads
leonida:fix/console-queue-dma-tables
leonida:fix/port-descriptors-record-parts
leonida:fix/frame-waits-fence
leonida:fix/console-sampler-words
leonida:fix/graphics-userdata-spill
leonida:fix/xg-reserved-layout-rotation
leonida:fix/barrier-console-flags
leonida:fix/switches-wait-test-child
leonida:test/list-value-waits
leonida:test/lot-gxdk-0412
leonida:fix/bvh-compacted-size
leonida:docs/i18n-quickstarts
leonida:feat/native-pipeline-slots
leonida:fix/clippy-leonida-gpu
leonida:fix/list-value-producers
leonida:fix/descriptor-page-straddle
leonida:fix/xmem-low-window
leonida:fix/ffx-jitter-never-zero
leonida:fix/run-stdout-closed
leonida:github-pr/2892
leonida:github-pr/2896
leonida:feat/warm-save-every
leonida:github-pr/2980
leonida:github-pr/2994
leonida:github-pr/3005
leonida:github-pr/3010
leonida:github-pr/3136
leonida:github-pr/3303
leonida:github-pr/3220
leonida:github-pr/3143
leonida:github-pr/3330
leonida:github-pr/3226
leonida:github-pr/3187
leonida:carry/3395
leonida:github-pr/2946
leonida:github-pr/2947
leonida:github-pr/2945
leonida:github-pr/2983
leonida:github-pr/3001
leonida:github-pr/3372
leonida:github-pr/3128
leonida:github-pr/3296
leonida:github-pr/2588
leonida:github-pr/3119
leonida:github-pr/3378
leonida:fix/crash-diagnostics
leonida:feat/dlss-mip-bias
leonida:fix/retired-out-of-order
leonida:fix/dxr-postbuild-barrier
leonida:fix/amd-relay-default
leonida:fix/removed-report-wait
leonida:feat/heap-twin
leonida:feat/vram-margin
leonida:github-pr/2472
leonida:github-pr/3123
leonida:github-pr/3088
leonida:assets/annonce-v1
leonida:github-pr/2794
leonida:github-pr/3300
leonida:github-pr/3304
leonida:github-pr/3308
leonida:github-pr/3367
leonida:github-pr/3369
leonida:fix/launcher-dlss-diagnostics
leonida:github-pr/3269
leonida:github-pr/2957
leonida:github-pr/3205
leonida:fix/crash-zero-guard
leonida:github-pr/3185
leonida:github-pr/3099
leonida:github-pr/3104
leonida:github-pr/3348
leonida:github-pr/3379
leonida:github-pr/3377
leonida:perf/darner-title-priority-ceiling
leonida:github-pr/3376
leonida:gh-readonly-queue/main/pr-3311-b5c45b663dbc5a9c3532bb3f307e5f81b32faefa
leonida:gh-readonly-queue/main/pr-3088-af22e7847ff5808f72d1a1881c24be2fafd20b54
leonida:gh-readonly-queue/main/pr-3123-7f3fa026a94c6646e89244f28e1ce22290361867
leonida:github-pr/3373
leonida:github-pr/3368
leonida:github-pr/3198
leonida:gh-readonly-queue/main/pr-3354-637baa0b77ba47222e7280b17c1a59c6a1781d57
leonida:gh-readonly-queue/main/pr-3365-d7a0e0196a43834813014b4bd3aa5502a8263b14
leonida:gh-readonly-queue/main/pr-3361-5dfe8bbd05ed12fb2f2e1718d9af77a7c5f46fd8
leonida:gh-readonly-queue/main/pr-3366-8da9148204e9d12c585efa9ac2b7cc1ab08c7682
leonida:github-pr/3346
leonida:github-pr/3375
leonida:github-pr/2958
leonida:github-pr/3151
leonida:github-pr/3307
leonida:github-pr/3278
leonida:github-pr/3374
leonida:fix/runtime-test-conservative-fixtures
leonida:github-pr/3366
leonida:ci/shard-semantic-linux
leonida:github-pr/3354
leonida:docs/fg-limit-fps-switch
leonida:github-pr/3365
leonida:fix/read-file-hard-link
leonida:github-pr/3364
leonida:fix/book-slot-heap-never-read
leonida:github-pr/3361
leonida:github-pr/3263
leonida:github-pr/3360
leonida:github-pr/3353
leonida:github-pr/3331
leonida:fix/alias-later-queued-submissions
leonida:github-pr/3352
leonida:github-pr/3228
leonida:github-pr/3349
leonida:claude/gallant-sagan-aamatr
leonida:github-pr/3200
leonida:github-pr/3132
leonida:github-pr/3323
leonida:github-pr/3332
leonida:github-pr/3340
leonida:github-pr/3311
leonida:github-pr/3334
leonida:github-pr/3297
leonida:github-pr/3256
leonida:github-pr/2567
leonida:github-pr/2851
leonida:d3d12/agility-sdk-621
leonida:github-pr/3164
leonida:github-pr/3114
leonida:github-pr/3050
leonida:github-pr/3113
leonida:github-pr/3326
leonida:github-pr/3144
leonida:github-pr/2642
leonida:github-pr/3072
leonida:github-pr/2789
leonida:github-pr/2643
leonida:github-pr/3009
leonida:github-pr/3035
leonida:github-pr/3031
leonida:github-pr/2686
leonida:github-pr/2834
leonida:github-pr/3321
leonida:github-pr/3325
leonida:github-pr/3290
leonida:github-pr/3324
leonida:github-pr/3130
leonida:claude/fervent-curie-m19lnr
leonida:github-pr/3309
leonida:github-pr/3305
leonida:github-pr/3306
leonida:github-pr/3302
leonida:github-pr/3301
leonida:github-pr/3345
leonida:github-pr/3211
leonida:github-pr/3027
leonida:github-pr/3286
leonida:github-pr/3235
leonida:github-pr/3265
leonida:github-pr/3275
leonida:codex/skip-no-hit-ray-passes
leonida:github-pr/2823
leonida:github-pr/2911
leonida:github-pr/3262
leonida:github-pr/3125
leonida:github-pr/3206
leonida:github-pr/3250
leonida:github-pr/3238
leonida:github-pr/3188
leonida:github-pr/2952
leonida:github-pr/3217
leonida:github-pr/3168
leonida:t3/preserve-fsr-sdk-restart-path
leonida:t3/propagate-host-failure-hresult
leonida:github-pr/3209
leonida:t3/launcher-custom-parameters
leonida:github-pr/3207
leonida:github-pr/3183
leonida:github-pr/3160
leonida:github-pr/3201
leonida:ci/less-to-run
leonida:github-pr/2930
leonida:github-pr/2797
leonida:github-pr/2999
leonida:perf/native-compute-shader-forms
leonida:github-pr/3191
leonida:github-pr/3011
leonida:github-pr/3019
leonida:github-pr/2996
leonida:gh-readonly-queue/main/pr-2789-45dc41f95c1cd0dcc29c2c50582e0e9af8a77259
leonida:claude/blissful-franklin-ukp7ag
leonida:github-pr/3141
leonida:github-pr/3156
leonida:github-pr/3150
leonida:github-pr/3153
leonida:github-pr/3163
leonida:github-pr/3142
leonida:github-pr/3139
leonida:github-pr/2841
leonida:github-pr/3069
leonida:github-pr/3098
leonida:github-pr/3107
leonida:github-pr/3071
leonida:github-pr/2774
leonida:github-pr/2889
leonida:github-pr/3075
leonida:github-pr/2661
leonida:github-pr/3064
leonida:github-pr/3054
leonida:github-pr/3049
leonida:github-pr/2855
leonida:github-pr/2943
leonida:github-pr/3016
leonida:github-pr/2887
leonida:github-pr/3006
leonida:github-pr/3003
leonida:github-pr/2993
leonida:notes/card-time-and-plant-flicker
leonida:github-pr/2989
leonida:feat/vulkan-rs
leonida:github-pr/2985
leonida:github-pr/2951
leonida:github-pr/2982
leonida:github-pr/752
leonida:github-pr/792
leonida:github-pr/2877
leonida:github-pr/2654
leonida:github-pr/2893
leonida:github-pr/2948
leonida:github-pr/2944
leonida:github-pr/2919
leonida:github-pr/2915
leonida:archive/ci/less-to-run/20261202T1121Z
leonida:github-pr/2800
leonida:github-pr/2822
leonida:github-pr/2833
leonida:github-pr/2840
leonida:github-pr/2831
leonida:github-pr/2832
leonida:github-pr/2801
leonida:github-pr/2890
leonida:github-pr/2891
leonida:github-pr/2664
leonida:github-pr/2807
leonida:rt-call-trace
leonida:github-pr/2755
leonida:perf/ahead-split
leonida:github-pr/2587
leonida:github-pr/2698
leonida:github-pr/2609
leonida:github-pr/3219
leonida:docs/readme-runtime-proposal
leonida:github-pr/2017
leonida:github-pr/1741
leonida:github-pr/1667
leonida:codex/coord-claim-check-20261124-7e48
No reviewers
Assignees
Clear assignees
No assignees
Labels
Clear labels
bug
Something isn't working
dependencies
Pull requests that update a dependency file
documentation
Improvements or additions to documentation
enhancement
New feature or request
missing claim
Needs a claim in #14
needs rebase
Conflicts with the base branch: rebase it on main
needs-triage
Needs maintainer evaluation before the next triage state
question
Further information is requested
ready-for-agent
Fully specified and ready for an AFK agent
submodules
Pull requests that update submodules code
No labels
bug
dependencies
documentation
enhancement
missing claim
needs rebase
needs-triage
question
ready-for-agent
submodules
Projects
Clear projects
No items
No project
Milestone
Clear milestone
No items
No milestone
Dependencies
No dependencies set
Notifications
1 participant
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".
No due date set.
Reference
leonida/mandy!1862
Loading…
Reference in a new issue
No description provided.
Delete branch "fspx-dot4-exact"
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?
Pull request closed
This pull request cannot be reopened because the branch was deleted.
Claimed in the coordination issue as: SHADER-FSPX-DOT4-EXACT (https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7163717323)
What and why
A listing whose undecodable words sit at offsets its llvm-mc messages name is re-anchored exactly
(
invalid_at, from #984). That branch oftranslatetried thev_fma_mixliteral restores but notrestore_dot4_inline_sel, which the forward-search branch andcheck_printed_encodingsboth try. So av_dot4_i32_i8whose src1 is a replicated inline integer (llvm-mc printsop_sel_hi[1]set where the program'sword has it clear) was marked normalized, and the whole program was refused as "reachable instruction with
normalized encoding".
llvm-mc 23.1.6 names every word it rejects, so two of the 29 FSPX programs of the FidelityFX DLL take that branch and
did not translate. The title then has no pipeline for one of them, and the DLL reads through the missing object
(an access violation at
amd_fidelityfx_upscaler_xbox.dll+0x65ff, about 50 s after the first-run setup isconfirmed, native Windows). The fix is one condition: the exact branch tries
restore_dot4_inline_selbefore theliteral restores, as the other two paths do.
Tested
rdna2spirv.py <work>/shaders/fspx/disasm --no-asm --wave64-emulate) with llvm-mc 23.1.6 (conda-forgellvm-tools): 27 of 29 translated and passing spirv-val onmain98c2f7777, 29 of 29 with this change.The other 6 FSPX programs with rejected words (the dot4 forms #984 recovers) translate either way.
python -I tests/test_rdna2spirv_decode.py: 26 tests OK. The newtest_exact_anchoring_restores_dot4_inline_sel(one rejected word at a known offset afters_endpgm, a dot4printed with the default op_sel_hi) passes with the change and fails without it with "reachable instruction with
normalized encoding".
mained94fbef9 + #1768): without this change the processdied 50 s after the first-run setup was confirmed, in
amd_fidelityfx_upscaler_xbox.dll+0x65ff(a read at0x10), right after the runtime logged "no translated compute shader for FSPX" for one of the two programs and
refused its pipeline (
E_INVALIDARG). With the 29 retranslated, the next boot logged no missing FSPX programand did not fault in the DLL; it went on to a later, unrelated stop (a lost device about 75 s into the session).
GPUs tested: NVIDIA GeForce RTX 5080, driver 621.24, Windows 11 Pro 26300
AI-assisted: yes (Claude Code)
Checklist
mainand merges cleanly (a conflicting pull request is labeledneeds rebase).docs/design.md, with how it was confirmed. (n/a: anexisting restore applied in one more branch, no new rule)
Tested merged onto
main384abe5b (Linux, Python 3.13):tests/test_rdna2spirv_decode.pypasses, and the wholetests/semanticsuite gives 489 files, 6288 tests, with onlytest_int32_to_f64failing (Ubuntu'sspirv-optsegfaults, same onmain). The new call matches the two existingrestore_dot4_inline_selcall sites, and the helper only accepts the case it describes (v_dot4_i32_i8, inline-integer src1, printed bytes equal to the stored ones plus op_sel_hi bit 28), so I don't see it widening anything else.AI-assisted (Claude).
Confirmed on a second machine, tools of
main71a769d7d with and without this change, FSPX step run on its own (fspx_unpack.py --disasm, thenrdna2spirv.py --no-asm --wave64-emulate), Windows 10 Pro 19045, Python 3.12.10:mainshader_disasmop_sel listing of old #281), so the two routes agree.amd_fidelityfx_upscaler_xbox.dll+0x65fffault in my retail boots (RTX 5060 Ti, NVIDIA 621.01): the boot with 27 of 29 stopped there at 152 s, the next one with 29 of 29 went past it and stopped later at the world-start device loss. I have not booted with this branch itself.Counts only, no game data. AI-assisted (Claude Code).
Tested on RTX 3080 Ti / Windows 11 / NVIDIA 616.64: this takes the FidelityFX FSPX set from 27 to 29 (
rdna2spirv.py <fspx>/disasm --out <spirv>/fspx --no-asm --wave64-emulate), 29/29 passspirv-val. On a retail boot with the 29,no translated compute shader for FSPXand theamd_fidelityfx_upscaler_xbox.dll+0x65ffAV are gone; the run stays at sessiondto t=195 s and the next stop is the known world-start device loss (#1537/#1602,lib_cs_01725/01726/01728). AI-assisted.Tested on Windows 11, Python 3.12.10, with this PR merged onto current upstream main.
python -m pytest -q tests/test_rdna2spirv_decode.py:(AI-assisted test run; output checked by hand.)
Independent check on this PR — RTX 3080 Ti (616.64), Windows 11, LLVM 23.1.5 (the repo's documented llvm-mc; MSYS2).
refs/pull/1862/headand ran the translator on the port's FSPX set: 29 of 29 translated, 29 passspirv-val. On plain main b9320a118 the same.s/blobs give 27. The two programs include the register-S1 form (amd_fidelityfx_upscaler_xbox_03: S1 is VGPR 10, storedop_sel_hi[1]=0, printed 1), so this PR closes them on 23.1.5 too — not only the inline-S1 one it names. That S1-range check is what the two open siblings (#1301's limit and #1662, whose test says a register S1 is still refused) leave in place; #1495's generalized restore covers the same forms.fspx_gfxstack,LEONIDA_LOCAL_DIAGNOSTICS=0): the FSR4 DLL creates all 29 compute PSOs ("compute PSO created via ACO ('ACCC')"), with noDeserializeComputePipelineStateX FAILED, noCreateModelassertion, no+0x65ffaccess violation. Sessiond, 4,904 presents, 40/40 non-black, run reaches t=216 s.test_alu_dot4_i8.py15/15 with a hand-built VGPR-S1 case (the stored selector reads S1's low half: 56, not 70; clean and exact paths);run_semantic_tests.py: 490 files, 6,293 tests, 0 failed (278 s, 16 jobs).The next stop is not this PR: after ~216 s,
VK_ERROR_DEVICE_LOSTon pipeline-library compute (library/lib_cs_02996), the 0x380 / 63,632-page XMem pool window with no GPU mapping (QemmHD's finding in #1608), then a title breakpoint. Snooozs' run 2 in #1608 has the same order (29/29 → device lost). This PR is the FSR4 unlock; the pool-window mapping (RT-GPU-WINDOW-SPARSE / title-memory) is the next one.AI-assisted.
Heads-up for review: this overlaps #1662 (SHADER-DOT4-SEL-EXACT-ANCHOR, claimed in #1608 at 07:3x today, opened 07:29). Both add the same repair:
restore_dot4_inline_seltried in the exact re-anchor path before the word is marked normalized. #1662 also adds a semantic fixture (tests/semantic/test_reanchor_dot4_inline_sel.py, which fails onmainand passes with the fix) and extends the contract row indocs/design.md; this PR adds a unit test intests/test_rdna2spirv_decode.py. Only one of the two should land, so a maintainer only has to review one. If your test covers a case #1662's doesn't, I'm happy to take it into #1662 with credit, or to close #1662 if this one is preferred.AI-assisted (Claude Code).
Small addition for llvm-mc 21.1.8 users (Windows 11, llvm-mc 21.1.8 under WSL): the 22 -> 24 reported above for 21.1.8 was on an older main. On current main (
db1a22d29) 21.1.8 gives 27 of 29, and main with this PR merged gives 29 of 29 (all passspirv-val; the 27 that already translated are byte-identical). The PR head alone (e88177e53, based on384abe5b0) still gives 24 of 29 with 21.1.8, so with that llvm-mc test it merged into main.not restore_dot4_inline_sel(ins, window, enc)condition replaced byTrue, the PR's new test intests/test_rdna2spirv_decode.pyfails (1 failed, 25 passed), so the test covers the change.Counts only, no game data.
AI-assisted: yes (Claude Code ran the translation and the tests)
Note: #2138 (RT-BOOT-COMBINED, open) carries #1495's
restore_dot4_op_sel, which replacesrestore_dot4_inline_seland is already tried in the exact re-anchoring branch. On #2138's head the 29 FSPX programs translate 29 of 29 with llvm-mc 23.1.6 (RTX 5080, Windows 11), and this PR's new testtest_exact_anchoring_restores_dot4_inline_selpasses there without this PR's code change. So if #2138 lands first, this PR reduces to that regression test, and I'm happy to close it or trim it to the test, whichever you prefer.AI-assisted (Claude Code, Claude Opus 5.5).
Thanks for this! Closing as a duplicate of #1662, merged as
88b290fcb: it adds the samerestore_dot4_inline_selrepair to the exact re-anchor's window check, so the FSPXv_dot4_i32_i8with a replicated inline integer is no longer refused there.AI-assisted (Claude Code, Claude Opus 5.5).