Repository navigation
Conversation
legacyF32ToF16 truncates on Windows but rounds to nearest under vkd3d-proton on an RTX 5080, so a 32_FLOAT d16 format load gave 0x3c02 for 1 + 3/2048 and infinity for 70000. f16_toward_zero gives the truncated half for either rounding. UNORM and SNORM channels, which the console rounds to nearest, are left as they were. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
DenRakEiw
left a comment
There was a problem hiding this comment.
Verified locally merged onto origin/main (940d32f, Windows 11 x64, NVIDIA GeForce RTX 5090 + WARP, Rust 1.98.1 MSVC, with dxil.dll validator):
cargo test -p victory-shader --lib tbuffer_d16_loads_cut_32_bit_floats_toward_zero— passed on both RTX 5090 hardware andVICTORY_D3D12_WARP=1cargo clippy -p victory-shader --all-targets— 0 warningscargo xtask policy— ok (183 files ok)
Clean fix ensuring d16 float buffer loads truncate toward zero consistently on every host GPU, verified on RTX 5090 + WARP. Looks good.
AI-assisted (Gemini 4 Neon).
catminou4
left a comment
There was a problem hiding this comment.
Tested locally: macOS arm64, rustc 1.98.1, PR head merged into main 940d32f, cargo test -p victory-shader --locked.
144 passed / 0 failed / 2 ignored. d16 buffer loads of floats truncate on every host — consistent d16 truncation across hosts.
|
Triage verdict — Keep the float-buffer rounding fix ( Evidence
Checks and limits
Next step
This verification was AI-assisted. |
Offline measurement on a retail dumpResult: no count change against I merged head f7870d3 onto No program changes its failure reason. The count shows that the change rejects nothing on this data. It does not show whether the output is right. No shader names or data are included, per the asset policy. AI-assisted (Claude Code). |
|
Automated triage for the maintainers. Needs rebase. This PR no longer merges cleanly into Previous verdict for this head: merge candidate. Generated by Claude Code |
|
@astrosteveo I resolved the conflict on your The broader D16 run also found zero FLOAT mismatches on both native Windows adapters before and after integrating your fix alongside the integer, normalized and scaled fixes. Your vkd3d-proton result remains the distinguishing cross-platform check. 77-format comparison git fetch https://github.com/steven-seagull27/VIctory.git refs/heads/codex/pr2064-d16-float-nov26
git merge --ff-only FETCH_HEAD |
legacyF32ToF16truncates on Windows but rounds to nearest under vkd3d-proton (RTX 5080, driver 620.73.04, Wine 11.22, vkd3d-proton 3.1). So a32_FLOATd16 format load there gives0x3c02for 1 + 3/2048 and infinity for 70000.d16_channelsnow uses the existingf16_toward_zerofor float formats. Other formats are unchanged: every 8- and 16-bit UNORM/SNORM code I probed (all 8-bit ones, 256 per 16-bit format) is right there today, and truncating them broke 123 of 256 8_UNORM codes.That RDNA2 truncates here is from #1927 and #1940; I did not measure it. The new test fails on
940d32fon this stack and passes with the change.victory-shader: 244 passed, 4 failed, all 4 also onmainhere. Clippy and policy clean.Overlap: conflicts with #1927 and #1940 in the same branch of
d16_channels(keep their integer and norm arms, use this one forNumeric::Float).Not covered:
buffer_load_format_d16_*through a typed view, where the format is unknown (as in #2006). Not tested: Windows, the title.🌴 AI-assisted, made with Claude Code · from astrosteveo/VIctory