shader: NVIDIA float forms as the card's own (VICTORY_HOST_FLOAT, off) #153
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/ReTerryDavis--ReVIctory!153
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-152"
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?
@SovietBearz0r on GitHub · 2026-12-05 17:55 UTC · original
SovietBearz0r:nvidia-host-float→main· +230 −11 · 9 files · 1 commits · openOn an NVIDIA host, write the console float instructions as the card's own form instead of the spelled-out shared form — the same approach
VICTORY_RDNA_FLOATalready does for RDNA. Off by default (VICTORY_HOST_FLOAT), NVIDIA-only, from longroad's measured work.What
host_float()/HOST_FLOAT_ALL/parse_host_floatinemit/mod.rsbesiderdna_float(); new exactness bitrdna::ZERO_SIGN = 16(ALLstays 15);float_forms()/host_key()inlower/settings.rs.lower/operands.rs(max_min,med3,fract,legacy_mul) now askfloat_forms(): FMax/FMin without the-0-ordering fix-up,med3between ordered constants asmin(max(...)), legacy product as one multiply + one factor test, plusZERO_SIGNmaking the legacy-product zero sign exact for two finite factors (theExactform asks the factors first instead of thefa&&fb/not_zeroearly return).host_rdna()still drives the wave code and the f16 half-conversion; native f16 max/min untouched.FRACTcan never be enabled (never the host'sFrc).host_settings()[3] = host_key()— RDNA bits key exactly as before (asserted by test), NVIDIA off keys 0, NVIDIA on keysbits << 8, so existing caches keep serving and turning it on rebuilds once.0= spelled-out forms (byte-identical translations to main),1= all forms, any decimal/0xvalue = those bits masked toHOST_FLOAT_ALL.set_host_nvidiadetection (already existed invictory-gpu/src/host.rs) now logs the active bits;VICTORY_HOST_NVIDIA=1added totranslate/replayfor modelling an NVIDIA host offline. Launcher NVIDIA default deliberately not changed until our own bit-test/in-game pass; README documents the switch.Verification
cargo test -p victory-shader --lib: 326 passed, 0 failed, 2 ignored; new tests: switch parsing/off-unless-set, forms in the cache key (distinct key, RDNA key unchanged), and NVIDIA forms emitted on a modelled NVIDIA host (the four instructions change,fractnever,ZERO_SIGNaliasing cases). The existing hardware testrdna_forms_give_what_the_spelled_out_ones_giveran on this machine's real RDNA card and passed → RDNA path unchanged.cargo check -p victory;cargo xtask policy439 files; clippy: only main's 2 pre-existing warnings inemit/host.rs, none from changed lines;git show --checkclean.emit/valu_tests.rs(keep #136's DPP/SDWA test block, thenmod cost_checks;); after that rebase this branch merges cleanly (git merge-treereported no conflicts; the auto-mergedoperands.rsordering is safe: #121 rewrites sit after the form early-returns, unreachable when the bit is on, untouched when off).host_nvidia()), so forcingVICTORY_NVIDIA=1on AMD does not enable them.Source: longroad
630bdb4(Lesloo/longroad).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.