Fix signed zero precedence in shader division fixup #353
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/353"
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?
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by nawnie on 2026-11-27T21:18:43Z.
For
v_div_fixup_f32, a NaN intermediate quotient can currently override the signed zero required when the numerator is zero or the denominator is infinite. Resolve those operand cases before handling a NaN quotient, while retaining the existing invalid-operation and input-NaN precedence.This ports the selection-order correction also present in Marvisak/VIctory#200, credited to Nikita Romanovich. The separate exponent-difference underflow rule in that proposal is outside this change; this does not claim complete division emulation.
Validation:
cargo test --locked --offline -p victory-shader --lib emit::tests::div_fixup_corner_program_lowers_without_gpu -- --exact --nocapturepassed.div_fixup_corner_program_executes_on_gputest passed all 12 synthetic cases on a GeForce RTX 4070 Ti SUPER using D3D12. This does not independently validate behavior against RDNA2 hardware.git diff --checkpassed. Crate-widecargo fmt -p victory-shader -- --checkreports pre-existing formatting differences outside this change.No gameplay or frame-rate improvement is claimed; this is a targeted shader-correctness fix.
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by 1tsethan on 2026-11-27T23:01:01Z.
Independent Windows validation of PR #353.
Tested commit:
6e6f87993f661dd592e21bbbde5e6e4589a2af17.cargo test --locked -p victory-shader div_fixup_corner_program_lowers -- --nocapture --test-threads=1Exit: 0.
Tested commit:
6e6f87993f661dd592e21bbbde5e6e4589a2af17.cargo test --locked -p victory-shader div_fixup_corner_program_executes_on_gpu -- --ignored --nocaptureExit: 0.
Independent verification with OpenAI Codex assistance. Windows 11 Pro build 26200; Rust 1.98.1 MSVC; Windows SDK libraries from Microsoft.Windows.SDK.CPP.x64 10.0.28000.2957. Test harness used an RTX 3070 Ti / AMD integrated-GPU host; adapter identity was not captured for every test. These are focused checks on the stated PR commit, not gameplay, FPS, or a merged-main integration result.
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by cloph-dsp on 2026-11-28T00:57:47Z.
Independent local verification (Windows, Rust 1.100.0/MSVC, no game data):
6e6f87993f661dd592e21bbbde5e6e4589a2af17, merge base0f0ada19095979e2192d1b5a98bb5297cf4d53ea.cargo test --locked -p victory-shader --lib emit::tests::div_fixup_corner_program_lowers_without_gpu -- --exact --test-threads=1 --quiet→ 1 passed, 0 failed, 293 filtered, exit 0.git grep -Ffor the test name on the merge base returned no hits (test is new on this PR);git diff --check 0f0ada19 HEADclean (2 files, +140/-5).CARGO_TARGET_DIRwithCARGO_BUILD_JOBS=2. An initial link failure (LNK1318, PDB FILE_SYSTEM) was a local disk-full condition, not a PR defect; after reclaiming build artifacts it linked and passed.AI-assisted (Hy4 flash).
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by trustno1-coder on 2026-11-28T02:49:43Z.
Merged into main (
8fc2254) and shipped in v2026.11.27.10. The commit keeps you as its author, so it counts toward the contributors list. GitHub shows this as closed rather than merged only because the commits were applied on top of the newest main (new commit IDs). Thank you!Pull request closed