[PR #1271] tests: dense image_load tfe fixture, resident status preserved (TFE-DENSE-FIXTURE, by tahffo68hk-hash) #1303

Open
opened 2026-11-26 20:20:47 +01:00 by 4ld0 · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/1271
Author: @Mouad-Scriptz-0
Created: 11/24/2026
Status: 🔄 Open

Base: main ← Head: tests/tfe-status-preserved


📝 Commits (1)

  • b425df8 Test dense image-load TFE with seeded status and out-of-bounds coordinates

📊 Changes

3 files changed (+56 additions, -0 deletions)

View changed files

📝 docs/design.md (+1 -0)
📝 runtime/test/shaders/check.py (+7 -0)
➕ runtime/test/shaders/cs_image_tfe_dense.asm (+48 -0)

📄 Description

Claimed in the coordination issue as: TFE-DENSE-FIXTURE (#14)

Depends on: none

What and why

This opens @tahffo68hk-hash's fixture patch here, as they asked on #98. The commit is theirs: author and author date are kept from their patch (git am); I'm only the committer.

The evidence for the fix is on #98: on native gfx1036, a resident image_load ... tfe keeps the seeded status VGPR (48 raw-ISA kernels, 192 lanes, three seeds), and LLVM and Mesa ACO initialize that register themselves before the instruction. main's translator already keeps it. #892 has since corrected the two older fixtures (cs_imgload_tfe, cs_imgload_d16_tfe) to expect that.

This PR adds what #892 didn't cover: an independent dense check, runtime/test/shaders/cs_image_tfe_dense.asm. In one row of a resident 8×8 R32_UINT image, it reads x = −1, 0, 1, 2, 8, 9, 10, 11 (in bounds and out of bounds on both sides) with image_load … tfe and image_load … tfe d16, then stores:

  • the full-width data;
  • the status, seeded 0x5a5a03f5, which must be kept;
  • the D16 data, whose seeded 0x5a5a high half must be kept and whose out-of-bounds texels must be zero;
  • the D16 status, seeded 0x5a5a03f6, which must be kept.

It is judged through the existing vk_store_test words path: the expected words are in check.py's STORE_WORDS, which run_gpu_tests.py picks up by itself. docs/design.md gets a "Dense image_load tfe" contract row with the gfx1036, LLVM and ACO references.

Not included: tahffo's second patch, which rewrote the two older fixtures, because #892 already did that on main with its own seeds. The first patch needed one context fix to apply: main has since edited the "Typed image stores" row next to the new row, so I kept main's version of that row and added the new row unchanged.

Tested

Intel Meteor Lake graphics (ANV, Mesa 26.2.7, Fedora 45), test programs rebuilt from main 0b45fdc21:

run cs_image_tfe_dense cs_imgload_tfe cs_imgload_d16_tfe
this branch, native PASS (all 64 words exact) PASS PASS
this branch, LEONIDA_W64_EMULATE=1 PASS PASS PASS
negative control: this branch + #98's translator (status zeroed) FAIL: 16 of 64 sint words differ, word 8 got 0x00000000, expected 0x5a5a03f5 FAIL FAIL

The negative control shows the new fixture catches a translator that clears the status. It's the same 16-of-64 failure tahffo saw on an RTX 5060 Ti. All 3 modules translated and passed spirv-val.

Also OK: tests/test_shader_checks.py, tests/test_run_gpu_tests.py, tests/test_docs_links.py, tests/test_text_write_line_endings.py, tests/test_ci_registration.py, python -m compileall, and scripts/check_no_game_data.py on the three changed files.

GPUs tested: Intel Graphics (Meteor Lake-P, 8086:7d45), ANV Mesa 26.2.7, Fedora Linux 45; tahffo68hk-hash's runs are on #98 (RTX 5060 Ti 617.42, native gfx1036).

AI-assisted: yes

Checklist

  • Based on current main and merges cleanly (a conflicting pull request is labeled needs rebase).
  • One topic; follow-up work goes in a new pull request.
  • No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here.
  • A new translator rule is in the contract table of docs/design.md, with how it was confirmed. (no translator change; the new row records the measured behaviour the translator already has)

🔄 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/1271 **Author:** [@Mouad-Scriptz-0](https://github.com/Mouad-Scriptz-0) **Created:** 11/24/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `tests/tfe-status-preserved` --- ### 📝 Commits (1) - [`b425df8`](https://github.com/ubiquitarianism/leonida/commit/b425df836d0de0c83db4d3188b54555911ebb0a9) Test dense image-load TFE with seeded status and out-of-bounds coordinates ### 📊 Changes **3 files changed** (+56 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `docs/design.md` (+1 -0) 📝 `runtime/test/shaders/check.py` (+7 -0) ➕ `runtime/test/shaders/cs_image_tfe_dense.asm` (+48 -0) </details> ### 📄 Description Claimed in the coordination issue as: TFE-DENSE-FIXTURE (#14) Depends on: none ### What and why This opens @tahffo68hk-hash's fixture patch here, as they asked on #98. **The commit is theirs**: author and author date are kept from their patch (`git am`); I'm only the committer. The evidence for the fix is on #98: on native gfx1036, a resident `image_load ... tfe` keeps the seeded status VGPR (48 raw-ISA kernels, 192 lanes, three seeds), and LLVM and Mesa ACO initialize that register themselves before the instruction. `main`'s translator already keeps it. #892 has since corrected the two older fixtures (`cs_imgload_tfe`, `cs_imgload_d16_tfe`) to expect that. This PR adds what #892 didn't cover: an independent **dense** check, `runtime/test/shaders/cs_image_tfe_dense.asm`. In one row of a resident 8×8 R32_UINT image, it reads x = −1, 0, 1, 2, 8, 9, 10, 11 (in bounds and out of bounds on both sides) with `image_load … tfe` and `image_load … tfe d16`, then stores: - the full-width data; - the status, seeded `0x5a5a03f5`, which must be kept; - the D16 data, whose seeded `0x5a5a` high half must be kept and whose out-of-bounds texels must be zero; - the D16 status, seeded `0x5a5a03f6`, which must be kept. It is judged through the existing `vk_store_test words` path: the expected words are in `check.py`'s `STORE_WORDS`, which `run_gpu_tests.py` picks up by itself. `docs/design.md` gets a "Dense `image_load tfe`" contract row with the gfx1036, LLVM and ACO references. **Not included:** tahffo's second patch, which rewrote the two older fixtures, because #892 already did that on `main` with its own seeds. The first patch needed one context fix to apply: `main` has since edited the "Typed image stores" row next to the new row, so I kept `main`'s version of that row and added the new row unchanged. ### Tested Intel Meteor Lake graphics (ANV, Mesa 26.2.7, Fedora 45), test programs rebuilt from `main` `0b45fdc21`: | run | `cs_image_tfe_dense` | `cs_imgload_tfe` | `cs_imgload_d16_tfe` | |---|---|---|---| | this branch, native | PASS (all 64 words exact) | PASS | PASS | | this branch, `LEONIDA_W64_EMULATE=1` | PASS | PASS | PASS | | **negative control:** this branch + #98's translator (status zeroed) | **FAIL**: 16 of 64 sint words differ, word 8 got `0x00000000`, expected `0x5a5a03f5` | FAIL | FAIL | The negative control shows the new fixture catches a translator that clears the status. It's the same 16-of-64 failure tahffo saw on an RTX 5060 Ti. All 3 modules translated and passed `spirv-val`. Also OK: `tests/test_shader_checks.py`, `tests/test_run_gpu_tests.py`, `tests/test_docs_links.py`, `tests/test_text_write_line_endings.py`, `tests/test_ci_registration.py`, `python -m compileall`, and `scripts/check_no_game_data.py` on the three changed files. GPUs tested: Intel Graphics (Meteor Lake-P, 8086:7d45), ANV Mesa 26.2.7, Fedora Linux 45; tahffo68hk-hash's runs are on #98 (RTX 5060 Ti 617.42, native gfx1036). AI-assisted: yes ### Checklist - [x] Based on current `main` and merges cleanly (a conflicting pull request is labeled `needs rebase`). - [x] One topic; follow-up work goes in a new pull request. - [x] No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here. - [x] A new translator rule is in the contract table of `docs/design.md`, with how it was confirmed. (no translator change; the new row records the measured behaviour the translator already has) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
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#1303
No description provided.