perf(shader,gpu): add opt-in SM 6.2 native half emission gated on Native16BitShaderOpsSupported (VICTORY_NATIVE_FP16=1) #420
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
needs-logs
old-names
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/TaynanGT--Vice-Tay!420
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-420"
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?
@Vladimir-Human on GitHub · 2026-11-28 15:22 UTC · original
Vladimir-Human:perf/optin-native-sm62-fp16→main· +61173 −5593 · 208 files · 660 commits · closed without mergingImplements an opt-in, hardware-capability-gated SM 6.2 native
halffoundation for item #1 from #401 (VICTORY_NATIVE_FP16=1, default OFF =0).Summary (
1be693f)host.rs,shader_cache.rs,pipeline/library.rs): requires bothVICTORY_NATIVE_FP16=1andD3D12_FEATURE_DATA_D3D12_OPTIONS4::Native16BitShaderOpsSupported == true(falls back cleanly to baseline widened FP32 translation otherwise); keys shader/PSO disk caches separately when active.emit/bitcode.rs,bitcode/opt.rs,lower.rs,mod.rs,shader.rs,container.rs): selects SM 6.2 where compatible (SFI0bit 18NativeLowPrecision+ DXIL entry metadata bit 23), lowers native binary16 constants, bitcasts,fadd/fsub/fmul/fmad, min/max, comparisons,fpext/fptrunc, and aligned raw half load/extract/store while cleanly keeping transcendentals/mixed-precision/LDS on safe FP32 fallback.VICTORY_NATIVE_FP16is unset (0), emitted DXIL matches baselineorigin/mainbyte-for-byte;Cargo.lockuntouched.Verification
cargo xtask policy: OKcargo clippy -p victory-shader -p victory-gpu --all-targets --locked -- -D warnings&--features diagnostics: 0 warningscargo test -p victory-shader --locked -- fp16: 4/4 passed (validated via Windows SDK10.0.26100.0\x64\dxil.dll); fullcargo test -p victory-shader --locked: 347/347 passedVICTORY_D3D12_DEBUG=1&VICTORY_D3D12_WARP=1cargo test -p victory-gpu --features diagnostics --locked --lib fp16: 4/4 passed on both (hardware/WARP buffer parity against widened baseline)@Garu667 on GitHub · 2026-11-28 18:48 UTC · original
Tested on an RTX 3080 10 GB (
1be693f, Series S, 5 min runs, 1 warm-up run excluded, 3 pairs).native_fp16=trueshows up in the log, so the gate works on this card.VICTORY_NATIVE_FP16=1So on Ampere it's a clear regression, mostly at entry (~2.5 fps for the first samples on every on-run, vs ~12.7 off) and the runs reach the same scenes later. The picture renders, though character surfaces in the boat cutscene looked smeared or partly see-through in one on-run capture; I can't rule out TAA/motion blur from a single frame.
@TaynanGT on GitHub · 2026-11-29 11:35 UTC · original
Thanks for the three matched pairs. The substantial Ampere startup regression means this should remain opt-in, even when Native16BitShaderOpsSupported is true. The possible character artifact also needs repeated matched captures before we consider enabling it by default.
@TaynanGT on GitHub · 2026-11-30 17:08 UTC · original
mainhas moved to a new line of the code and everything is now named Vice-Tay, so this PR no longer applies as it is (details in #468). If you'd like this change in, please rebuild it on the currentmainand open a new PR; I'll review it there.Pull request closed