Shaders: hardware test for v_cvt_f16_u16 and v_cvt_f16_i16 #990
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!990
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/990/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?
@LouisRiverstone on GitHub · 2026-11-24 14:43 UTC · original
LouisRiverstone:shaders/cvt-f16-int-test→main· +34 −0 · 1 files · 2 commits · merged 2026-11-25 00:17 UTCFixes #866.
v_cvt_f16_u16(0x050) andv_cvt_f16_i16(0x051) had no hardware test, while their siblings 0x052/0x053 do. The signed one sign-extends withShl 16+AShr 16, which nothing exercised.New test
v_cvt_f16_u16_and_i16_widen_the_integer_first, in the same shape asv_cvt_u16_and_i16_f16_saturate: it runs 7 inputs through both opcodes, covering zero, 1.0, 2047, the sign flip at 0x8000, 64512 / -1024, and the signed -2 / -1 that exercise theShl 16+AShr 16sign-extension.The cases are limited to integers f16 holds exactly. The first version also asserted round-to-nearest (32767 -> 32768) and failed in CI: on
mainthe f32 -> f16 narrowing truncates (0x77ff), which #422 changes. Rounding cases belong with that fix, so the unsigned 65534/65535 overflow cases are skipped here too.Test only, no production change. Expected values were checked against IEEE half conversion. The table in #866 lists
0x0001as0x0400; that is 2^-14, and 1 is0x3C00, which is what the test asserts.Verify:
cargo test -p victory-shader v_cvt_f16_u16_and_i16(Windows, needs a GPU or WARP).I could not run it locally: the shader test module is Windows-only.
🤖 Generated with Claude Code
@Zipettte on GitHub · 2026-11-24 14:54 UTC · original
Tested on AMD Radeon RX 7700 XT (RDNA3, gfx1101), driver 32.0.32029.2010, Windows 11, Rust 1.98.1 MSVC at
8d67fa5:cargo test -p victory-shaderpasses, 121 passed / 0 failed, includingv_cvt_f16_u16_and_i16_widen_the_integer_first(the hardware test from this PR) on real RDNA3 hardware. Workspace baseline on main (ffe310e) was green on the same machine (342 passed).Tested with AI assistance (Claude).
@DeerSilver on GitHub · 2026-11-24 18:39 UTC · original
Tested head
8d67fa5merged ontomainffe310e(clean merge) on NVIDIA GeForce RTX 5060 Laptop GPU (Blackwell), driver 621.24, Windows 11 26300, Rust 1.98.1: pass. No game files: the test suite only.no SM 6.6skip:v_cvt_f16_u16_and_i16_widen_the_integer_first--all-featuressovictory-gpuenables it, plus a local, uncommittedEnableDebugLayerinemit::host::Host::newfor the shader tests), the run logs no debug-layer message thatmaindoesn't log too.cargo test --workspace --all-features --locked: 347 passed, 0 failed, 6 ignored (mainwith all features: 346 / 6).cargo clippy --workspace --all-targets --locked -- -D warnings, with and without--all-features: clean.AI-assisted (Claude Code).