Repository navigation
Shader: flush legacy f32 multiply operands and results in default MODE - #3318
pmilewsskiedu-gif wants to merge 3 commits into
Conversation
|
Apple M2 data point. Tested head c82fbe3 on Apple M2 (Mac14,3), macOS 26.4 (25E246), MoltenVK 1.4.2 (direct), subgroup 4..32, llvm-mc 23.1.6, Python 3.13.18.
Build note: full build fails on AppleClang 17 at vk_pipeline_check.cpp:567 (BUILD-822, fixed by open PR #2927); GPU binaries built, so the run above is valid. Head fetched unchanged into a separate worktree; no rebase/edit/push. Synthetic shaders and counts only; no game files. AI-assisted. |
Document f32 denormal flushing and signed-zero VOP3 behavior with synthetic validation references. AI-assisted (GPT-6).
|
Tested
3/3, all translated and spirv-val clean — the legacy f32 multiply flushes its denormal operands and result in the default MODE, exact on this adapter. NVIDIA Blackwell (RTX 50-series) coverage. AI-assisted. |
|
Tested 5e35627 on NVIDIA GeForce RTX 3090 (Ampere, subgroup 32..32), driver 610.88 (Vulkan 1.4.341), Windows 11 Pro 26300: pass. The PR's diff applied cleanly to
|
|
Tested
Synthetic tests only; no game data. |
|
Tested
No game files. AI-assisted (Claude Code). |
|
Not a pass — the full semantic suite goes red at Environment: Windows 11 Pro 26200, Python 3.15.2, NVIDIA RTX 3080 (driver 616.92),
The GPU side is fine:
Two ways to close it:
Repro (clean tree at |
|
Addressed the full semantic-suite failure reported in #3318 (comment). Reproduced: on original PR head Fix: commit Upstream integration: I also addressed PR mergeability, preserving original worktree and changes by merging No change to hardware-tested legacy-multiply semantics; prior RTX 4060 Ti and independent AMD RDNA2 GPU tests remain as reported. No new GPU or full 7,000+ test sweep claimed here. Only original test/contract merge, no game data, no DRM bypass, AI-assisted. Thank you for the concrete regression report. |
Claimed in coordination: #3232 (comment).
What and why
Under the inferred RDNA2
MODE.denorm_mode_32=0(IEEE off), DX9-stylev_mul_legacy_f32must flush f32 subnormal operands and results. It previously emitted rawOpFMuland checked only exact zero, permitting incorrect nonzero values on Vulkan drivers that preserve f32 denormals.0 * anything => +0, including an input that became -0).-0 => +0behavior after flushing.tests/semantic/test_valu_mul_legacy_denorm.py, two entirely synthetic GPU fixtures (ps_mul_legacy_denormandps_mul_legacy_denorm_mods), expected words in both GPU harness definitions, and the documented mode assumption.Tested
Windows 11 / NVIDIA RTX 4060 Ti driver 610.88 / Vulkan SDK 1.4.363,
LEONIDA_VK_VALIDATION=1, LLVM AMDGPU toolchain.Before: exact translator generated GPU outputs disagreeing in all four synthetic cases, 4,096/4,096 pixels: f32 subnormal inputs and products survived instead of flushing.
After:
python -B -I tests/semantic/test_valu_mul_legacy_denorm.py -q4/4 tests pass (also rechecked on rebased latest main). Related semantic tests 59 passed.python -I scripts/run_gpu_tests.py --require-pass --filter ps_mul_legacy_denorm ...: 2/2 GPU shaders, 8,192/8,192 pixels exact, 2/2 spirv-val both on initial main and again on rebased current main (c82fbe37).Full GPU suite on original main: 196/196 SPIR-V valid, 144 GPU pass, 46 skipped, 1 failure. The sole failure
ps_sdwa_f16_constis the existing separate FP16 subnormal issue already claimed by #3040 and unrelated to thisv_mul_legacy_f32patch. The unmerged FP16 fallback is not folded into this PR.The implementation models the inferred game f32 MODE, not arbitrary dynamic denormal-preserving or IEEE modes. No native gfx1013 oracle or proprietary shader data is claimed or included; this is synthetic shader correctness, not genuine GTA VI execution. AI-assisted (GPT-6).