startup: gfx2hlsl translates v_interp_mov_f32 p10/p20 as the flat P0 value #1890
Labels
No labels
accessibility
awaiting author
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
priority: P0
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/R0Y00--Xbox2Windows#1890
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
@roansystemlabs on GitHub · 2026-11-24 20:18 UTC · original
Problem
op_v_interp_mov_f32intools/startup/gfx2hlsl.pyreads only the attribute operand. The parameter selector is never read, sop10(P1 - P0) andp20(P2 - P0) are translated as the flat P0 copy, with no refusal:The VINTRP (e32) form has the same result, and the shared decoder also prints its selector as a VGPR (
v_interp_mov_f32_e32 v1, v0, attr0.xfor p10,v2for p0), where LLVM printsp10/p20/p0.Reproduced on
mainat3041aab1by decoding the words and callingStage.one()(translation only, no draw). The words follow the layout of the gfx10_asm_vop3.s vectors already intests/rdna2_tools_check.py.The output modifiers on the same handler (
clamp,mul:2, ...) are handled by #1778; this issue is only about the selector, which is an operand, so a modifier-list guard does not see it.Proposal
p10,p20,p0) and report other values as an unsupported encoding.p0; refusep10/p20by name in both encodings. Lowering them would need per-vertex attribute values (GetAttributeAtVertex, SM 6.1), which the FXC path does not have.Verification
Source-built gfx1013 fixture (LLVM 15
llvm-mc) withp0,p10andp20in both encodings: the decoder output matchesllvm-objdump,p0still translates to the flat copy,p10/p20are refused with the selector in the reason. Fail-first: removing the guard turns the refusal checks red.startup_flat_param_*stays green on WARP and hardware.AI-assisted.
@roansystemlabs on GitHub · 2026-11-24 20:18 UTC · original
I'll take this as a focused PR: print the VINTRP
v_interp_mov_f32selector as LLVM does intools/disasm_rdna2.py, and intools/startup/gfx2hlsl.pyaccept onlyp0, refusingp10/p20by name in both encodings rather than lowering them (no per-vertex attribute access on the FXC path). Output modifiers stay with #1778; I'll rebase on it once it lands, and the plain-form control there will needp0(src1 = 2) instead of src1 = 0, which isp10.Verification: a source-built gfx1013 fixture (LLVM 15) with all three selectors in both encodings, decoder output compared with
llvm-objdump,p0unchanged,p10/p20refused, a fail-first run with the guard removed, andstartup_flat_param_*re-run on WARP and RTX 3070.AI-assisted.