perf(shader): default-on finite-data legacy multiply lowering (VICTORY_LEGACY_MUL=data) #346
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: launcher
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
run report
security: hold
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs gpu test
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Androtim--MiniVI!346
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-346"
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?
@Androtim on GitHub · 2026-12-02 14:46 UTC · original
Androtim:perf/legacy-mul-data→main· +340 −6 · 6 files · 1 commits · merged 2026-12-02 15:03 UTCSummary
Module::finite_dataincrates/victory-shader/src/emit/bitcode/finite.rs) and default-onVICTORY_LEGACY_MUL=datalowering (LegacyForm::Dataincrates/victory-shader/src/emit/lower.rs) forv_mul_legacy_f32/v_mac_legacy_f32/v_mad_legacy_f32on non-RDNA GPUs (NVIDIA/Intel).fcmp oeq 0.0+or+selectsequences when both factors are provably finite from inputs/constants/loads (or either is a non-zero finite constant /a == b), while keeping a single zero guard when one factor may be non-finite (e.g.rcp/sqrt/log/exp/fdiv).rdna::LEGACYbounded path whenhost_rdna() & LEGACY != 0and provides kill-switchVICTORY_LEGACY_MUL=0(orexact), alongsideboundedandieee.valu_tests::rdna_forms_give_what_the_spelled_out_ones_give,diff_tests::float_semantics_are_the_consoles) toLegacyForm::Exactand added unit tests infinite.rsandlower_tests.rs.Warm-Cache Plain
--releasePaired A/B vsmain(baf967f, RTX 4060 Ti 8 GB, Series X + DLSS Quality)1440p (90s in-world, warm shader caches)
main(baf967f)perf/legacy-mul-data14.4 fps(69.5 ms)14.75 fps(67.6 ms)+0.35 fps(-1.9 ms)card_busy_avg72.4%70.1%-2.3%preparing_core_msavg / med27.08 / 33.00 ms25.61 / 31.80 ms-1.47 / -1.20 mswaiting_flights_msavg0.66 ms0.14 ms-0.52 ms(-79%)0 / 00 / 04K (90s in-world, warm shader caches)
main(baf967f)perf/legacy-mul-data6.3 fps(159.7 ms)6.3 fps(157.6 ms)-2.1 ms/framecard_busy_avg/GPU90.2%/103.25 ms88.0%/102.85 ms-2.2%/-0.4 ms6708 MB6561 MB-147 MB16774 / 20960 MB14020 / 19691 MB-2754 / -1269 MB0 / 00 / 0Diagnostics Visual Check (
--features diagnostics, 1440p 90s)world_windows=21,max_draws=14031,crashes=0,no_host_texture_errors=0,used_max=6231 / 6697 MB(over=0 MB),pngs=24,lit=21/24,luma=99.98,near_black=0.07%,edge_energy=7.91,magenta=0.0%.frame-2274.png,frame-2266.png,frame-2290.png): clean lighting, water reflections, textures, foliage, and zero NaN/magenta artifacts.Static & Test Verification
cargo +1.98.1-x86_64-pc-windows-gnu xtask policy:325 files okcargo +1.98.1-x86_64-pc-windows-gnu test -p victory-shader --locked finite:2 passed; 0 failedcargo +1.98.1-x86_64-pc-windows-gnu test -p victory-shader --locked lower::tests:24 passed; 0 failed; 1 ignoredcargo +1.98.1-x86_64-pc-windows-gnu test -p victory-shader --locked valu_tests:38 passed; 0 failed; 2 ignoredcargo +1.98.1-x86_64-pc-windows-gnu test -p victory-shader --locked wave64_tests:19 passed; 0 failedclippy --workspace --all-targets -- -D warnings(default &--features diagnostics): PASSobjdump -p: standard Windows DLLs only