Native Metal 2D stencil SRVs bind the depth aspect #660
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by fruvs on 2026-11-30T02:20:49Z.
What went wrong
The native Metal backend binds the depth aspect when a 2D shader resource view requests the stencil aspect of a D32FloatS8 texture. A shader gathering the logical green component therefore cannot read the stored stencil bytes.
Steps to reproduce
Create a combined depth-stencil texture, seed distinct stencil values, and sample its stencil SRV with a green-component gather. Repeat with a second stencil pattern on the same texture. The synthetic regression checks both patterns against the original integer values.
The proposed fix binds an X32_Stencil8 view of the current backing texture and routes Metal's red stencil component to green. The view shares storage with the parent and tracks later stencil writes.
Mac, macOS version and commit
M5 Pro, macOS 27.2.1 (26B8132), upstream base
268172850870.Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by fruvs on 2026-11-30T02:21:12Z.
/claim
Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by github-actions[bot] on 2026-11-30T02:21:22Z.
Claimed by @fruvs. Open a draft pull request with
Refs #660in its description within 24 hours, or the claim expires.