shader: keep quiet NaNs with payload bits out of the packed f16 min/max sNaN path #1579
No reviewers
Labels
No labels
bug
documentation
duplicate
enhancement
GPU
GUI
help wanted
question
Shaders
Video
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/KytyPS5--KytyPS5!1579
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/1579/head"
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?
@Nawid3333 on GitHub · 2026-10-17 02:06 UTC · original
Nawid3333:shader/pk-minmax-quiet-nan→main· +7 −3 · 2 files · 1 commits · merged 2026-10-17 03:12 UTCV_PK_MIN_F16 and V_PK_MAX_F16 return the quieted NaN for a signaling NaN half and the other operand for a quiet one. The signaling test masked each half with
0x7c00and checked for a nonzero payload, so a quiet NaN with a nonzero payload, such as0x7e01, was taken as signaling and returned instead of the other operand.Change (
PackedFloat16): mask with0x7e00, so the quiet bit must be clear as well. One constant.Tests
PackedMinMaxF16NanAndSignedZeroEdges: one quiet NaN0x7e01per half, against 1.0 and 2.0. Before the change both ops return0x7e017e01on the RX 9070 XT and on the Ryzen 7600X iGPU, also with the harness forced to 32-wide subgroups (a local switch); after it they return0x40003c00.42bb0da5: all 712 compute-suite entries in both subgroup modes and the 30 graphics cases keep their status, except this test, which now passes.If you'd like this done differently, tell me and I'll change it.
Written with Claude Code (AI): it wrote the change and ran the tests on my PC (driver 26.8.1, Windows 11). I reviewed the diff and this description before opening the PR.
🤖 Generated with Claude Code
@coderabbitai[bot] on GitHub · 2026-10-17 02:09 UTC · original
No actionable comments were generated in the recent review. 🎉
ℹ️ Recent review info
⚙️ Run configuration
de89e1d6-7ad5-40e5-a7e6-f7461c5c7e60📥 Commits
Reviewing files that changed from the base of the PR and between
42bb0da520and63f92c51fb.📒 Files selected for processing: 2
src/graphics/shader/recompiler/frontend/translate/Float.cpptests/ShaderRecompilerComputeTests.cppIncluded review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 6 remain after this review.
📝 Walkthrough
The quiet-NaN lane logic in
Translator::PackedFloat16now uses exponent mask0x7e00instead of0x7c00. The signaling-NaN comparison is unchanged. The packed F16 min/max test adds two cases with NaN inputs and extends its expected results from four values to six.Suggested reviewers:
nmzikPriority: ⬇️ Low
Change: Bug fix
Merge Risk: ⚪ Minimal · up to
63f92The packed F16 min/max change corrects quiet-NaN handling, and the added test cases cover the regression. No actionable merge risk remains.
Pre-merge checks:
4 ·
1
Full details: Docstring Coverage
Explanation
Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files. (1 skipped: 1 too large.)
Resolution
Write docstrings for the functions missing them to satisfy the coverage threshold.
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
❤️ Share
Comment
@coderabbitai helpto get the list of available commands.