mirror of
https://github.com/ProjectLeonida/mandy.git
synced 2026-12-06 13:08:37 +00:00
UINT/SINT image_load read the uint/sint storage arrays with OpImageRead, so every typed load declared StorageImageReadWithoutFormat (missing on Intel Xe-LP, #619), and read-only integer textures, which the runtime binds only in the sampled arrays, read the fallback or past the 256-entry storage arrays. They now fetch through uint/sint aliases of the dimension's sampled array; a lookup miss takes the float path. vk_store_test load fills the images before the dispatch, runs without shaderStorageImageReadWithoutFormat and fails a module that declares it. vk_image_fuzz no longer requires the without-format features, and binds its UINT/SINT cases (#1087) as sampled images, as the runtime binds a read-only texture, instead of storage-only images. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
48 lines
1.6 KiB
NASM
48 lines
1.6 KiB
NASM
; Typed image_load (SHADER-151): vk_store_test fills the r32 uint image with 100 + 8y + x and the r32 sint image with
|
|
; -2 (8y + x) before the dispatch. Each thread loads both of its texels with image_load, which the translator fetches
|
|
; through the uint and sint aliases of the sampled array (no storage image read, so no read-without-format), and
|
|
; stores their sum into the sint image; the rgba8 image is stored as in cs_imgstore. Nothing is read back after a
|
|
; write in the same dispatch. Run: vk_store_test cs_imgload.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
|
|
v_cvt_f32_u32_e32 v4, v2
|
|
v_mul_f32_e32 v3, 0x3e124925, v3
|
|
v_mul_f32_e32 v4, 0x3e124925, v4
|
|
v_mov_b32_e32 v5, 0.5
|
|
v_mov_b32_e32 v6, 1.0
|
|
s_mov_b32 s8, 0x1000
|
|
s_mov_b32 s9, 0x3800000
|
|
s_mov_b32 s10, 0x11
|
|
s_mov_b32 s11, 0x11
|
|
s_mov_b32 s12, 0x11
|
|
s_mov_b32 s13, 0x11
|
|
s_mov_b32 s14, 0x11
|
|
s_mov_b32 s15, 0x11
|
|
image_store v[3:6], v[1:2], s[8:15] dmask:0xf dim:SQ_RSRC_IMG_2D unorm
|
|
s_mov_b32 s16, 0x2000
|
|
s_mov_b32 s17, 0x1400000
|
|
s_mov_b32 s18, 0x22
|
|
s_mov_b32 s19, 0x22
|
|
s_mov_b32 s20, 0x22
|
|
s_mov_b32 s21, 0x22
|
|
s_mov_b32 s22, 0x22
|
|
s_mov_b32 s23, 0x22
|
|
image_load v7, v[1:2], s[16:23] dmask:0x1 dim:SQ_RSRC_IMG_2D unorm
|
|
s_mov_b32 s24, 0x3000
|
|
s_mov_b32 s25, 0x1500000
|
|
s_mov_b32 s26, 0x33
|
|
s_mov_b32 s27, 0x33
|
|
s_mov_b32 s28, 0x33
|
|
s_mov_b32 s29, 0x33
|
|
s_mov_b32 s30, 0x33
|
|
s_mov_b32 s31, 0x33
|
|
image_load v11, v[1:2], s[24:31] dmask:0x1 dim:SQ_RSRC_IMG_2D unorm
|
|
s_waitcnt vmcnt(0)
|
|
v_add_nc_u32_e32 v11, v7, v11
|
|
v_mov_b32_e32 v12, 0
|
|
v_mov_b32_e32 v13, 0
|
|
v_mov_b32_e32 v14, 0
|
|
image_store v[11:14], v[1:2], s[24:31] dmask:0xf dim:SQ_RSRC_IMG_2D unorm
|
|
s_endpgm
|