shader: mark SLOT_MEMORY directory and records loads pure for CSE #166

Manually merged
github merged 1 commit from github-bot/gh-166 into gh-pr/166/base 2026-12-02 22:55:17 +00:00 AGit
Owner

@⁠eirik200 on GitHub · 2026-12-02 05:42 UTC · original
eirik200:pr/shader-pure-cse → main · +70 −3 · 5 files · 1 commits · merged 2026-12-02 22:54 UTC

Summary

Mark two immutable-during-dispatch runtime table loads pure in victory-shader so opt.rs can reuse them across stores and fault-note branches:

  1. SLOT_MEMORY page directory loads (lower.rs memory()): Shaders read the host's device-side directory copy, which is only updated by pre-submission CopyBufferRegion copies and never written by any shader. Previously, each memory() access emitted a fault-note store on a branch that broke memory_regions reuse for subsequent lookups of the same (lo, hi) address.
  2. Immutable records metadata loads (lower.rs raw_words()): Marks records table reads pure for CSE across stores.

Bumps TRANSLATOR_VERSION (12 -> 13) and RECORDS_REVISION (9 -> 10).

Testing

  • JOBS=6 ./build.sh check passes cleanly.
  • All 14 victory-shader optimizer unit tests pass, including new a_read_marked_pure_is_reused_past_a_store_on_a_branch.
  • Full 25,694-shader re-translation (./run.sh shaders) and 94,458/94,458 pipeline warm (./run.sh warm, 0 skipped/refused) verified in-game across 10-minute open-world run on RX 9060 XT (RADV, HW RT on).
**@⁠eirik200** on GitHub · 2026-12-02 05:42 UTC · [original](https://github.com/lobomfz/VIctory-xmem/pull/166) `eirik200:pr/shader-pure-cse` → `main` · +70 −3 · 5 files · 1 commits · merged 2026-12-02 22:54 UTC ## Summary Mark two immutable-during-dispatch runtime table loads pure in `victory-shader` so `opt.rs` can reuse them across stores and fault-note branches: 1. **`SLOT_MEMORY` page directory loads (`lower.rs` `memory()`):** Shaders read the host's device-side directory copy, which is only updated by pre-submission `CopyBufferRegion` copies and never written by any shader. Previously, each `memory()` access emitted a fault-note store on a branch that broke `memory_regions` reuse for subsequent lookups of the same `(lo, hi)` address. 2. **Immutable `records` metadata loads (`lower.rs` `raw_words()`):** Marks `records` table reads pure for CSE across stores. Bumps `TRANSLATOR_VERSION` (12 -> 13) and `RECORDS_REVISION` (9 -> 10). ## Testing - `JOBS=6 ./build.sh check` passes cleanly. - All 14 `victory-shader` optimizer unit tests pass, including new `a_read_marked_pure_is_reused_past_a_store_on_a_branch`. - Full 25,694-shader re-translation (`./run.sh shaders`) and 94,458/94,458 pipeline warm (`./run.sh warm`, 0 skipped/refused) verified in-game across 10-minute open-world run on RX 9060 XT (RADV, HW RT on).
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-02 05:45:38 +00:00
github-bot changed target branch from main to gh-pr/166/base 2026-12-02 22:55:16 +00:00
github manually merged commit 36df108059 into gh-pr/166/base 2026-12-02 22:55:17 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.