mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 22:25:53 +01:00
[GH-ISSUE #31] AMD Radeon 780M (RDNA3 iGPU, driver 26.10.2): cs_imgload_tfe and cs_imgload_d16_tfe fail on main - the tfe fetch status VGPR is read but never written #5
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#5
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Mby159 on GitHub (Nov 24, 2026).
Original GitHub issue: https://github.com/ubiquitarianism/leonida/issues/31
AMD Radeon 780M (RDNA3 iGPU, gfx1103), AMD proprietary driver 26.10.2 (LLPC), Vulkan 1.4.359, Windows 11:
cs_imgload_tfeandcs_imgload_d16_tfefail onmain(9ec34cdff) - the tfe fetch status VGPR is read but never written.What happens
Both fixtures load an image with the
tfemodifier and add the fetch status VGPR into the result, so a stale status moves every texel. On this GPU every texel of the r32 sint view moves by exactly 2000:The expected value is
100 - (8y + x)= 71 at texel(5,3), so 2071 is 71 + 2000. The fixture seeds the status VGPR with 2000 before the load, so the shader reads back the seed: the status VGPR is never written.The two other views are exact, because they do not add the status into the result.
cs_imgload_d16_tfefails the same way (64 bad, texel(5,3) = 2071).Where to look
tools/rdna2spirv.pyallocates the extra destination VGPR fortfewhen it counts the instruction's destinations:but the typed image load emits a plain
OpImageFetch(image_load_typed->image_read_typed), and nothing writes that extra VGPR. On hardware, an MIMG read with TFE returns the fetch status in the dword after the data; in SPIR-V there is no such status, so the translator has to write it itself (0 for a resident texel, which is what the fixture expects).Notes
runtime/test/shaders/and the test is the project's own.@superartyom commented on GitHub (Nov 24, 2026):
Additional confirmation on an NVIDIA GeForce RTX 5070:
Tested on Leonida commit
ece4ba5b3on Windows. Both cs_imgload_tfe and cs_imgload_d16_tfe translate successfully and pass spirv-val, but fail when run on the GPU.For both tests:
Direct commands:
vk_store_test cs_imgload_tfe.spv load
vk_store_test cs_imgload_d16_tfe.spv load-d16
The full GPU test run reported 197 passed, 49 skipped, and these 2 failures. This reproduces the TFE status VGPR issue on an RTX 5070 as well.
@superartyom commented on GitHub (Nov 24, 2026):
Correction: I reproduced the 2071 result on an RTX 5070 at commit
ece4ba5b3, but I initially described it as proof of a translator bug. After seeing the discussion around closed PR #98, I understand the fixtures’ expected value may be incorrect. My run confirms the output on this GPU; it does not establish that the translator is wrong.@iiiirokuuug-rgb commented on GitHub (Nov 24, 2026):
Same two failures on an Intel Arc A770 (Alchemist, 16 GB; Intel Windows driver 32.0.101.9033, Vulkan 1.4.356; Windows 11 26200) on
21625bc, so this is not RADV-specific and not RDNA3-specific — it reproduces across vendors:180/248 passed, 66 skippedon this GPU, and these are the only two failures.That is consistent with the cause you name — the fetch status VGPR is read but never written — rather than with anything the driver does: the same 64 words and the same
texel(5,3) = 2071on a different vendor point at the translated program, not at the driver's readback.@LewisStephens99 commented on GitHub (Nov 24, 2026):
Additional independent result on
maind0da7dade: NVIDIA RTX A2000 12GB, Windows 11, NVIDIA 32.0.16.2114, Vulkan 1.4.363, LLVM-MC 21.1.8.nnFull synthetic suite: 258 shaders translated, 258 pass spirv-val; 198/249 runnable cases passed, 49 skipped. The only two failures werecs_imgload_tfeandcs_imgload_d16_tfe, both at 64 bad r32 sint texels and texel(5,3) = 2071 instead of 71.nnAll 4imgloadfixtures pass with PR #291 applied. 3 TFE semantic tests and 23 typed-image tests pass on the branch. Synthetic inputs only; no game files or retail assets used. AI-assisted.@iiiirokuuug-rgb commented on GitHub (Nov 24, 2026):
Confirmed fixed on the Intel Arc A770 from my earlier comment.
3295055(which merges #892), same machine, same driver 32.0.101.9033:Before the merge the same two printed
64 bad, texel(5,3) = 2071here. So it was the fixtures' expectations and not the Intel driver, which the identical failure on both vendors already pointed at. The GPU suite on this device should now be 182 passed / 66 skipped / 0 failed, and the only remaining suspects on Arc are the two tests #725 lists.