Repository navigation
shader: lower binary16 VOP3 three-way minimum, maximum and median - #3564
Merged
Merged
Conversation
lambirou
force-pushed
the
shader/f16-minmax3
branch
from
November 30, 2026 09:04
a03deb4 to
daa40d9
Compare
This was referenced Nov 30, 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.
Part of the VOP3 f16 slice. Stacked on #3562; rebase after it lands.
This adds
v_min3_f16,v_max3_f16andv_med3_f16(three VOP3 rows). The result is one of the three inputs, selected by the same sign-magnitude order as the direct compute path; the median ismax(min(a,b), min(max(a,b),c)). Clamp: a negative result becomes 0 and a result above 15360 becomes 15360. Sources must be statically finite;op_selhigh halves,neg/abs, omod, subword, DPP and permuted encodings stay refused.Tests
pixel_aot_f16_minmax3_hardwareandpixel_aot_f16_minmax3_warppass; the wholepixel_aot_f16_group passes 22/22.pixel_mismatch: min/max swapped, sign order inverted, key order inverted, clamp dropped, high-half source read, med3 replaced by min3, med3 replaced by max3.form_coverage_check.pypasses and records exactly the three new forms; expected full table after the stack: 1,559/1,968 gfx1013 and 1,550/1,863 gfx1030.Limits
The high half of the destination is not observed. High-half
op_selandneg/absare refused although the direct compute path admits them. Runtime sources and NaN/infinity sources remain out of scope.The branch includes #3542/#3549/#3556/#3557/#3562; those commits drop out once the stack lands.
AI-assisted.