gpu(native): bind 2D stencil SRVs to the Metal stencil aspect #665

Open
github-bot wants to merge 1 commit from github-bot/gh-661 into main AGit
Owner

@⁠fruvs on GitHub · 2026-11-30 02:21 UTC · original
fruvs:codex/stencil-srv-aspect → main · +176 −4 · 6 files · 1 commits · draft

Refs #664

This binds 2D read-only stencil SRVs to an X32_Stencil8 view of the existing Metal depth-stencil allocation. The view routes Metal's stencil component from red to green for the translated shader. It shares the parent's storage and follows the current backing texture. Depth-plane views and writable views keep their existing paths.

Verification

  • The ARM64 Metal regression writes two different stencil patterns and checks that a shader gathers the exact bytes through the same view.
  • Descriptor recognition and six native host tests passed locally. The Windows all-target workspace Clippy check and asset-policy check passed.
  • I replayed a live Series S upscaler dispatch on an M5 Pro with the original inputs. The corrected binding reduced packed-radiance differences against an independently translated replay from 196,341 to 8,157 of 409,440 texels and eliminated all 23,182 differences in the secondary output. This checks the affected pass. The overall lighting is still under investigation.
  • The wider ARM64 GPU unit suite passed 449 tests and failed one existing command-table function-pointer assertion. I reproduced that assertion on the unmodified upstream base.

The contribution contains only implementation, documentation and synthetic tests.

**@⁠fruvs** on GitHub · 2026-11-30 02:21 UTC · [original](https://github.com/LakshanSivakumar/Native-Victory-macOS/pull/661) `fruvs:codex/stencil-srv-aspect` → `main` · +176 −4 · 6 files · 1 commits · draft Refs #664 This binds 2D read-only stencil SRVs to an X32_Stencil8 view of the existing Metal depth-stencil allocation. The view routes Metal's stencil component from red to green for the translated shader. It shares the parent's storage and follows the current backing texture. Depth-plane views and writable views keep their existing paths. ### Verification - The ARM64 Metal regression writes two different stencil patterns and checks that a shader gathers the exact bytes through the same view. - Descriptor recognition and six native host tests passed locally. The Windows all-target workspace Clippy check and asset-policy check passed. - I replayed a live Series S upscaler dispatch on an M5 Pro with the original inputs. The corrected binding reduced packed-radiance differences against an independently translated replay from 196,341 to 8,157 of 409,440 texels and eliminated all 23,182 differences in the secondary output. This checks the affected pass. The overall lighting is still under investigation. - The wider ARM64 GPU unit suite passed 449 tests and failed one existing command-table function-pointer assertion. I reproduced that assertion on the unmodified upstream base. The contribution contains only implementation, documentation and synthetic tests.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-30 02:25:25 +00:00
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/665/head:github-bot/gh-661'
git switch 'github-bot/gh-661'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-661'
git switch 'github-bot/gh-661'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-661'
git switch 'github-bot/gh-661'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-661'
git switch 'main'
git merge --squash 'github-bot/gh-661'
git switch 'main'
git merge --ff-only 'github-bot/gh-661'
git switch 'main'
git merge 'github-bot/gh-661'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.