Trace descriptor heap addresses through masks that preserve the carry #216

Manually merged
github merged 2 commits from gh-pr/216/head into gh-pr/216/base 2026-11-27 02:14:00 +00:00
Owner

@⁠Sheffy007 on GitHub · 2026-11-27 01:36 UTC · original
Sheffy007:fix/world-followup → main · +59 −1 · 3 files · 2 commits · merged 2026-11-27 02:01 UTC

Addresses one shader refusal tracked in #182. After adding a byte offset to a descriptor heap base, a shader can mask the resulting carry to eight bits. The tracer previously refused the descriptor load because it lost track of the high word. It now looks through a scalar AND if the existing bit analysis proves that the mask preserves every possible input bit. The underlying address still goes through the usual checks.

The synthetic regression reproduced “an address into a descriptor heap with an untracked high half” on upstream. It checks the resulting table offset and covers a mask that discards the carry and an unknown high word. A separate Metal pixel shader test reads the green texture in slot 1 of a heap with red in slot 0, and verifies all 64 output pixels.

Local validation passed for victory-shader, victory-gpu, victory-hle, victory and xtask, Windows-target Clippy, the asset policy and the x86-64 macOS release build. The effect on title shader refusal counts and world lighting has not been measured. #182 remains open.

**@⁠Sheffy007** on GitHub · 2026-11-27 01:36 UTC · [original](https://github.com/LakshanSivakumar/Native-Victory-macOS/pull/216) `Sheffy007:fix/world-followup` → `main` · +59 −1 · 3 files · 2 commits · merged 2026-11-27 02:01 UTC Addresses one shader refusal tracked in #182. After adding a byte offset to a descriptor heap base, a shader can mask the resulting carry to eight bits. The tracer previously refused the descriptor load because it lost track of the high word. It now looks through a scalar AND if the existing bit analysis proves that the mask preserves every possible input bit. The underlying address still goes through the usual checks. The synthetic regression reproduced “an address into a descriptor heap with an untracked high half” on upstream. It checks the resulting table offset and covers a mask that discards the carry and an unknown high word. A separate Metal pixel shader test reads the green texture in slot 1 of a heap with red in slot 0, and verifies all 64 output pixels. Local validation passed for victory-shader, victory-gpu, victory-hle, victory and xtask, Windows-target Clippy, the asset policy and the x86-64 macOS release build. The effect on title shader refusal counts and world lighting has not been measured. #182 remains open.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 02:13:58 +00:00
github manually merged commit 6283379f50 into gh-pr/216/base 2026-11-27 02:14:00 +00:00
Author
Owner

@⁠LakshanSivakumar on GitHub · 2026-11-27 02:01 UTC · original · approved these changes

Reviewed and tested together with the other open PRs on main (macOS x86_64 workspace tests, the setup shell tests, and Windows clippy). Thanks!

**@⁠LakshanSivakumar** on GitHub · 2026-11-27 02:01 UTC · [original](https://github.com/LakshanSivakumar/Native-Victory-macOS/pull/216#pullrequestreview-6082536397) · **approved these changes** Reviewed and tested together with the other open PRs on main (macOS x86_64 workspace tests, the setup shell tests, and Windows clippy). Thanks!
This discussion has been locked. Commenting is limited to contributors.
No description provided.