Shader tests: no opcode of the ISA may crash the translator (port of Marvisak#2378) #673
No reviewers
Labels
No labels
AMD
audio
bug
confirmed
crash
cutscene
dlss
documentation
duplicate
enhancement
fixed-on-main
frame-generation
good first issue
help wanted
input
INTEL
invalid
lighting
linux-proton
memory
needs-info
needs-logs
needs-rebase
NVIDIA
performance
pr-diagnostics
pr-docs
pr-feature
pr-fix
pr-performance
pr-refactor
pr-tests
question
RAYTRACING
rendering
report
series-s
shaders
spam
startup
upstream
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/trustno1-coder--VIctory-NVIDIA!673
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-673"
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?
@kibagami-nc on GitHub · 2026-11-28 03:20 UTC · original
kibagami-nc:test/isa-census-never-panics→main· +209 −20 · 4 files · 1 commits · merged 2026-11-29 08:16 UTCWhat
A census over the whole ISA. Every opcode of every decode table is encoded into a minimal pixel program and driven through decode → ir → structure → resource → io → emit. The tables are SOP2, SOPK, SOP1, SOPC, SOPP, SMEM, VOP1, VOP2, VOPC, VOP3, VOP3P, VINTRP, DS, MUBUF, MTBUF, MIMG, FLAT, GLOBAL and SCRATCH.
Ok, or a refusal that names what it lacks.catch_unwindturns any panic into a test failure. A title can reach any of these encodings, so none may take the translator down.pub(crate)now, so the census walks the decoder's own tables and follows new opcodes as they are added.On this tree the census gives 540 translated, 692 refused by name or reason, 0 panics, in 0.2 s. With
--nocaptureit lists each opcode's outcome, so the coverage of each family can be read.This is a port of borosf's test (Marvisak/VIctory#2378). The only conflict was the module list in
emit/mod.rs.Tests
cargo test -p victory-shader --locked --lib census -- --nocapture: passes, with the counts above.cargo clippy -p victory-shader --all-targets -- -D warnings, with and without--all-features: nothing in the new or changed lines. The one finding ismain's own inemit/mod.rs, fixed by #665.No game files, dumps or extracted data are included.
@Dukestar69 on GitHub · 2026-11-28 05:36 UTC · original · approved these changes
LGTM — verified on Windows:
cargo test -p victory-shader --lib census_tests::passed (every_opcode_translate_or_refuse_never_panic)cargo clippy -p victory-shader --lib -- -D warningspassed with 0 warningscargo xtask policypassed (295 files ok)Synthetic tests only (no game files used). AI-assisted (Gemini 4 Neon).