[PR #1652] OLD-10044: rdna2spirv: intra-block %vgpr/%sgpr value forwarding #1667

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

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/1652
Author: @Tortoche
Created: 11/25/2026
Status: 🔄 Open

Base: main ← Head: old-10044


📝 Commits (6)

  • 730789d rdna2spirv: intra-block %vgpr/%sgpr value forwarding
  • 9d7f329 tests/test_cube_sample: accept active-lane guarded OpSelect in sample_coords()
  • 390d4f1 tests/test_image_load_typed: trace forwarded %vgpr writes in test_a16_offset_gathers_preserve_offset_and_unpack_uv_lod
  • 80fd538 tests: follow forwarded %vgpr stores in sample_c/sample_cl and harden forwarding tests
  • f881b82 tests: match any OpBitcast of matching scale constant when #4473 + #4518 forward constants
  • 1e85535 tests/semantic: follow forwarded %vgpr OpStore in test_image_sample_bias_nonps

📊 Changes

12 files changed (+461 additions, -60 deletions)

View changed files

📝 tests/semantic/test_buffer_oob_select.py (+1 -1)
📝 tests/semantic/test_buffer_swizzle.py (+1 -1)
📝 tests/semantic/test_image_sample_bias_nonps.py (+17 -7)
➕ tests/semantic/test_reg_load_forwarding.py (+294 -0)
📝 tests/semantic/test_sample_c.py (+19 -8)
📝 tests/semantic/test_sample_cl.py (+17 -7)
📝 tests/test_cube_sample.py (+2 -0)
📝 tests/test_f64_transcendentals.py (+8 -5)
📝 tests/test_image_load_typed.py (+18 -6)
📝 tests/test_rcp_iflag_mods.py (+10 -4)
📝 tests/test_translate.py (+30 -13)
📝 tools/rdna2spirv.py (+44 -8)

📄 Description

Claim: #1568 (OLD-10044 / Draft #309)

Summary:

  • Implements intra-block %vgpr/%sgpr value forwarding in tools/rdna2spirv.py.
  • Updates semantic and unit test assertions to trace forwarded %vgpr writes and active-lane guarded OpSelect (tests/semantic/test_*, tests/test_*).

Verification (Linux):

  • python3 -I scripts/check_no_game_data.py on all modified files -> OK
  • python3 -m compileall -q make_game.py tools tests -> OK
  • PYTHONPATH=tests/semantic python3 -m pytest tests/test_cube_sample.py -> 18 passed in 1.28s
  • python3 -m unittest on the 10 remaining modified test files (test_buffer_oob_select, test_buffer_swizzle, test_image_sample_bias_nonps, test_reg_load_forwarding, test_sample_c, test_sample_cl, test_f64_transcendentals, test_image_load_typed, test_rcp_iflag_mods, test_translate) -> 112 passed, 1 skipped, 0 failed

AI-assisted: yes


🔄 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/1652 **Author:** [@Tortoche](https://github.com/Tortoche) **Created:** 11/25/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `old-10044` --- ### 📝 Commits (6) - [`730789d`](https://github.com/ubiquitarianism/leonida/commit/730789d384d2ab3375a97511211f4dfe3ecb4a48) rdna2spirv: intra-block %vgpr/%sgpr value forwarding - [`9d7f329`](https://github.com/ubiquitarianism/leonida/commit/9d7f32945fb60e29929a07b646b528a0c1d1405c) tests/test_cube_sample: accept active-lane guarded OpSelect in sample_coords() - [`390d4f1`](https://github.com/ubiquitarianism/leonida/commit/390d4f1661c0348c8d446939e6fa14624585eaec) tests/test_image_load_typed: trace forwarded %vgpr writes in test_a16_offset_gathers_preserve_offset_and_unpack_uv_lod - [`80fd538`](https://github.com/ubiquitarianism/leonida/commit/80fd53899969563ede7e3a9bd6349cb6746974e3) tests: follow forwarded %vgpr stores in sample_c/sample_cl and harden forwarding tests - [`f881b82`](https://github.com/ubiquitarianism/leonida/commit/f881b82211ce82331baf5b4d17aa3ab0bb622870) tests: match any OpBitcast of matching scale constant when #4473 + #4518 forward constants - [`1e85535`](https://github.com/ubiquitarianism/leonida/commit/1e855350bb7d3c13f2c353ce448138a792183280) tests/semantic: follow forwarded %vgpr OpStore in test_image_sample_bias_nonps ### 📊 Changes **12 files changed** (+461 additions, -60 deletions) <details> <summary>View changed files</summary> 📝 `tests/semantic/test_buffer_oob_select.py` (+1 -1) 📝 `tests/semantic/test_buffer_swizzle.py` (+1 -1) 📝 `tests/semantic/test_image_sample_bias_nonps.py` (+17 -7) ➕ `tests/semantic/test_reg_load_forwarding.py` (+294 -0) 📝 `tests/semantic/test_sample_c.py` (+19 -8) 📝 `tests/semantic/test_sample_cl.py` (+17 -7) 📝 `tests/test_cube_sample.py` (+2 -0) 📝 `tests/test_f64_transcendentals.py` (+8 -5) 📝 `tests/test_image_load_typed.py` (+18 -6) 📝 `tests/test_rcp_iflag_mods.py` (+10 -4) 📝 `tests/test_translate.py` (+30 -13) 📝 `tools/rdna2spirv.py` (+44 -8) </details> ### 📄 Description Claim: #1568 (OLD-10044 / Draft #309) Summary: - Implements intra-block `%vgpr`/`%sgpr` value forwarding in `tools/rdna2spirv.py`. - Updates semantic and unit test assertions to trace forwarded `%vgpr` writes and active-lane guarded `OpSelect` (`tests/semantic/test_*`, `tests/test_*`). Verification (Linux): - `python3 -I scripts/check_no_game_data.py` on all modified files -> OK - `python3 -m compileall -q make_game.py tools tests` -> OK - `PYTHONPATH=tests/semantic python3 -m pytest tests/test_cube_sample.py` -> 18 passed in 1.28s - `python3 -m unittest` on the 10 remaining modified test files (`test_buffer_oob_select`, `test_buffer_swizzle`, `test_image_sample_bias_nonps`, `test_reg_load_forwarding`, `test_sample_c`, `test_sample_cl`, `test_f64_transcendentals`, `test_image_load_typed`, `test_rcp_iflag_mods`, `test_translate`) -> 112 passed, 1 skipped, 0 failed AI-assisted: yes --- <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#1667
No description provided.