Shaders: a live set's registers are walked by their bits (port of Marvisak#1833) #651
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!651
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-651"
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 02:45 UTC · original
kibagami-nc:perf/ir-live-set-members-by-bits→main· +54 −4 · 1 files · 1 commits · merged 2026-11-29 00:24 UTCThe change
members(crates/victory-shader/src/ir.rs) returns the registers of a live set. It tested every one of the 513 places of aRegSetto find the few that are set, and it runs twice for each block of a program.It now walks the set's nine words by their lowest set bit (
trailing_zeros, thenbits &= bits - 1), and gives the registers in the same order. Onlyinsertsets bits, so none lies pastREGS; one there would end the walk rather than reachreg_at.This is a port of slatefield's change (Marvisak/VIctory#1833). It measured
ir::build4.5 % faster, andrange::build4.1 % faster, on synthetic GFX10 programs of 12,000 and 24,000 instructions. I did not measure it again here.It is a change to the translator's source, so cached translations are made again once (
VICTORY_TRANSLATOR).Tests
ir::tests::a_live_set_walked_by_its_bits_is_every_place_tested. It compares the walk with a test of every place for:cargo test -p victory-shader --locked: 291 passed, 4 ignored.cargo clippy -p victory-shader --all-targets -- -D warnings, with and without--all-features: no warnings.No game files, dumps or extracted data are included.