Shader tests: snapshot of which ALU instructions lower (catches lowerings lost in a merge) #81
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/uiliannn--VItoriaBr!81
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-81"
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?
@lcg007xd-c on GitHub · 2026-11-25 22:04 UTC · original
lcg007xd-c:test/lowering-coverage→main· +953 −0 · 3 files · 3 commits · openWhat
A tripwire against losing lowerings. Issue #4 records lowerings that went missing in a merge (
image_sample_b_o, the LDS bounds checks). Nothing noticed until a title broke.The new test
lowering_coverage_matches_the_snapshot(emit/coverage_tests.rs) works like this:s20, which stays clear of the buffer descriptor ins[8:11].emit/lowering-coverage.txt(743 lines, 24 KB).vop1 0x02a v_rcp_f32: lowers -> refused. By default it only prints that as a warning and passes, so no one else's PR goes red over it. WithVICTORY_STRICT_TESTS=1(the switch #43's skips already use) it fails.VICTORY_BLESS=1 cargo test -p victory-shader coverage, and the updated list is committed with it.The whole sweep takes about 0.6 s.
Today, 544 of the 743 named opcodes lower, 197 are refused, and 2 panic. The 2 are
v_permlane16_b32andv_permlanex16_b32, and #79 fixes them. Once #79 merges, they show up as a warning until the list is re-blessed.Tests
v_rcp_f32arm fromlower.rslocally. The test then named both encodings (vop1 0x02aandvop3 0x1aa,lowers -> refused). In the sandbox, a stale list passes with a warning by default and fails withVICTORY_STRICT_TESTS=1.--target x86_64-pc-windows-msvc) pass locally. The asset-policy test accepts the new.txt.Open lowering PRs (#56, #57, #71, #73) keep passing after this merges. Their new lowerings show up as warnings until someone re-blesses the list.
Not covered: instructions that need more than this template (VOPC, memory, images, branches). The test only shows that an opcode lowers or is refused, not that the result is numerically right.
🤖 Generated with Claude Code
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.