Repository navigation
Shaders: flush each three-way min and max input once - #3733
Open
andrewpozdnakov7-jpg wants to merge 1 commit into
Open
andrewpozdnakov7-jpg wants to merge 1 commit into
andrewpozdnakov7-jpg wants to merge 1 commit into
Conversation
Contributor
Author
|
Windows CI passed on The next step is maintainer review. Please retain the Git author on cherry-pick or rebase, or add AI-assisted with OpenAI Codex. |
This was referenced Nov 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 <andrewpozdnakov7-jpg@users.noreply.github.com>if folding the change into another commit.AI-assisted with OpenAI Codex.