mirror of
https://github.com/ProjectLeonida/mandy.git
synced 2026-12-06 08:58:36 +00:00
Merge pull request #892 from moffington/fix/shader-1266-tfe-fixtures
tests: correct resident TFE status expectations (SHADER-1266)
This commit is contained in:
@ -1,8 +1,10 @@
|
||||
; tfe status VGPR on a d16 image_load (SHADER-1266): cs_imgload_d16 with tfe on both loads. Under d16 one
|
||||
; component fills one VGPR, and with tfe the fetch status follows it, so vdata is v[7:8] and v[11:12]. Every texel is
|
||||
; resident, so the status is 0. Each status VGPR is seeded with 1000 and added into the result, so a stale status
|
||||
; moves every texel by 2000. The unpacking and the result are cs_imgload_d16's, checked by vk_store_test load-d16
|
||||
; (including its saturation row). Suggested by @nnonno91, who ran the same companion on gfx1036 and an RTX 5090 in #8968.
|
||||
; component fills one VGPR, and with tfe the fetch status follows it, so vdata is v[7:8] and v[11:12]. On a resident
|
||||
; texel, RDNA2 hardware leaves the status VGPR unchanged. The two status VGPRs are seeded with distinct values
|
||||
; (v8 = 0x3e8, v12 = 0x7d0) and independently checked via (v8 ^ 0x3e8) | (v12 ^ 0x7d0) before adding into v11, so
|
||||
; zeroing or modifying either status VGPR shifts every texel. The unpacking and the result are cs_imgload_d16's,
|
||||
; checked by vk_store_test load-d16 (including its saturation row). Suggested by @nnonno91, who ran the same
|
||||
; companion on gfx1036 and an RTX 5090 in #8968.
|
||||
v_and_b32_e32 v1, 7, v0
|
||||
v_lshrrev_b32_e32 v2, 3, v0
|
||||
v_cvt_f32_u32_e32 v3, v1
|
||||
@ -38,14 +40,16 @@ s_mov_b32 s28, 0x33
|
||||
s_mov_b32 s29, 0x33
|
||||
s_mov_b32 s30, 0x33
|
||||
s_mov_b32 s31, 0x33
|
||||
v_mov_b32_e32 v12, 0x3e8
|
||||
v_mov_b32_e32 v12, 0x7d0
|
||||
image_load v[11:12], v[1:2], s[24:31] dmask:0x1 dim:SQ_RSRC_IMG_2D unorm tfe d16
|
||||
s_waitcnt vmcnt(0)
|
||||
v_and_b32_e32 v7, 0xffff, v7
|
||||
v_bfe_i32 v11, v11, 0, 16
|
||||
v_add_nc_u32_e32 v11, v7, v11
|
||||
v_xor_b32_e32 v8, 0x3e8, v8
|
||||
v_xor_b32_e32 v12, 0x7d0, v12
|
||||
v_or_b32_e32 v8, v8, v12
|
||||
v_add_nc_u32_e32 v11, v8, v11
|
||||
v_add_nc_u32_e32 v11, v12, v11
|
||||
v_mov_b32_e32 v12, 0
|
||||
v_mov_b32_e32 v13, 0
|
||||
v_mov_b32_e32 v14, 0
|
||||
|
||||
@ -1,9 +1,10 @@
|
||||
; tfe status VGPR on image_load (SHADER-1266): cs_imgload with tfe on both loads. With tfe an MIMG read returns one
|
||||
; more dword after its data, the fetch status, at vdata[data_count] (RDNA2 ISA, MIMG TFE/LWE). Every texel here is
|
||||
; resident, so the status is 0. Each status VGPR is seeded with 1000 before its load and added into the result, so a
|
||||
; status that keeps its old value moves every texel by 1000 or 2000. vk_store_test fills the r32 uint image with
|
||||
; 100 + 8y + x and the r32 sint image with -2 (8y + x) before the dispatch; the rgba8 image is stored as in
|
||||
; cs_imgstore. Run: vk_store_test cs_imgload_tfe.spv load -> sint = 100 - (8y + x), uint unchanged.
|
||||
; tfe status VGPR on image_load (SHADER-1266): cs_imgload with tfe on both loads. With tfe an MIMG read reserves one
|
||||
; more dword after its data, the fetch status, at vdata[data_count] (RDNA2 ISA, MIMG TFE/LWE). On a resident texel,
|
||||
; RDNA2 hardware leaves the status VGPR unchanged. The two status VGPRs are seeded with distinct values (v8 = 0x3e8,
|
||||
; v12 = 0x7d0) and independently checked via (v8 ^ 0x3e8) | (v12 ^ 0x7d0) before adding into v11, so zeroing or
|
||||
; modifying either status VGPR shifts every texel. vk_store_test fills the r32 uint image with 100 + 8y + x and the
|
||||
; r32 sint image with -2 (8y + x) before the dispatch; the rgba8 image is stored as in cs_imgstore.
|
||||
; Run: vk_store_test cs_imgload_tfe.spv load -> sint = 100 - (8y + x), uint unchanged.
|
||||
v_and_b32_e32 v1, 7, v0
|
||||
v_lshrrev_b32_e32 v2, 3, v0
|
||||
v_cvt_f32_u32_e32 v3, v1
|
||||
@ -39,12 +40,14 @@ s_mov_b32 s28, 0x33
|
||||
s_mov_b32 s29, 0x33
|
||||
s_mov_b32 s30, 0x33
|
||||
s_mov_b32 s31, 0x33
|
||||
v_mov_b32_e32 v12, 0x3e8
|
||||
v_mov_b32_e32 v12, 0x7d0
|
||||
image_load v[11:12], v[1:2], s[24:31] dmask:0x1 dim:SQ_RSRC_IMG_2D unorm tfe
|
||||
s_waitcnt vmcnt(0)
|
||||
v_add_nc_u32_e32 v11, v7, v11
|
||||
v_xor_b32_e32 v8, 0x3e8, v8
|
||||
v_xor_b32_e32 v12, 0x7d0, v12
|
||||
v_or_b32_e32 v8, v8, v12
|
||||
v_add_nc_u32_e32 v11, v8, v11
|
||||
v_add_nc_u32_e32 v11, v12, v11
|
||||
v_mov_b32_e32 v12, 0
|
||||
v_mov_b32_e32 v13, 0
|
||||
v_mov_b32_e32 v14, 0
|
||||
|
||||
Reference in New Issue
Block a user