mirror of
https://github.com/ProjectLeonida/mandy.git
synced 2026-12-06 14:58:37 +00:00
tbuffer_store_format_* and its d16 forms were Unsupported, though every tbuffer_load_format_* form translates. They now go through buffer_store with the instruction's format, as the loads go through buffer_load_format: - only that format is encoded, with no branch on the V#'s FORMAT; - the bounds check uses its element size; - a V# whose FORMAT is 0 (INVALID) still disables the store, as measured. (@Vonsek covers the MTBUF loads and @opit80 the raw MUBUF accesses through such a V#.) The format parsing the loads did inline becomes mtbuf_format(), shared by both: no modifier is GFX10's default BUF_FMT_8_UNORM, and a format FORMATS has no encoder for stays Unsupported. read_before_write_vgprs now counts a tbuffer store's data VGPRs as reads, as for buffer_store. cs_tbuffer_store.asm stores into 13 sentinel-filled regions through V#s whose format differs from the instruction's or is 0, and reads them back. Every expected word was measured by running the same body natively on a Radeon 680M (gfx1035, RDNA2); wave32 and wave64 gave the same 52 words: - the instruction's format decides the encoding, the element and the bounds; - components the format has but the store doesn't give are 0, and extra ones are dropped; - the default format is one byte, and its neighbours are kept; - a FORMAT-0 V# leaves the region untouched. check.py and run_gpu_tests.py compare the dump. The semantic fixture runs through the interpreter in tests/semantic/test_tbuffer_store.py, which fails on the old translator (Unsupported). It also fails on versions that take the bounds from the V#'s element (5 words differ), take the format from the V#, fill missing components with anything but 0 (1 word), or drop the FORMAT-0 guard (2 words). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
234 lines
7.8 KiB
ArmAsm
234 lines
7.8 KiB
ArmAsm
; cs_tbuffer_store test fixture generated by tests/semantic/regen_fixtures.py from runtime/test/shaders/cs_tbuffer_store.asm
|
|
v_cmpx_eq_u32_e32 0, v0
|
|
v_mov_b32_e32 v1, 0xa5a50200
|
|
v_mov_b32_e32 v2, 0xa5a50204
|
|
v_mov_b32_e32 v3, 0xa5a50208
|
|
v_mov_b32_e32 v4, 0xa5a5020c
|
|
v_mov_b32_e32 v5, 0x200
|
|
buffer_store_dwordx4 v[1:4], v5, s[0:3], 0 offen
|
|
v_mov_b32_e32 v1, 0xa5a50210
|
|
v_mov_b32_e32 v2, 0xa5a50214
|
|
v_mov_b32_e32 v3, 0xa5a50218
|
|
v_mov_b32_e32 v4, 0xa5a5021c
|
|
v_mov_b32_e32 v5, 0x210
|
|
buffer_store_dwordx4 v[1:4], v5, s[0:3], 0 offen
|
|
v_mov_b32_e32 v1, 0xa5a50220
|
|
v_mov_b32_e32 v2, 0xa5a50224
|
|
v_mov_b32_e32 v3, 0xa5a50228
|
|
v_mov_b32_e32 v4, 0xa5a5022c
|
|
v_mov_b32_e32 v5, 0x220
|
|
buffer_store_dwordx4 v[1:4], v5, s[0:3], 0 offen
|
|
v_mov_b32_e32 v1, 0xa5a50230
|
|
v_mov_b32_e32 v2, 0xa5a50234
|
|
v_mov_b32_e32 v3, 0xa5a50238
|
|
v_mov_b32_e32 v4, 0xa5a5023c
|
|
v_mov_b32_e32 v5, 0x230
|
|
buffer_store_dwordx4 v[1:4], v5, s[0:3], 0 offen
|
|
v_mov_b32_e32 v1, 0xa5a50240
|
|
v_mov_b32_e32 v2, 0xa5a50244
|
|
v_mov_b32_e32 v3, 0xa5a50248
|
|
v_mov_b32_e32 v4, 0xa5a5024c
|
|
v_mov_b32_e32 v5, 0x240
|
|
buffer_store_dwordx4 v[1:4], v5, s[0:3], 0 offen
|
|
v_mov_b32_e32 v1, 0xa5a50250
|
|
v_mov_b32_e32 v2, 0xa5a50254
|
|
v_mov_b32_e32 v3, 0xa5a50258
|
|
v_mov_b32_e32 v4, 0xa5a5025c
|
|
v_mov_b32_e32 v5, 0x250
|
|
buffer_store_dwordx4 v[1:4], v5, s[0:3], 0 offen
|
|
v_mov_b32_e32 v1, 0xa5a50260
|
|
v_mov_b32_e32 v2, 0xa5a50264
|
|
v_mov_b32_e32 v3, 0xa5a50268
|
|
v_mov_b32_e32 v4, 0xa5a5026c
|
|
v_mov_b32_e32 v5, 0x260
|
|
buffer_store_dwordx4 v[1:4], v5, s[0:3], 0 offen
|
|
v_mov_b32_e32 v1, 0xa5a50270
|
|
v_mov_b32_e32 v2, 0xa5a50274
|
|
v_mov_b32_e32 v3, 0xa5a50278
|
|
v_mov_b32_e32 v4, 0xa5a5027c
|
|
v_mov_b32_e32 v5, 0x270
|
|
buffer_store_dwordx4 v[1:4], v5, s[0:3], 0 offen
|
|
v_mov_b32_e32 v1, 0xa5a50280
|
|
v_mov_b32_e32 v2, 0xa5a50284
|
|
v_mov_b32_e32 v3, 0xa5a50288
|
|
v_mov_b32_e32 v4, 0xa5a5028c
|
|
v_mov_b32_e32 v5, 0x280
|
|
buffer_store_dwordx4 v[1:4], v5, s[0:3], 0 offen
|
|
v_mov_b32_e32 v1, 0xa5a50290
|
|
v_mov_b32_e32 v2, 0xa5a50294
|
|
v_mov_b32_e32 v3, 0xa5a50298
|
|
v_mov_b32_e32 v4, 0xa5a5029c
|
|
v_mov_b32_e32 v5, 0x290
|
|
buffer_store_dwordx4 v[1:4], v5, s[0:3], 0 offen
|
|
v_mov_b32_e32 v1, 0xa5a502a0
|
|
v_mov_b32_e32 v2, 0xa5a502a4
|
|
v_mov_b32_e32 v3, 0xa5a502a8
|
|
v_mov_b32_e32 v4, 0xa5a502ac
|
|
v_mov_b32_e32 v5, 0x2a0
|
|
buffer_store_dwordx4 v[1:4], v5, s[0:3], 0 offen
|
|
v_mov_b32_e32 v1, 0xa5a502b0
|
|
v_mov_b32_e32 v2, 0xa5a502b4
|
|
v_mov_b32_e32 v3, 0xa5a502b8
|
|
v_mov_b32_e32 v4, 0xa5a502bc
|
|
v_mov_b32_e32 v5, 0x2b0
|
|
buffer_store_dwordx4 v[1:4], v5, s[0:3], 0 offen
|
|
v_mov_b32_e32 v1, 0xa5a502c0
|
|
v_mov_b32_e32 v2, 0xa5a502c4
|
|
v_mov_b32_e32 v3, 0xa5a502c8
|
|
v_mov_b32_e32 v4, 0xa5a502cc
|
|
v_mov_b32_e32 v5, 0x2c0
|
|
buffer_store_dwordx4 v[1:4], v5, s[0:3], 0 offen
|
|
s_waitcnt_vscnt null, 0x0
|
|
s_mov_b32 s4, s0
|
|
s_mov_b32 s5, s1
|
|
v_mov_b32_e32 v20, 0x3f800000
|
|
v_mov_b32_e32 v21, 0x40000000
|
|
v_mov_b32_e32 v22, 0x40400000
|
|
v_mov_b32_e32 v23, 0x40800000
|
|
s_mov_b32 s6, 0xffffffff
|
|
s_mov_b32 s7, 0x31016fac
|
|
v_mov_b32_e32 v5, 0x200
|
|
tbuffer_store_format_xyzw v[20:23], v5, s[4:7], 0 format:[BUF_FMT_32_32_32_32_FLOAT] offen
|
|
v_mov_b32_e32 v20, 0x3f800000
|
|
v_mov_b32_e32 v21, 0x40000000
|
|
s_mov_b32 s6, 0xffffffff
|
|
s_mov_b32 s7, 0x3104dfac
|
|
v_mov_b32_e32 v5, 0x210
|
|
tbuffer_store_format_xy v[20:21], v5, s[4:7], 0 format:[BUF_FMT_16_16_16_16_FLOAT] offen
|
|
v_mov_b32_e32 v20, 0x1
|
|
v_mov_b32_e32 v21, 0x2
|
|
v_mov_b32_e32 v22, 0x3
|
|
s_mov_b32 s6, 0xffffffff
|
|
s_mov_b32 s7, 0x31016fac
|
|
v_mov_b32_e32 v5, 0x220
|
|
tbuffer_store_format_xyz v[20:22], v5, s[4:7], 0 format:[BUF_FMT_8_8_8_8_UINT] offen
|
|
v_mov_b32_e32 v20, 0x3f800000
|
|
s_mov_b32 s6, 0xffffffff
|
|
s_mov_b32 s7, 0x3104dfac
|
|
v_mov_b32_e32 v5, 0x231
|
|
tbuffer_store_format_x v20, v5, s[4:7], 0 offen
|
|
v_mov_b32_e32 v20, 0x40000000
|
|
s_mov_b32 s6, 0xffffffff
|
|
s_mov_b32 s7, 0x31016fac
|
|
v_mov_b32_e32 v5, 0x242
|
|
tbuffer_store_format_x v20, v5, s[4:7], 0 format:[BUF_FMT_16_FLOAT] offen
|
|
v_mov_b32_e32 v20, 0x3f800000
|
|
v_mov_b32_e32 v21, 0x0
|
|
v_mov_b32_e32 v22, 0x3e800000
|
|
v_mov_b32_e32 v23, 0x3f800000
|
|
s_mov_b32 s6, 0xffffffff
|
|
s_mov_b32 s7, 0x31016fac
|
|
v_mov_b32_e32 v5, 0x250
|
|
tbuffer_store_format_xyzw v[20:23], v5, s[4:7], 0 format:[BUF_FMT_2_10_10_10_UNORM] offen
|
|
v_mov_b32_e32 v20, 0x3f800000
|
|
v_mov_b32_e32 v21, 0x40000000
|
|
v_mov_b32_e32 v22, 0x40400000
|
|
v_mov_b32_e32 v23, 0x40800000
|
|
s_mov_b32 s6, 0xffffffff
|
|
s_mov_b32 s7, 0x3104dfac
|
|
v_mov_b32_e32 v5, 0x260
|
|
tbuffer_store_format_xyzw v[20:23], v5, s[4:7], 0 format:[BUF_FMT_32_32_FLOAT] offen
|
|
v_mov_b32_e32 v20, 0x40003c00
|
|
s_mov_b32 s6, 0xffffffff
|
|
s_mov_b32 s7, 0x3104dfac
|
|
v_mov_b32_e32 v5, 0x270
|
|
tbuffer_store_format_d16_xy v20, v5, s[4:7], 0 format:[BUF_FMT_16_16_FLOAT] offen
|
|
v_mov_b32_e32 v20, 0x38003c00
|
|
v_mov_b32_e32 v21, 0x3c000000
|
|
s_mov_b32 s6, 0xffffffff
|
|
s_mov_b32 s7, 0x31016fac
|
|
v_mov_b32_e32 v5, 0x280
|
|
tbuffer_store_format_d16_xyzw v[20:21], v5, s[4:7], 0 format:[BUF_FMT_8_8_8_8_UNORM] offen
|
|
v_mov_b32_e32 v20, 0x3f800000
|
|
v_mov_b32_e32 v21, 0x40000000
|
|
s_mov_b32 s6, 0x298
|
|
s_mov_b32 s7, 0x31016fac
|
|
v_mov_b32_e32 v5, 0x290
|
|
tbuffer_store_format_xy v[20:21], v5, s[4:7], 0 format:[BUF_FMT_32_32_32_32_FLOAT] offen
|
|
v_mov_b32_e32 v20, 0x3f800000
|
|
s_mov_b32 s6, 0x2a1
|
|
s_mov_b32 s7, 0x3104dfac
|
|
v_mov_b32_e32 v5, 0x2a0
|
|
tbuffer_store_format_x v20, v5, s[4:7], 0 format:[BUF_FMT_8_UNORM] offen
|
|
v_mov_b32_e32 v20, 0x3f800000
|
|
v_mov_b32_e32 v21, 0x40000000
|
|
v_mov_b32_e32 v22, 0x40400000
|
|
v_mov_b32_e32 v23, 0x40800000
|
|
s_mov_b32 s6, 0xffffffff
|
|
s_mov_b32 s7, 0x3104dfac
|
|
v_mov_b32_e32 v5, 0x2b0
|
|
tbuffer_store_format_xyzw v[20:23], v5, s[4:7], 0 format:[BUF_FMT_32_FLOAT] offen
|
|
v_mov_b32_e32 v20, 0x3f800000
|
|
v_mov_b32_e32 v21, 0x40000000
|
|
s_mov_b32 s6, 0xffffffff
|
|
s_mov_b32 s7, 0x31000fac
|
|
v_mov_b32_e32 v5, 0x2c0
|
|
tbuffer_store_format_xy v[20:21], v5, s[4:7], 0 format:[BUF_FMT_32_32_FLOAT] offen
|
|
s_waitcnt_vscnt null, 0x0
|
|
v_mov_b32_e32 v5, 0x200
|
|
buffer_load_dwordx4 v[10:13], v5, s[0:3], 0 offen
|
|
s_waitcnt vmcnt(0)
|
|
v_mov_b32_e32 v6, 0x0
|
|
buffer_store_dwordx4 v[10:13], v6, s[0:3], 0 offen
|
|
v_mov_b32_e32 v5, 0x210
|
|
buffer_load_dwordx4 v[10:13], v5, s[0:3], 0 offen
|
|
s_waitcnt vmcnt(0)
|
|
v_mov_b32_e32 v6, 0x10
|
|
buffer_store_dwordx4 v[10:13], v6, s[0:3], 0 offen
|
|
v_mov_b32_e32 v5, 0x220
|
|
buffer_load_dwordx4 v[10:13], v5, s[0:3], 0 offen
|
|
s_waitcnt vmcnt(0)
|
|
v_mov_b32_e32 v6, 0x20
|
|
buffer_store_dwordx4 v[10:13], v6, s[0:3], 0 offen
|
|
v_mov_b32_e32 v5, 0x230
|
|
buffer_load_dwordx4 v[10:13], v5, s[0:3], 0 offen
|
|
s_waitcnt vmcnt(0)
|
|
v_mov_b32_e32 v6, 0x30
|
|
buffer_store_dwordx4 v[10:13], v6, s[0:3], 0 offen
|
|
v_mov_b32_e32 v5, 0x240
|
|
buffer_load_dwordx4 v[10:13], v5, s[0:3], 0 offen
|
|
s_waitcnt vmcnt(0)
|
|
v_mov_b32_e32 v6, 0x40
|
|
buffer_store_dwordx4 v[10:13], v6, s[0:3], 0 offen
|
|
v_mov_b32_e32 v5, 0x250
|
|
buffer_load_dwordx4 v[10:13], v5, s[0:3], 0 offen
|
|
s_waitcnt vmcnt(0)
|
|
v_mov_b32_e32 v6, 0x50
|
|
buffer_store_dwordx4 v[10:13], v6, s[0:3], 0 offen
|
|
v_mov_b32_e32 v5, 0x260
|
|
buffer_load_dwordx4 v[10:13], v5, s[0:3], 0 offen
|
|
s_waitcnt vmcnt(0)
|
|
v_mov_b32_e32 v6, 0x60
|
|
buffer_store_dwordx4 v[10:13], v6, s[0:3], 0 offen
|
|
v_mov_b32_e32 v5, 0x270
|
|
buffer_load_dwordx4 v[10:13], v5, s[0:3], 0 offen
|
|
s_waitcnt vmcnt(0)
|
|
v_mov_b32_e32 v6, 0x70
|
|
buffer_store_dwordx4 v[10:13], v6, s[0:3], 0 offen
|
|
v_mov_b32_e32 v5, 0x280
|
|
buffer_load_dwordx4 v[10:13], v5, s[0:3], 0 offen
|
|
s_waitcnt vmcnt(0)
|
|
v_mov_b32_e32 v6, 0x80
|
|
buffer_store_dwordx4 v[10:13], v6, s[0:3], 0 offen
|
|
v_mov_b32_e32 v5, 0x290
|
|
buffer_load_dwordx4 v[10:13], v5, s[0:3], 0 offen
|
|
s_waitcnt vmcnt(0)
|
|
v_mov_b32_e32 v6, 0x90
|
|
buffer_store_dwordx4 v[10:13], v6, s[0:3], 0 offen
|
|
v_mov_b32_e32 v5, 0x2a0
|
|
buffer_load_dwordx4 v[10:13], v5, s[0:3], 0 offen
|
|
s_waitcnt vmcnt(0)
|
|
v_mov_b32_e32 v6, 0xa0
|
|
buffer_store_dwordx4 v[10:13], v6, s[0:3], 0 offen
|
|
v_mov_b32_e32 v5, 0x2b0
|
|
buffer_load_dwordx4 v[10:13], v5, s[0:3], 0 offen
|
|
s_waitcnt vmcnt(0)
|
|
v_mov_b32_e32 v6, 0xb0
|
|
buffer_store_dwordx4 v[10:13], v6, s[0:3], 0 offen
|
|
v_mov_b32_e32 v5, 0x2c0
|
|
buffer_load_dwordx4 v[10:13], v5, s[0:3], 0 offen
|
|
s_waitcnt vmcnt(0)
|
|
v_mov_b32_e32 v6, 0xc0
|
|
buffer_store_dwordx4 v[10:13], v6, s[0:3], 0 offen
|
|
s_endpgm
|