Cover VOP3 conversion modifiers #2159
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!2159
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/2159/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?
@Halfect on GitHub · 2026-11-25 06:35 UTC · original
Halfect:fix/cvt-vop3-modifiers→main· +85 −33 · 2 files · 1 commits · merged 2026-11-25 21:55 UTCRefs #1249 (
VIC-BT-028).Both conversions are intercepted by
valu16beforevalu_op's main match, so the shared implementation already applies VOP3 modifiers. The two low-half conversion arms later in that match are unreachable. Remove those arms and their now-unused helper, leaving one modifier-aware path.Add portable lowering coverage for VOP1/VOP3 parity and for
clamp,abs, andnegaffecting the generated DXIL. Add hardware/WARP probes for low-half f16 source modifiers, f32 clamp before narrowing, ordinary conversion controls, and preservation of the destination's high half.Validation on macOS:
cargo test --locked -p victory-shader --lib— 145 passed, 2 ignoredcargo xtask policygit diff --checkWindows CI passed for head
7b952ec: run45561725699, including clippy for all targets/features andcargo test --workspace --locked. The conversion probe test is included in that workspace test command; this does not by itself establish that a physical GPU rather than WARP executed it.The portable modifier regression also passes on the base revision, confirming that this is coverage plus dead-code cleanup rather than a claim to fix a still-reproducible modifier bug.
@Dathinel on GitHub · 2026-11-25 06:42 UTC · original
Ran the Windows-only conversion probes on an RTX 3050 Laptop (driver 32.0.16.1062) and WARP. I tested both
7b952ecand its parent940d32fwith only the PR'ssemantics_tests.rscopied onto the parent.The seven added probes covered 94 input/modifier combinations per backend on each revision: 5 × 16 for widening and 2 × 7 for narrowing. Both revisions had zero model mismatches and zero hardware/WARP differences in those records. The narrowing checks also compare the preserved upper half of the destination. This supports the coverage-only interpretation for these inputs.
Command:
cargo test --frozen -p victory-shader --lib emit::semantics_tests::conversions_match_the_hardware -- --exact --nocapture --test-threads=1. AI-assisted.@sinan-cmyk on GitHub · 2026-11-25 08:06 UTC · original
Offline measurement on a retail dump
Result: no count change against
main.I merged head
7b952eceontomain940d32f(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).
@Halfect on GitHub · 2026-11-25 09:22 UTC · original
Thanks @Dathinel for the hardware/WARP probe runs and @sinan-cmyk for the full-archive A/B.
Both results line up with the coverage-only claim of this PR: the modifier regression passes identically on the base revision (zero model mismatches and zero hardware/WARP differences across your 94-combination probes on both revisions), and the archive comparison shows no count change (23,918 validated on both
mainand this head) with no program changing its failure reason. That is exactly the intent here — remove the two unreachable duplicate arms and pin the VOP3 modifier behavior with portable tests, without changing any emitted output on the title data. Nothing further from my side; ready for review.@Marvisak on GitHub · 2026-11-25 11:26 UTC · original
Automated triage for the maintainers.
Merge candidate. Dead-code removal plus test coverage, with no behaviour change. Recommending a look, not approving.
mainthatvalu16incrates/victory-shader/src/emit/lower.rsreturnsSomeforv_cvt_f16_f32andv_cvt_f32_f16every time (the explicitmatches!guard), andvalu_opcalls it before its main match. The twoopsel == 0conversion arms this PR removes from that match were therefore unreachable.low_halfhad no other caller. The live path,valu16_op, already applies the source modifiers (half_fsrc) and clamp beforenarrow16.vop3_conversion_modifiers_affect_the_loweringchecks that VOP3 without modifiers lowers exactly like VOP1, and thatclamp,absandnegchange the DXIL. The newconversion_probesinsemantics_tests.rscheck f16 source modifiers before widening, clamp before narrowing, and that the destination's high half is kept. As the PR says, they pass on the base revision as well. The thread reports them matching on an NVIDIA card and WARP, and no validation change over the title's shaders.CI:
checkpassing.Generated by Claude Code