Shaders: flush each three-way min and max input once #3733
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3733"
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 Marvisak/VIctory. Originally posted by andrewpozdnakov7-jpg on 2026-11-28T12:59:25Z.
Flush the three inputs to
v_min3_f32andv_max3_f32once. The first selection already uses flushed operands, so its result can go straight into the secondmax_min_flushedcall. That result is a normal value or infinity, a signed zero, or a NaN. Both selections still use the existing signed-zero handling. DXIL FMax and FMin semantics.On Microsoft WARP 1.0.22 with Agility 1.620.2, both revisions passed the existing min/max/clamp CPU-model test. A separate exact comparison returned all 438,976 output words bit for bit, covering both opcodes across subnormals, signed zeros, NaNs, infinities, ordinary values, clamp, output scaling and source modifiers. Counts are emitted DXIL from generated programs. Game performance was unmeasured. Strict all-feature shader Clippy, formatting of the changed block, and the asset policy passed.
#3352 covers explicit NaN operand selection in the shared helper and is a separate semantic change.
Please retain the Git author on cherry-pick or rebase, or add
Co-authored-by: andrewpozdnakov7-jpg <[email protected]>if folding the change into another commit.AI-assisted with OpenAI Codex.
Imported from Marvisak/VIctory. Originally posted by andrewpozdnakov7-jpg on 2026-11-28T13:02:51Z.
Windows CI passed on
c909723, including the workspace tests and both Clippy configurations. The same DXIL instruction reduction also passed the exact-output comparison with the explicit NaN selection in #3352.The next step is maintainer review. Please retain the Git author on cherry-pick or rebase, or add
Co-authored-by: andrewpozdnakov7-jpg <[email protected]>if folding the change into another commit.AI-assisted with OpenAI Codex.
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.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.