mirror of
https://github.com/ProjectLeonida/mandy.git
synced 2026-12-06 19:08:38 +00:00
- Compute: FSSM word 0x138 is COMPUTE_PGM_RSRC2 (user SGPRs, workgroup-id enables, thread-id VGPRs, LDS size), 0x13C..0x144 the group size; checked against 2,689 CS. GPU-checked with vk_compute_test. - LDS as a Workgroup array (reads/writes/read2/write2/st64/sub-dword/atomics/cmpst), ds_bpermute, s_barrier as a workgroup control barrier. - s_cbranch_vccz/vccnz/execz/execnz decided wave-wide (OpGroupNonUniformAny); v_cmp writes 0 for inactive lanes. GPU-checked. - image_store for 2D/2D array/3D with float/uint/sint views picked from the T# FORMAT at run time. - Raw barycentric reads via BaryCoordKHR (321 PS), POPS via fragment-shader interlock, image_sample_o offsets, fma_f16 op_sel, 64-bit v_cmpx, vcc_lo scalar loads, s_addk to specials, undeclared vertex components, normalized-encoding re-anchoring, array image_get_lod/gather4_lz, image_sample_l LOD on arrays (was reading the layer). - Duplicate vector/pointer type declarations merged; vk_harness enables barycentrics/interlock/maintenance8. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
15 lines
558 B
NASM
15 lines
558 B
NASM
; Compute: workgroup id in s4 (RSRC2 0x8088: 4 user SGPRs, TGID_X, 512 B LDS; group 64x1x1), thread id in v0,
|
|
; LDS exchange across the two waves of a group behind s_barrier, buffer store through V# s[0:3] (base 0 = heap).
|
|
; Run: vk_compute_test cs_lds.spv 4 mirror64 (out[g*64+t] == g*64 + 63 - t)
|
|
v_lshl_add_u32 v1, s4, 6, v0
|
|
v_lshlrev_b32_e32 v2, 2, v0
|
|
ds_write_b32 v2, v1
|
|
s_waitcnt lgkmcnt(0)
|
|
s_barrier
|
|
v_sub_nc_u32_e32 v3, 0xfc, v2
|
|
ds_read_b32 v4, v3
|
|
s_waitcnt lgkmcnt(0)
|
|
v_lshlrev_b32_e32 v5, 2, v1
|
|
buffer_store_dword v4, v5, s[0:3], 0 offen
|
|
s_endpgm
|