fix(shader): reject unlowered VALU modifiers on f16 interpolation halves #3368
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!3368
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-3368"
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?
@reeledMarek on GitHub · 2026-11-26 20:40 UTC · original
reeledMarek:fix/shader-interp-p1-f16-modifiers→main· +78 −4 · 1 files · 1 commits · openSummary
Halves::pairacceptedv_interp_p1ll_f16without checking VALU modifiers (abs,neg,opsel,clamp,omod,sdwa,dpp), even though lowering skips P1 completely and silently drops any P1 modifiers.v_interp_p2_f16only lowers outputclamp,omod, andop_sel[3], while silently ignoring inputabs,neg, sourceop_sel[2:0],sdwa, anddpp.v_interp_p1ll_f16with"a modified first interpolation half"and unlowered input modifiers onv_interp_p2_f16with"a modified interpolation", while preserving P2's supportedclamp,omod, andop_sel[3].modified_f16_interpolation_halves_are_rejected.Verification
victory-shaderon Linuxcargo clippy -p victory-shader --all-targets --target x86_64-pc-windows-msvc --locked -- -D warningscargo test -p xtask --locked@Dukestar69 on GitHub · 2026-11-26 20:49 UTC · original · approved these changes
LGTM — verified on Windows against
origin/main(63bcca4).v_interp_p1ll_f16(all modifiers) andv_interp_p2_f16(abs,neg, sourceop_sel,sdwa,dpp, while still permitting loweredclamp,omod, and destinationop_sel[3]) prevents silent miscompilation of modified f16 interpolation pairs.cargo test -p victory-shader --lib io:: -- --test-threads=1: 5 passed, 0 failed (includingmodified_f16_interpolation_halves_are_rejected).cargo clippy -p victory-shader --all-targets -- -D warnings: clean.cargo xtask policy: 191 files ok.Synthetic tests only (no game files used). AI-assisted (Gemini 4 Neon).
@fuzeofficlal on GitHub · 2026-11-26 20:54 UTC · original · approved these changes
LGTM —
io::Halves::pairandio::raisecleanly reject modifiers onv_interp_p1ll_f16and unlowered input/lane modifiers (abs,neg,opsel & 0x7,sdwa,dpp) onv_interp_p2_f16, while preservingv_interp_p2_f16's loweredclamp,omod, andop_sel[3].Verified
emit/lower.rs:8066-8160andgfx10/{opcodes.rs, fields.rs}: no supported modifier is rejected and no other decodedv_interp_*opcode exposes unguarded VALU modifier fields.cargo clippy --locked -p victory-shader --all-targets -- -D warnings(default &--all-features): clean.rustfmt --edition 2024: clean acrosscrates/victory-shader/src/io.rs.cargo test --locked -p victory-shader --lib -- --test-threads=1 io:: emit::tests::(RTX 5090): 22 passed, 0 failed (includingmodified_f16_interpolation_halves_are_rejectedandinterpolated_f16_writes_the_op_sel_half_with_modifiers).Minor non-blocking note
modified_f16_interpolation_halves_are_rejectedcovers P1clamp/omod/abs/negand P2abs/neg/op_sel[1]; adding cases for P1op_seland P2op_sel[0]/op_sel[2]would guard every masked bit directly.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.