victory-shader: decode f16 inline float constants in v_add_f16 wave reductions #16
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!16
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/16/head"
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-11-28 05:31 UTC · original
Androtim:feat/iter31-f16-wave-inline-consts→main· +47 −0 · 1 files · 1 commits · merged 2026-11-28 13:16 UTC## Summary
Ports upstream
VIctorycommitf3578e3(#2493) intocrates/victory-shader/src/emit/wave.rs:240..=248:0.5,-0.5,1.0,-1.0,2.0,-2.0,4.0,-4.0,1/(2*pi)) when simulating operands ofv_add_f16in whole-wave reduction detection instead of decoding their f32 bit patterns whose low 15 bits are zero (which previously misclassified non-zero f16 inline constants as an additive zero identity).wave::tests::v_add_f16_inline_float_constants_are_not_zero_identity(using MiniVI'sShape::Active(Op::AddH, ...)).Rig Specs Tested On
Run Settings & Profile
ed78e8f(and verified viawindows-latestCI)Measurements & Verification
cargo +1.98.1-x86_64-pc-windows-gnu xtask policy(294 files ok)cargo +1.98.1-x86_64-pc-windows-gnu test -p xtask(6 passed)cargo +1.98.1-x86_64-pc-windows-gnu clippy --workspace --all-targets -- -D warnings(0 warnings)cargo +1.98.1-x86_64-pc-windows-gnu clippy --workspace --all-targets --features diagnostics -- -D warnings(0 warnings)cargo +1.98.1-x86_64-pc-windows-gnu test -p victory-shader emit::wave -- --test-threads=1(22 passed; 0 failed, includingv_add_f16_inline_float_constants_are_not_zero_identity; fullvictory-shaderrun hit 3 pre-existing Windows 11 Build 26300 localdxil.dllvalidation mismatches inrect::tests&barycentric_testsout of 290 tests, verified onwindows-latestCI)@Androtim on GitHub · 2026-11-28 06:03 UTC · original
Automated triage for the maintainers (not an approval).
Verdict:
merge-candidate· CI (check):passingTriage Review
VIctorycommitf3578e3incrates/victory-shader/src/emit/wave.rs. Insimulate(),Operand::Const(c @ 240..=248)is now decoded to the GFX10 IEEE-754f16bit patterns (0x3800,0xB800,0x3C00,0xBC00,0x4000,0xC000,0x4400,0xC400,0x3118for±0.5,±1.0,±2.0,±4.0,1/(2*pi)) whenname == "v_add_f16", preventing theirf32encodings (whose low 16 bits are0x0000for240..=247) from being misclassified as theOp::AddHzero identity.v_add_f16is the only 16-bit float reduction op modelled inOp/simulate().Operand::Const(128)(0) still falls through tocrate::resource::inline(128)(0), preserving valid+0.0identity detection.usize::from(c - 240)is bounded byc @ 240..=248against the 9-element array.v_add_f16_inline_float_constants_are_not_zero_identityexhaustively verifies128yieldsSome(Shape::Active(Op::AddH, v0_in, saved, 0))while240..=248all yieldNone.Automated triage review — not formal maintainer approval.
Generated with Antigravity CLI (
agy).