Repository navigation
feat(shader): decode DPP8 on VOP1 and VOP2 - #513
Conversation
|
Thanks, this checks out. The encoding matches LLVM ( |
Co-Authored-By: Claude <noreply@anthropic.com>
|
Rebased on current main (after #587). Conflict in |
|
Thanks, the conflict resolution is right. PPSA21564 has no DPP8, and with 2 lane bits the quad_perm path generates the same SPIR-V as main, so this doesn't need my PPSA21564 check. Ready to merge from my side. |
What
The decoder threw on DPP8 (
src0= 233dpp8, 234dpp8 fi:1) for every VOP1/VOP2 opcode. Now it decodes them.dppCtrl, plus a newdpp8operand flag.fi:1setsdppFetchInactive. DPP8 has no row/bank mask, bound_ctrl or neg/abs, so those keep their defaults.DppMoveFlags::controlwidens to 32 bits.Lanes8marks a DPP8 selector, so the existingDppMoveU32/DppUpdateU32ops and theirLaneSourceentries cover it unchanged.EmitDppGroupPermTargetLane): 2 bits per lane for quad_perm, 3 bits for DPP8 (8-lane groups).llvm-mc -mcpu=gfx1013(f64 VOP1, readfirstlane, swap/swaprel, madmk/madak/fmamk/fmaak, mac_legacy) throwDPP8 modifier is not supported for opcode.main, and I'll fix those in separate PRs:v_movrels_b32,v_movrelsd_b32,v_movrelsd_2_b32:readRelativeVectorreads the registers directly and drops the source permute. On HW the permute applies to the relatively indexed value.v_pk_fmac_f16: the DPP16 form already disagrees with the same op on a pre-permuted source.Behaviour measured on HW (RDNA2 gfx1035, wave32 and wave64)
lreads lane(l & ~7) | sel[l & 7]. The groups never cross 8 lanes, including across the wave64 halves.fi:0: a lane whose source lane is inactive reads 0.fi:1: it reads the source lane's value anyway. Inactive lanes are not written.Tested
Arch Linux, RADV (RDNA2) and lavapipe; no title.
agc_driver_dpp8_tests: v_mov (plain,fi:1), v_add_nc_u32, v_add_f32, v_fmac_f32, v_cndmask_b32, v_cvt_f32_i32 and v_add_co_ci_u32 with DPP8. A partial-exec block (exec=0x5a5af0f3, wave64 hi0xc3a5960f) checksfi:0/fi:1and the zeroing of inactive sources. The source ofmov_uniform_inactiveis wave-uniform, which pins the two-half wave64 path. Expected values come from HW. It runs as wave32, as wave64 on one 64-lane subgroup, and as wave64 split into two 32-lane halves (ComputeTarget(32)). lavapipe skips the test (subgroup 8), as DsPermute does.fiignored, DPP8 neg/abs read like DPP16, lanes taken as quad_perm, destination losingdpp8, translator droppingLanes8. RemovingDppMoveU32/DppUpdateU32fromLaneSourcealso fails it on the split path. ForcinglaneHalfto 0 fails it on lane 32.v_mov_b32_dpp. It is not committed. All passed except the four refused above and the*_co_ciforms, where the reference reads a vcc that the first op had already overwritten.agc_driver_pixel_helper_lanes, which also fails onmainon local RADV since fix(recompiler): start pixel waves without their helper invocations in EXEC #305.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository (attach them to this PR)