Shaders: probe v_cvt_f32_i32 at its rounding midpoints #3479
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
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
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
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/Marvisak--VIctory!3479
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-3479"
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?
@noobezlol on GitHub · 2026-11-27 07:15 UTC · original
noobezlol:test/cvt-sat-round-tests→main· +17 −1 · 1 files · 2 commits · openTests only, one file (
crates/victory-shader/src/emit/semantics_tests.rs).Picks up the remaining part of #1602 (by @vladbondarenko97, credited as co-author) and includes @andrewpozdnakov7-jpg's follow-up commit (
91795cd) probing both sides of the signed endpoint ties; claimed in #1633.#1602 added f32/int conversion tests but has needed a rebase since 2026-11-25. Most of it is now covered on
mainbyconversion_probes: i32/u32 truncation, saturation and NaN-as-zero (F32_EDGES),v_cvt_f32_u32round-to-even (#2186), and the ubyte forms. The one gap left isv_cvt_f32_i32above 2^24. This extends its probe with #2186's midpoint pattern, in both signs, plus the halfway points and neighbours next to i32::MAX/MIN. It checks the hardware adapter and WARP against a reference model.Tested on Windows 11, NVIDIA GeForce RTX 3060 (driver 32.0.16.2140, 32 lanes), Rust 1.98.1:
cargo test -p victory-shader --lib -- emit::semantics_tests --test-threads=1 --nocapture: 34 passed, 0 failed, 1 ignored (existing defect marker); inconversions_match_the_hardware,v_cvt_f32_i32gets 124 inputs with 0 mismatches on hardware and WARP (including @andrewpozdnakov7-jpg's endpoint neighbours,91795cd)VICTORY_WARP=1 cargo test -p victory-shader --lib -- --exact emit::semantics_tests::conversions_match_the_hardware --test-threads=1 --nocapture: passes (124 inputs, 0 mismatches)cargo clippy --workspace --all-targets -- -D warnings: cleancargo xtask policy: 192 files okNo game files used. AI-assisted (Claude Code).
@andrewpozdnakov7-jpg on GitHub · 2026-11-27 08:24 UTC · original
@noobezlol I verified
c3ffec5on app-local WARP. The signed conversion matched the reference for all 122 inputs. At the signed endpoints the fixture included the tie and one neighbour on each side of zero, but left out the other neighbour at each tie (0x7fff_ffc1and0x8000_003f).91795cd adds both by testing the midpoint and its two neighbours with both signs. All 124 signed inputs matched bit for bit on WARP, the conversion and floor-conversion tests passed, and strict shader Clippy passed with default and all features.
If you take the test, please retain Git authorship when cherry-picking or rebasing. If folded into another commit, please add
Co-authored-by: andrewpozdnakov7-jpg <[email protected]>.AI-assisted with Codex. Synthetic shader tests only.
@noobezlol on GitHub · 2026-11-27 08:49 UTC · original
thank you! I pulled in
91795cd(retaining your Git authorship) and re-verified on my RTX 3060 + WARP: all 124v_cvt_f32_i32inputs passed with 0 mismatches, andclippy -- -D warningsandxtask policyare clean@futurepro62 on GitHub · 2026-11-27 18:27 UTC · original
Full-suite run on NVIDIA, since this PR has no test report yet. Tested exact head
91795cd(on its base63bcca4).Tested
dxil.dllfrom Windows SDK 10.0.26100 (the loader's default), debug.cargo build --workspace --locked, thencargo test --workspace --locked --no-fail-fast -- --test-threads=4 --skip emit::memory_tests::heap_direct_texture_reads_mark_their_heap_index --skip descriptor::host::tests::dynamic_slots_are_held_until_released --skip memory::tests::lists_share_a_table_and_copies_keep_their_views --skip emit::stride_tests::a_heap_buffer_read_by_element_takes_the_views_stride --skip emit::stride_tests::a_heap_buffer_read_where_no_buffer_view_is_reads_zeros --skip emit::synthetic_tests::gathers_at_a_level_match_the_hardware: 866 passed, 0 failed, 10 ignored.#[test]functions in the diff.--skipleaves out tests that fail on main63bcca4on this card too, not because of this PR:heap_direct_texture_reads_mark_their_heap_indexends thevictory-shadertest process with0xc0000005(#2571), so without the skip the rest of that crate never reports;dynamic_slots_are_held_until_released,lists_share_a_table_and_copies_keep_their_viewsand the twostride_testshit the 1,000,000-view heap cap of NVIDIA drivers (#1835, #2317);gathers_at_a_level_match_the_hardwarefails on lane 0 (#1744).Not tested
AI use
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.