mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 23:35:53 +01:00
[PR #1662] [MERGED] rdna2spirv: the exact re-anchor keeps a signed-byte dot's stored op_sel_hi (SHADER-DOT4-SEL-EXACT-ANCHOR) #1677
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#1677
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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 Information
Original PR: https://github.com/ubiquitarianism/leonida/pull/1662
Author: @Tyrannys
Created: 11/25/2026
Status: ✅ Merged
Merged: 11/26/2026
Merged by: @aslan2142
Base:
main← Head:dot4-sel-exact-anchor📝 Commits (1)
b3ce84brdna2spirv: the exact re-anchor keeps a signed-byte dot's stored op_sel_hi (SHADER-DOT4-SEL-EXACT-ANCHOR)📊 Changes
3 files changed (+108 additions, -2 deletions)
View changed files
📝
docs/design.md(+1 -1)➕
tests/semantic/test_reanchor_dot4_inline_sel.py(+105 -0)📝
tools/rdna2spirv.py(+2 -1)📄 Description
Claimed in the coordination issue as: SHADER-DOT4-SEL-EXACT-ANCHOR (https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7155365083)
What and why
translate()re-anchors a listing that reports rejected words. When llvm-mc's messages give one offset per rejected word, it re-anchors exactly, from those offsets (invalid_at). That exact path triedmix_literalandmix_inline_literal, but notrestore_dot4_inline_sel. The forward search andcheck_printed_encodingsalready try that repair. So av_dot4_i32_i8with an inline-integer S1 and a stored op_sel_hi of 5 (llvm-mc prints it as the default, 7) got marked normalized, and its whole program was refused with "reachable instruction with normalized encoding".One of the FidelityFX DLL's programs has this form, plus rejected words. Without it, the title's slot-67 pipeline creation fails. In a retail boot, the upscaler then crashes on a null read a few seconds later.
The fix: the exact path tries
restore_dot4_inline_selfirst, in the same order as the forward search. Other mismatches are refused as before. The change is one line. It doesn't touch #1301's lines inrestore_dot4_inline_selitself.docs/design.md(the "Code-embedded data" row) records the rule and the count.Tested
No game files in the test. Windows 11, CPU only for the suite.
tests/semantic/test_reanchor_dot4_inline_sel.py, hand-built encodings:python -I scripts/run_semantic_tests.py tests/semantic: 488 files, 6,282 tests, 0 failed (292 s, 16 jobs).--wave64-emulate), the FidelityFX DLL's 29 programs:main: 22 translated;spirv-val;LEONIDA_SKIP_INT3=1 LEONIDA_TITLE_WATCHDOG=0, plus #1631): the upscaler crash that ended the runs before is gone, and the run lasted its full 485 s. A device loss on a library compute dispatch came late in the run. That's a separate matter.AI-assisted (Claude Code).
GPUs tested: NVIDIA GeForce RTX 4070 SUPER, driver 621.01, Windows 11 (retail boot only; the translator tests need no GPU)
AI-assisted: yes (Claude Code)
🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.