gpu(native): preserve supported dynamic sampler border colors #177

Manually merged
github merged 1 commit from gh-pr/177/head into gh-pr/177/base 2026-11-27 00:53:14 +00:00
Owner

@⁠evan-kolberg on GitHub · 2026-11-26 23:13 UTC · original
evan-kolberg:fix/native-dynamic-sampler-border → main · +216 −15 · 6 files · 1 commits · merged 2026-11-26 23:58 UTC

Native CreateSamplerX now preserves border addressing for Metal’s transparent black, opaque black, and opaque white. Custom border colors retain the existing edge-clamp fallback. This follows the static-sampler mapping from sys-skye’s #91 at 517d52d3.

On an Apple M4 Pro with Metal API Validation, a standalone generated green 2×2 texture matched all 20 RGBA8 samples. Outside U, dynamic border samplers returned (255,255,255,255), (0,0,0,255), and (0,0,0,0) for white, opaque black, and transparent black. In-bounds and edge-clamp samples stayed green and matched an independently constructed legacy edge clamp. Four dynamic cache keys produced distinct Metal sampler IDs, and repeat lookups reused them.

Ten CPU sampler and descriptor controls and five existing RTV tests passed. The asset policy and a Windows-target compile with portable BLAKE3 also passed. The GPU result covers the standalone generated Metal draw. I used Codex to implement and verify these changes.

**@⁠evan-kolberg** on GitHub · 2026-11-26 23:13 UTC · [original](https://github.com/LakshanSivakumar/Native-Victory-macOS/pull/177) `evan-kolberg:fix/native-dynamic-sampler-border` → `main` · +216 −15 · 6 files · 1 commits · merged 2026-11-26 23:58 UTC Native `CreateSamplerX` now preserves border addressing for Metal’s transparent black, opaque black, and opaque white. Custom border colors retain the existing edge-clamp fallback. This follows the static-sampler mapping from [sys-skye’s #91](https://git.gtahub.st/github/LakshanSivakumar--Native-Victory-macOS/pulls/91) at [`517d52d3`](https://github.com/LakshanSivakumar/Native-Victory-macOS/commit/517d52d308870860213b730abcc9f4f36d8c49df). On an Apple M4 Pro with Metal API Validation, a standalone generated green 2×2 texture matched all 20 RGBA8 samples. Outside U, dynamic border samplers returned `(255,255,255,255)`, `(0,0,0,255)`, and `(0,0,0,0)` for white, opaque black, and transparent black. In-bounds and edge-clamp samples stayed green and matched an independently constructed legacy edge clamp. Four dynamic cache keys produced distinct Metal sampler IDs, and repeat lookups reused them. Ten CPU sampler and descriptor controls and five existing RTV tests passed. The asset policy and a Windows-target compile with portable BLAKE3 also passed. The GPU result covers the standalone generated Metal draw. I used Codex to implement and verify these changes.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 00:53:12 +00:00
github manually merged commit 6270126c84 into gh-pr/177/base 2026-11-27 00:53:14 +00:00
Author
Owner

@⁠LakshanSivakumar on GitHub · 2026-11-26 23:58 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-26 23:58 UTC · [original](https://github.com/LakshanSivakumar/Native-Victory-macOS/pull/177#pullrequestreview-6081771690) · **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.