tests: correct resident TFE status expectations (SHADER-1266) #892
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
missing claim
needs rebase
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/ubiquitarianism--leonida!892
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/892/head"
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?
@moffington on GitHub · 2026-11-24 14:59 UTC · original
moffington:fix/shader-1266-tfe-fixtures→main· +21 −14 · 2 files · 2 commits · merged 2026-11-24 17:15 UTCFixes #31.
Claimed in the coordination issue as:
SHADER-1266Summary
runtime/test/shaders/cs_imgload_tfe.asmandruntime/test/shaders/cs_imgload_d16_tfe.asmso residentimage_load ... tfechecks preservation of each pre-seeded status VGPR rather than expecting0.tools/rdna2spirv.pyuntouched.v8 = 0x3e8,v12 = 0x7d0) before the twoimage_load ... tfeinstructions and independently checks both via(v8 ^ 0x3e8) | (v12 ^ 0x7d0)added intov11, so zeroing or modifying either status VGPR shifts every texel.Context & Related Work
60450101, LLVM23.1.6) showed that a residentimage_load ... tfeleaves the status VGPR unchanged (preserving the pre-seeded value), consistent with LLVMSIISelLowering.cppinitializing the TFE/LWE status register prior to the instruction.tools/rdna2spirv.pyto write0tovdata[data_vgprs]on residentimage_load/image_load_mip(the same translator change previously closed in #98). This PR keepsmain's current translator semantics intact and updates the two inherited fixtures instead.Validation (Linux, NVIDIA GeForce RTX 3060, Driver
615.78.08, Vulkan1.4.351)scripts/run_gpu_tests.py):258/258translated andspirv-valvalid;200/249passed,49skipped,0failed (cs_imgload_tfeandcs_imgload_d16_tfeboth pass withr32 sint (sint view): 0 bad, texel(5,3) = 71,0regressions vs.main).LEONIDA_W64_EMULATE=1):258/258translated andspirv-valvalid;232/249passed,17skipped,0failed (0regressions vs.main).tools/rdna2spirv.pycausesrun_gpu_tests.py --filter tfeto fail both corrected fixtures (0/2passed:cs_imgload_tfeandcs_imgload_d16_tfebothFAIL,64 bad, texel(5,3) = 2111).scripts/check_no_game_data.pypassed on both modified.asmfiles.Limitations
image_load ... tfe(32-bit andd162D) only; sparse-page NACK (status != 0) andlwebehavior remain outside this measurement.No game files and nothing online. AI-assisted.
@SweatierKey on GitHub · 2026-11-24 15:05 UTC · original · approved these changes
Independent A/B hardware verification on NVIDIA GeForce RTX 5070 Ti (driver 616.92, Windows 11, Vulkan 1.4) against
origin/main@a28927849:Built & validated (
runtime/test/shaders/build.py+spirv-val --target-env vulkan1.3, both native andLEONIDA_W64_EMULATE=1):cs_imgload_tfe+cs_imgload_d16_tfe:2 translated, 2 pass spirv-valin both modes.A/B execution via
vk_store_test.exe(load/load-d16):origin/main@a28927849): bothcs_imgload_tfeandcs_imgload_d16_tfefail in native andLEONIDA_W64_EMULATE=1withr32 sint (sint view): 64 bad, texel(5,3) = 2071(rc=1).8afbba14b): bothcs_imgload_tfeandcs_imgload_d16_tfepass in native andLEONIDA_W64_EMULATE=1with0 badon all 3 views (rgba8 unorm,r32 uint,r32 sint,texel(5,3) = 71,rc=0).scripts/check_no_game_data.py: clean.Clean minimal fix matching the resident-TFE semantics measured on hardware.
GPUs tested: NVIDIA GeForce RTX 5070 Ti (driver 616.92, Windows 11)
AI-assisted: yes
@LewisStephens99 on GitHub · 2026-11-24 15:08 UTC · original
Independent verification on NVIDIA RTX A2000 12GB, Windows 11, NVIDIA 32.0.16.2114, Vulkan 1.4.363, LLVM-MC 21.1.8:
n-python -I scripts/run_gpu_tests.py --build runtime/build/vulkan-full --work --filter imgload: 4/4 passed (cs_imgload,cs_imgload_d16,cs_imgload_tfe,cs_imgload_d16_tfe), all spirv-val valid.n-tests/test_image_load_typed.py: 23/23 passed.nnNo game files or retail assets used. AI-assisted.@morodirule on GitHub · 2026-11-24 15:50 UTC · original
Independent Linux/RTX 4070 verification of the fixture-only fix (no game files): built cs_imgload_tfe + cs_imgload_d16_tfe from head
8afbba14bwith runtime/test/shaders/build.py (2 translated, 2 spirv-val clean) and ran vk_store_test load on NVIDIA GeForce RTX 4070, driver 620.70.06, Vulkan 1.4.357, Arch Linux. Both now report 0 bad in all three views with texel(5,3)=71 (expected 100-(8*3+5)); the old fixtures on this same card failed the r32 sint view with 64 bad / texel(5,3)=2071. This matches the PR premise: resident image_load tfe preserves the seeded status VGPRs (0x3e8/0x7d0) through the current translator. Not claiming; review evidence only.@thesubtleties on GitHub · 2026-11-24 16:17 UTC · original
Tested
8afbba14bmerged onto1504c1af6, Linux: RTX 3080 (620.73.04) 201/250 native and 233/250 withLEONIDA_W64_EMULATE=1; gfx1036 iGPU (RADV, Mesa 26.3.1) 234/250; 0 failed. Only the two tfe fixtures change frommain. Merged with #291 as well, both fail again (2111), so they are mutually exclusive. Compile-only evidence for preservation: RADV emitsv_lshrrev_b64 v[2:3], 0, 0beforeimage_load … tfe, with the old value as an operand, and LLVMllcfor gfx1036 zeroes both VGPRs first. This is indirect, and I did not measure the hardware. No game files. AI-assisted (Claude Code).@syntaxixr on GitHub · 2026-11-24 16:49 UTC · original · edited 2026-11-24 16:58 UTC
Tested
8afbba1on AMD Radeon RX 6600 (RDNA2, Navi 23 / GFX1032), AMD Windows driver 26.6.4 (32.0.21043.19003), Windows 10 19045, llvm-mc 23.1.6, SPIRV-Tools v2026.4, reusing a runtime build ofmain3ed8e50(this PR only touches the two fixtures):main3ed8e50run_gpu_tests.py --filter imgload, nativecs_imgload_tfe,cs_imgload_d16_tfeFAIL (64 bad, texel(5,3) = 2071)LEONIDA_W64_EMULATE=1So AMD's proprietary Windows compiler on native wave64 hardware also preserves the seeded status VGPR on resident reads. Full record in #1017. No game files. AI-assisted.
@aslan2142 on GitHub · 2026-11-24 17:14 UTC · original
Reviewed and merging. The fixtures were wrong, not the translator: a resident
image_load ... tfekeeps the seeded status VGPR.mainvs this PR:run_gpu_tests.py --filter cs_imgloadwent from 2/4 (both tfe fixtures at64 bad) to 4/4 (0 bad) on llvmpipe, RADV gfx1036 (Ryzen 9 7950X3D iGPU) and RADV RX 7900 XTX (Mesa 26.3.1, Linux).(v8 ^ 0x3e8) | (v12 ^ 0x7d0)is 0 only when both status VGPRs keep their own seeds, so writing any value to either one still fails.windowslink error (WaitOnAddress) that was onmainand is fixed by #877.linux-gpu-tools, which runs these fixtures, passed. The branch was updated withmainfor a fresh run.docs/design.mdrow for theimage_loadtfestatus, saying a resident load leaves it unchanged, would keep the zeroing change from coming back.AI-assisted (Claude Code, Claude Opus 5.5).
@GeorgiyDemo on GitHub · 2026-11-24 20:20 UTC · original
Tested
8afbba14bon Apple M5 Pro (16-core GPU), macOS 26.7.3 (25G342), binaries frommaind0da7dade:main, scripts atmain:cs_imgload_tfeandcs_imgload_d16_tfeFAIL withr32 sint (sint view): 64 bad, texel(5,3) = 2071; the other two pass (2/4).Conflict worth settling before merge: #291 (
rdna2spirv: zero the tfe/lwe status VGPR on image_load) makes the same two fixtures pass by having the translator write 0 into the status VGPR, while this PR changes the fixtures to expect the resident status to be left unchanged. I ran the two together — #291's translator with these two.asmfiles — and both fixtures FAIL (2/4) on MoltenVK, so the two PRs encode opposite expectations and only one can land as written. Either the fixtures accept both behaviours or one of the two approaches is dropped.AI-assisted; synthetic fixtures only, no game data.