Repository navigation
Shaders: lower binary64 ceiling and floor - #2713
andrewpozdnakov7-jpg wants to merge 3 commits into
Conversation
|
Verified the bit-level algorithm: exponent >= 1075 short-circuits to integral (covers NaN/inf passthrough), the low-word bias plus carry-into-high handles the 32-bit boundary, clears_high (>32) vs clears_low (>=32) split is exactly right, and below-one maps to signed zero or signed one preserving -0.0 semantics (ceil(-0.5) = -0.0). Inline float constants widened f32->f64 and the 1/(2pi) constant handled explicitly. No doubles/int64 feature needed is a nice property for older hosts. |
|
Independent Windows 11 + NVIDIA GeForce RTX 5090 + WARP + Verification (
|
|
Independent WARP/CPU verification Head: Environment: Windows x64, WARP selected ( Commands (each with
Results: baseline 267 passed, 3 failed, 3 ignored; PR 269 passed, the same 3 failed, 3 ignored. The unchanged WARP failures are Negative control: disabled the new dispatch arm; the directed-f64 targeted test failed (exit 101), as expected. No issue found in the changed lowering by review. Not tested: physical GPU, retail title, release build. AI-assisted: Codex (gpt-6-luna). |
|
AMD/RADV offline check of the head commit (no game run).
These 751 world shaders do no binary64 floor/ceiling, so the lowering is not reached by the dump; the tests added in the branch are the evidence (and Not tested in a game run; not tested on NVIDIA. |
|
Independent local verification (Windows, rustc/cargo 1.100.0/MSVC,
No blocking finding from this check; the full-suite limitation is a pre-existing hardware/WARP issue, not introduced here. AI-assisted (Hy4 flash). |
|
Automated triage for the maintainers. Verdict: merge candidate (unchanged). The new head merges Note for maintainers: #2350 (same author) adds CI: passing ( Generated by Claude Code |
Dukestar69
left a comment
There was a problem hiding this comment.
Tested merged onto origin/main (63bcca4) on Windows 11 x64 (NVIDIA GeForce RTX 5090 + WARP, dxil.dll validator active):
cargo test -p victory-shader --lib emit::valu_tests::directed_f64: 2 passed, 0 failed (directed_f64_ceil_and_floor_write_both_wordsanddirected_f64_vop3_negated_literal_rounds_in_both_directionspass on both RTX 5090 hardware and WARP).cargo clippy -p victory-shader --all-targets -- -D warnings: clean.cargo xtask policy: 192 files ok.
Synthetic tests only (no game files used). AI-assisted (Gemini 4 Neon).
Summary
Lower RDNA 2 V_CEIL_F64 and V_FLOOR_F64 in VOP1 and VOP3. The lowering rounds the two 32-bit register words directly, keeps the sign of zero, and writes both destination words under the lane guard. The emitted shader requires neither the doubles nor the int64 optional feature.
The RDNA 2 ISA defines these as rounding toward positive and negative infinity.
Verification
Coordination claim
Please retain the Git author if cherry-picking or rebasing this commit. If folding it into another commit, add Co-authored-by: andrewpozdnakov7-jpg andrewpozdnakov7-jpg@users.noreply.github.com.