tests: check clamp on V_MIN3/MAX3/MED3_F16 #1250
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!1250
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/1250/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-08 20:00 UTC · original
Nawid3333:tests/f16-minmax3-clamp→main· +33 −0 · 1 files · 1 commits · closed without mergingProblem
#1116 made the decoder accept the VOP3 clamp bit on
V_MIN3_F16,V_MAX3_F16andV_MED3_F16, but no case setsit. Rejecting clamp on them again, as before #1116, passed every test I could run (the CPU tests, the GPU case list
and the focused modes that pass on my host); a shader that uses it would then fail to compile.
Change
VectorMinMaxMed3F16Clampruns the three instructions with clamp:V_MAX3_F16on the low halves (max 3.0 clamps to1.0),
V_MIN3_F16on the high halves with op_sel (min -8.0 clamps to +0.0) andV_MED3_F16on the low halves (2.0clamps to 1.0). Like
VectorMinMaxMed3F16Ops, it expects the other 16-bit half of each destination to be preserved.It runs in the default list and with
--minmax3-f16-clamp-only, which runs both cases.Testing
Windows 11, clang-cl 19.1.5, Release, AMD RX 9070 XT (Vulkan driver 2.0.395, Adrenalin 26.8.1), on
2f4b8a33:shader_recompiler_compute_tests --minmax3-f16-clamp-onlypasses.shader_cfg,resource_tracking,resource_materialization,scalar_provenanceandshader_vertex_metadatapass.
AI use (per the README's AI policy): Claude (Anthropic) found the gap with a mutation run, wrote the test and
this description, and ran the checks above on my machine.
@coderabbitai[bot] on GitHub · 2026-10-08 20:05 UTC · original
No actionable comments were generated in the recent review. 🎉
ℹ️ Recent review info
⚙️ Run configuration
3f4fdd55-a725-4716-a1fc-d4281d630274📥 Commits
Reviewing files that changed from the base of the PR and between
2f4b8a335dand3e6e1024a8.📒 Files selected for processing (1)
tests/ShaderRecompilerComputeTests.cppIncluded review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.
📝 Walkthrough
Walkthrough
Adds
VectorMinMaxMed3F16Clampto test clamped half-precision min3, max3, and med3 instructions against expected output words. Registers the test and adds--minmax3-f16-clamp-onlyto run it withVectorMinMaxMed3F16Ops.Suggested reviewers:
nmzikPriority: ⬇️ Low
Change: Other
Merge Risk: ⚪ Minimal · up to
3e6e1This adds focused coverage for clamp behavior across all three F16 min3/max3/med3 instructions, with no unresolved merge-blocking concern.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
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.Pull request closed