[PR #892] [MERGED] tests: correct resident TFE status expectations (SHADER-1266) #930

Closed
opened 2026-11-26 20:19:32 +01:00 by 4ld0 · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/892
Author: @moffington
Created: 11/24/2026
Status: ✅ Merged
Merged: 11/24/2026
Merged by: @aslan2142

Base: main ← Head: fix/shader-1266-tfe-fixtures


📝 Commits (2)

  • 8afbba1 tests: expect resident image_load tfe to preserve seeded status VGPRs (SHADER-1266)
  • b0224e4 Merge branch 'main' into fix/shader-1266-tfe-fixtures

📊 Changes

2 files changed (+21 additions, -14 deletions)

View changed files

📝 runtime/test/shaders/cs_imgload_d16_tfe.asm (+10 -6)
📝 runtime/test/shaders/cs_imgload_tfe.asm (+11 -8)

📄 Description

Fixes #31.
Claimed in the coordination issue as: SHADER-1266

Summary

  • Updates runtime/test/shaders/cs_imgload_tfe.asm and runtime/test/shaders/cs_imgload_d16_tfe.asm so resident image_load ... tfe checks preservation of each pre-seeded status VGPR rather than expecting 0.
  • Preserves tools/rdna2spirv.py untouched.
  • Seeds distinct values (v8 = 0x3e8, v12 = 0x7d0) before the two image_load ... tfe instructions and independently checks both via (v8 ^ 0x3e8) | (v12 ^ 0x7d0) added into v11, so zeroing or modifying either status VGPR shifts every texel.
  • Native RDNA2 hardware measurements on AMD GFX1036 reported in #98 (48 kernels, 192 lanes, 3 seeds, HIP 60450101, LLVM 23.1.6) showed that a resident image_load ... tfe leaves the status VGPR unchanged (preserving the pre-seeded value), consistent with LLVM SIISelLowering.cpp initializing the TFE/LWE status register prior to the instruction.
  • #291 takes the alternative approach of modifying tools/rdna2spirv.py to write 0 to vdata[data_vgprs] on resident image_load / image_load_mip (the same translator change previously closed in #98). This PR keeps main's current translator semantics intact and updates the two inherited fixtures instead.

Validation (Linux, NVIDIA GeForce RTX 3060, Driver 615.78.08, Vulkan 1.4.351)

  • Native (scripts/run_gpu_tests.py): 258/258 translated and spirv-val valid; 200/249 passed, 49 skipped, 0 failed (cs_imgload_tfe and cs_imgload_d16_tfe both pass with r32 sint (sint view): 0 bad, texel(5,3) = 71, 0 regressions vs. main).
  • Wave64-emulated (LEONIDA_W64_EMULATE=1): 258/258 translated and spirv-val valid; 232/249 passed, 17 skipped, 0 failed (0 regressions vs. main).
  • Negative control: Applying the status-zeroing translator diff to tools/rdna2spirv.py causes run_gpu_tests.py --filter tfe to fail both corrected fixtures (0/2 passed: cs_imgload_tfe and cs_imgload_d16_tfe both FAIL, 64 bad, texel(5,3) = 2111).
  • Hygiene: scripts/check_no_game_data.py passed on both modified .asm files.

Limitations

  • Covers resident image_load ... tfe (32-bit and d16 2D) only; sparse-page NACK (status != 0) and lwe behavior remain outside this measurement.

No game files and nothing online. AI-assisted.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ubiquitarianism/leonida/pull/892 **Author:** [@moffington](https://github.com/moffington) **Created:** 11/24/2026 **Status:** ✅ Merged **Merged:** 11/24/2026 **Merged by:** [@aslan2142](https://github.com/aslan2142) **Base:** `main` ← **Head:** `fix/shader-1266-tfe-fixtures` --- ### 📝 Commits (2) - [`8afbba1`](https://github.com/ubiquitarianism/leonida/commit/8afbba14b9e96c4809c6a2ee0b574be9f3d1003e) tests: expect resident image_load tfe to preserve seeded status VGPRs (SHADER-1266) - [`b0224e4`](https://github.com/ubiquitarianism/leonida/commit/b0224e44fcc5faf57cd8cae01a348057eedfada9) Merge branch 'main' into fix/shader-1266-tfe-fixtures ### 📊 Changes **2 files changed** (+21 additions, -14 deletions) <details> <summary>View changed files</summary> 📝 `runtime/test/shaders/cs_imgload_d16_tfe.asm` (+10 -6) 📝 `runtime/test/shaders/cs_imgload_tfe.asm` (+11 -8) </details> ### 📄 Description Fixes #31. Claimed in the coordination issue as: `SHADER-1266` ## Summary - Updates `runtime/test/shaders/cs_imgload_tfe.asm` and `runtime/test/shaders/cs_imgload_d16_tfe.asm` so resident `image_load ... tfe` checks **preservation** of each pre-seeded status VGPR rather than expecting `0`. - Preserves `tools/rdna2spirv.py` untouched. - Seeds distinct values (`v8 = 0x3e8`, `v12 = 0x7d0`) before the two `image_load ... tfe` instructions and independently checks both via `(v8 ^ 0x3e8) | (v12 ^ 0x7d0)` added into `v11`, so zeroing or modifying either status VGPR shifts every texel. ## Context & Related Work - Native RDNA2 hardware measurements on AMD GFX1036 reported in #98 (48 kernels, 192 lanes, 3 seeds, HIP `60450101`, LLVM `23.1.6`) showed that a resident `image_load ... tfe` leaves the status VGPR unchanged (preserving the pre-seeded value), consistent with LLVM `SIISelLowering.cpp` initializing the TFE/LWE status register prior to the instruction. - #291 takes the alternative approach of modifying `tools/rdna2spirv.py` to write `0` to `vdata[data_vgprs]` on resident `image_load` / `image_load_mip` (the same translator change previously closed in #98). This PR keeps `main`'s current translator semantics intact and updates the two inherited fixtures instead. ## Validation (Linux, NVIDIA GeForce RTX 3060, Driver `615.78.08`, Vulkan `1.4.351`) - **Native (`scripts/run_gpu_tests.py`):** `258/258` translated and `spirv-val` valid; **`200/249` passed, `49` skipped, `0` failed** (`cs_imgload_tfe` and `cs_imgload_d16_tfe` both pass with `r32 sint (sint view): 0 bad, texel(5,3) = 71`, `0` regressions vs. `main`). - **Wave64-emulated (`LEONIDA_W64_EMULATE=1`):** `258/258` translated and `spirv-val` valid; **`232/249` passed, `17` skipped, `0` failed** (`0` regressions vs. `main`). - **Negative control:** Applying the status-zeroing translator diff to `tools/rdna2spirv.py` causes `run_gpu_tests.py --filter tfe` to fail both corrected fixtures (`0/2` passed: `cs_imgload_tfe` and `cs_imgload_d16_tfe` both `FAIL`, `64 bad, texel(5,3) = 2111`). - **Hygiene:** `scripts/check_no_game_data.py` passed on both modified `.asm` files. ## Limitations - Covers resident `image_load ... tfe` (32-bit and `d16` 2D) only; sparse-page NACK (`status != 0`) and `lwe` behavior remain outside this measurement. No game files and nothing online. AI-assisted. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
4ld0 2026-11-26 20:19:32 +01:00
Sign in to join this conversation.
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
starred/leonida#930
No description provided.