Shaders: cover v_cmp_class_f32 VOPC SGPR/literal, mask bits, and v_cmpx_class_* EXEC narrowing #2081
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory!2081
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2081"
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?
@fuzeofficlal on GitHub · 2026-11-25 04:27 UTC · original
fuzeofficlal:test/shader-vcmp-class-799→main· +130 −0 · 1 files · 1 commits · openAddresses #799.
Summary
Audited
Lower::compare("class") andlane_bits_for(v_cmpx_*) against RDNA2V_CMP_CLASS_F32/V_CMPX_CLASS_*semantics and added hardware + WARP tests invalu_tests::v_cmp_and_cmpx_class_f32_match_rdna2covering the paths not exercised by328eec1:v_cmpx_class_f32(0x098) &v_cmpx_class_f16(0x09f)EXECnarrowing: verifies directEXECmasking across matching and non-matching lanes without flushing denormals or quietingsNaN.v_cmp_class_f32_e32): covers SGPRsrc0(s0) and 32-bit literalsrc0(0xFFfollowed by raw+sNaNand-denormalbit patterns).src1[31:10]) & combined masks: verifies0xFFFF_FC00is ignored by hardware and exercises combined class masks across all 10 IEEE-754 binary32 class min/max boundaries.Testing
cargo test -p victory-shader --locked v_cmp_and_cmpx_class_f32_match_rdna2 -- --test-threads=1on hardware GPU (RTX 5090), WARP, anddxil.dllvalidation.cargo clippy --workspace --all-targets --all-features -- -D warningsandcargo xtask policy.@sinan-cmyk on GitHub · 2026-11-25 09:08 UTC · original
Offline measurement on a retail dump
Result: no count change against
main.I merged head
616de417ontomain940d32f(clean merge) and ranvictory translate --validate --listonshaders.rpf(1.0.2.1), with dxil.dll 1.8.2502.11. I compared the result withmainprogram by program (25,889 programs). Validated: 23,918 onmain, 23,918 with this PR.No program changes its failure reason. The count shows that the change rejects nothing on this data. It does not show whether the output is right.
No shader names or data are included, per the asset policy. AI-assisted (Claude Code).
@Marvisak on GitHub · 2026-11-25 10:30 UTC · original
Automated triage for the maintainers.
This adds
valu_tests::v_cmp_and_cmpx_class_f32_match_rdna2. It is test-only and covers the"class"arm ofLower::compareinemit/lower.rsthrough the VOPC e32 form with an SGPR and a literalsrc0, mask bits above bit 9, andv_cmpx_class_f32/v_cmpx_class_f16narrowing EXEC. I decoded the hand-assembled VOPC words (0x088, 0x098, 0x09f; s0, v1, v2, literal 0xFF), and they match the comments. The expected values follow the class table thatsemantics_tests::classalready uses. The per-bit e64 cases mostly repeatsemantics_tests::class_compares_match_the_hardware. The new parts are the cmpx, SGPR and literal cases. CI: passing.Generated by Claude Code
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.