shader: cover subvector loop markers #3675
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3675"
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-12-01T00:08:12Z.
Problem
pixel_aot refused s_subvector_loop_begin and s_subvector_loop_end, so both SOPK forms stayed unobserved and any source-built pixel program using the pair could not be translated. The RDNA 2 ISA defines the pair as a conditional two-half EXEC loop, not as a generic no-op; a reduction is valid only for a restricted per-lane body.
Change
Tests
Commands run in the worktree:
Results:
Coverage delta
The records contain exactly s_subvector_loop_begin and s_subvector_loop_end, both present in docs/coverage/gfx1013.tsv and docs/coverage/rdna2.tsv: +2 gfx1013 and +2 gfx1030 in the isolated measurement.
Limits
This is desktop DXIL evidence, not a console run. The wave64 reduction is proven only for the stated per-lane body with no wave-state, memory or cross-lane effects; nested loops and bodies that let the working EXEC half become zero remain refused. No claim is made about arbitrary real-world subvector bodies.
AI-assisted.
Imported from R0Y00/Xbox2Windows. Originally posted by lukaslw-lab on 2026-12-01T02:39:50Z.
Review: APPROVED
Reviewed
68264630by reading the diff; not built or run.Verdict: approve. The pair checks are tight, and under the body contract one entry-mask pass equals the two wave64 half passes. No MUST, no SHOULD.
_co,v_cmp*,div_scaleand the lane ops are blocked (tools/pixel_aot.py:4144-4148). The VOP3bv_mad_u64_u32/v_mad_i64_i32(SGPR carry-out) are blocked only becausepixel_aotdoes not lower them yet. Addingmad_[iu]64toSUBVECTOR_BODY_CONTROLwould keep the proof true once they are lowered.names_sgpr), so its post-loop value never matters.plan_subvector_loopsruns on the pre-inline list, butinline_callsis then a no-op, so thesubvector_atindices matchpositioned.v_ALU and scalar hints and waits, with no memory, export, EXEC/VCC/SCC, DPP or cross-lane forms.pixel_aot_subvector_loops_{controls,warp,hardware}(skip 77 on the draws).Tests:
subvector-controlsproves each pairing, liveness, branch, placement and body refusal, plus the LLVM 15 SOPK encodings. The draw shows that the lowered body matches the CPU reference on WARP and hardware. CI ran the controls at this head (they are inpixel_aot_check.py's default subcheck list). The draws are outside theprfilter.Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-12-02T05:45:35Z.
Review: COMMENTED
The reviewed head now conflicts in
tests/form_coverage_check.pyandtests/pixel_aot_check.py. Please keep main's SOPP coverage checks anddraw-saveexec-familyentry alongside the new subvector-loop coverage and draw mode. The assertion that still bans both subvector markers needs to admit those two specifically while keeping the unimplemented control-flow forms refused. Please rerunform_coverage_check.pyand thepixel_aot_subvector_loops_family on the integrated head.Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-12-02T19:02:39Z.
Review: APPROVED
Reviewed
5a6e0d70on the updated branch. The conflict resolution keeps the existing SOPP and draw-saveexec coverage alongside the subvector fixtures. The controls verify paired markers and refusal of invalid bodies. Independent Windows 11 build 26300 / MSVC Debugctest --preset dev --no-tests=error -V -j 1 -R '^pixel_aot_subvector_loops_(controls|warp|hardware)$'passed 3/3, with WARP 10.0.26100.9818 and RTX 4060 Laptop 32.0.16.1656 for the GPU fixtures.