Shaders: VOP3 f16 interpolation attr63.w is not a 32-bit literal #2515
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!2515
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2515"
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?
@mgunes1311-lab on GitHub · 2026-11-25 15:09 UTC · original
mgunes1311-lab:shader-vop3-interp-attr63-w→main· +201 −4 · 3 files · 5 commits · openSummary
v_interp_p1ll_f16,v_interp_p1lv_f16,v_interp_p2_f16), the 9-bitsrc0field (w1 & 0x1FF) encodeshigh << 8 | attr_chan << 6 | attrrather than a register or literal operand (asfields.rsalready decodes viaOperand::Attr).attr63.w(low half:attr = 63,chan = 3,high = false),w1 & 0x1FFequals0xFF, causinggfx10::instructionto treat the 2-dword instruction as a 3-dword literal instruction and consume the following instruction word.src1andsrc2(w1 >> 9andw1 >> 18) for0xFFon VOP3v_interp_*opcodes while preserving literal detection onsrc1andsrc2.Testing
gfx10::tests::vop3_f16_interp_attr63_w_is_not_a_literal: verifies 2-dword decoding onv_interp_p1ll_f16,v_interp_p1lv_f16, andv_interp_p2_f16withattr63.wand 3-dword decoding whensrc1orsrc2is0xFF.gfx10::sp3::tests::interp_f16_attr63_w_disassembles_without_literal: verifies SP3 disassembly forattr63.w(low and high halves) and literal operands.emit::synthetic_tests::f16_interpolation_of_attr63_w_draws_on_gpu: translates a pixel shader interpolatingattr63.w, validates the emitted DXIL container, and verifies interpolated output pixels on both hardware D3D12 and WARP.@Dathinel on GitHub · 2026-11-25 15:21 UTC · original
Hardware run of the three new tests on NVIDIA Ampere: RTX 3050 Laptop, driver 610.62, Windows 11 26200, D3D12 debug layer enabled for the test host (local patch in
emit/host.rs;Host::newfails without it).cargo test --locked -p victory-shader --features host --lib attr63 -- --test-threads=1vop3_f16_interp_attr63_w_is_not_a_literalinterp_f16_attr63_w_disassembles_without_literalf16_interpolation_of_attr63_w_draws_on_gpud45c849Host::newso a skipped device would show)main940d32f+ only the two test commits (ebd17a5,d45c849)Isa { offset: 12, reason: "instruction runs past the end of the code" }Unsupported { offset: 20, what: "the first half of an interpolation" }So on main the
0xFFinsrc0makes the decoder eat the next dword as a literal, and the translation is refused rather than drawn wrong. With the fix both instructions decode as two dwords and the interpolated value matches on hardware.AI-assisted; synthetic tests only.
@oni-swr on GitHub · 2026-11-25 15:26 UTC · original
Verification (Windows 11, WARP/CPU only) — head
d45c8498c361fed763f85fe0512b75bb4830c26cTested: the PR head, which is
origin/main940d32fplus the PR commits (merge-base is940d32f, so it merges cleanly and is a fast-forward). Windows 11 Pro 10.0.26200, rustc/cargo 1.98.1,dxil.dllfrom Windows SDK 10.0.26100. No physical GPU involved:VICTORY_WARP=1andVICTORY_D3D12_WARP=1set so everyHost::newtakes the WARP adapter.cargo test -p victory-shader --locked --features host --lib attr63 -- --test-threads=1attr = false && ..., tests kept)Isa { offset: 12, reason: "instruction runs past the end of the code" }(decoder, sp3) andUnsupported { offset: 20, what: "the first half of an interpolation" }(draw test)cargo test -p victory-shader --locked --lib -- --test-threads=1(also with--features host)cargo clippy -p victory-shader --all-targets --locked -- -D warnings(also with--features host)cargo xtask policyasset policy: 182 files okThe 2 failures are a WARP baseline, not this PR:
emit::synthetic_tests::gathers_at_a_level_match_the_hardwareandpermutes_read_the_lane_named_and_zero_from_lanes_left_outare hardware-behaviour checks that fail the same way onorigin/main940d32funder forced WARP (245 passed, 2 failed, 3 ignored there; +3 passed = this PR's new tests).Diff read:
vop3(w1, attr)skips only src0 forv_interp_*opcodes (gated on the opcode name), src1/src2 still take0xFFas a literal, and the tests cover both sides (src00xFFno literal; src1/src20xFFliteral). The draw test renders the expected interpolated values on WARP. No findings. Not exercised: real GPU (WARP only; see the existing RTX 3050 comment).AI use: Claude Code (Claude Sonnet 5.5).
@Marvisak on GitHub · 2026-11-25 18:31 UTC · original · edited 2026-11-25 22:16 UTC
Automated triage for the maintainers.
Needs rebase. This PR no longer merges cleanly into
main:mainhas moved since the last triage, and the branch now conflicts incrates/victory-shader/src/emit/synthetic_tests.rs. It will be reviewed again once it is rebased onto currentmain.Previous verdict for this head: merge candidate.
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.