shader: lower the P9 MUBUF and interpolation leftovers #3623
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3623"
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?
Imported from R0Y00/Xbox2Windows. Originally posted by lambirou on 2026-11-30T16:08:40Z.
Part of the P9 leftovers. This adds four forms:
buffer_gl0_inv,buffer_gl1_inv,v_interp_mov_f32(VINTRP) andv_interp_mov_f32_e64(VOP3).The two operandless MUBUF invalidations become no-ops: the RDNA 2 ISA gives them no destination or data result, and the compute store profile maps MUBUF accesses directly to D3D12 buffers without a GL0/GL1 cache, so there is no cache or acknowledgement state to model. This matches the cacheless treatment of the operandless
s_icache_invhint; the neighbourings_dcache_inv/s_gl1_invstay refused because their scalar-cache scope is not claimed. A malformed invalidation with an operand or modifier is refused by name rather than ignored.v_interp_mov_f32lowers thep0selector in both encodings: on RDNA,p0is the flat attr0 word of the provoking vertex, bound asnointerpolation float4 flat0 : TEXCOORD1.p10andp20need per-vertex values this profile does not bind and are refused with the selector in the diagnostic; the same interpolation context, mask, component and outstanding-sample refusals asv_interp_p1/p2apply, and modifiers, clamp, output modifiers, attr1 and malformed operands stay outside the accepted text.Tests
compute_store_aot_mubuf_cache_invalidation_{controls,warp,hardware}andpixel_aot_interp_mov_{warp,hardware}.form_coverage_check.pypins exactly the four forms.Limits
The cache invalidations are modelled only as the cacheless no-op; the scalar
s_dcache_inv/s_gl1_invscope is not claimed. Only thep0interpolation selector is lowered;p10/p20remain refused. The debug layer is unavailable on this host, and no console measurement was made.AI-assisted.
Imported from R0Y00/Xbox2Windows. Originally posted by lukaslw-lab on 2026-11-30T20:38:25Z.
Review: APPROVED
Reviewed
3da324bcby reading the diff; not built or run.Verdict: approve. Both lowerings are right inside this profile. No MUST. The two SHOULDs tighten the argument and can follow.
buffer_gl0_inv/buffer_gl1_invreverses the explicit refusal from #1379 (tools/compute_store_aot.py:2825). The stated reason, that the profile "models no GL0/GL1 cache", is not what makes it safe: desktop D3D12 UAVs are cached too. It is safe because the profile reads throughinputData(the SRV) and writes onlyu0, so no load can observe a store from another wave or group, and an invalidate has no visible effect. Please put that condition in the comment and indocs/experiments.md. A later change that adds loads fromu0would then have to revisit the no-op instead of inheriting it silently.v_interp_mov_f32 p0reads a separate input,nointerpolation float4 flat0 : TEXCOORD1(tools/pixel_aot.py:8821,:8849). It matches the guest only if the producer fillsTEXCOORD1with attr0 of the provoking vertex. The only producer istests/pixel_aot_vs.hlsl, which sets it to constants(0.125, −0.25, 2, 4), while attr0 at vertex 0 isuv = (0, 0, 0.25, 1). So the draw shows that the right component offlat0is read, not that p0 equals attr0. Please state the producer contract in the docstring/docs. Making the test VS write the provoking vertex'suvintoflat, plus one program that reads bothp0andp1/p2of the same component, would pin the relation.p10/p20are refused with the selector named.p0shares the m0/mask/sample-overlap rules ofp1/p2, and the exact operand regex keeps modifiers, clamp and omod out.uvwhen nothing reads it, in both export paths. The neighbouring draws you list cover that change.Tests: the cache draw (six 320-word readbacks) shows the invalidations leave the stored words unchanged. The interp draw checks four flat words, with component and source mutations. The
controlsentry and the five new draws are not in the Windowsprpreset filter. CI ran the LLVM fixture job andform_coverage_check.py; the draws have only your WARP + RX 9060 XT run.