mirror of
https://github.com/ProjectLeonida/mandy.git
synced 2026-12-06 13:48:36 +00:00
cs_dpp_w64 uses v_mbcnt_hi, so it is a wave64 shader; without a 64-wide subgroup it is skipped, and with LEONIDA_W64_EMULATE=1 the DPP source/EXEC exchange goes through %x_buf and produces the same out[0..7] on the RTX 3070.
10 lines
500 B
NASM
10 lines
500 B
NASM
; Wave64 DPP: the lane id needs both halves, so this is a wave64 shader. Without emulation it needs a 64-wide
|
|
; subgroup; LEONIDA_W64_EMULATE=1 sends the DPP source/EXEC exchange through %x_buf and runs on any subgroup.
|
|
; Run: vk_compute_test cs_dpp_w64.spv 1 dump -> out[0..7] = 1 0 3 2 5 4 7 6.
|
|
v_mbcnt_lo_u32_b32 v0, -1, 0
|
|
v_mbcnt_hi_u32_b32 v0, -1, v0
|
|
v_mov_b32_dpp v1, v0 quad_perm:[1,0,3,2] row_mask:0xf bank_mask:0xf
|
|
v_lshlrev_b32 v2, 2, v0
|
|
buffer_store_dword v1, v2, s[0:3], 0 offen
|
|
s_endpgm
|