Native shader page table drops fully backed pages mapped in fragments #660

Open
opened 2026-11-29 22:32:18 +00:00 by github-bot · 2 comments
Owner

@⁠fruvs on GitHub · 2026-11-29 22:30 UTC · original

A translated shader can read zero from a fully backed 64 KiB page if the title supplies it as four adjacent 16 KiB mappings. The native page-table builder rounds the start and end of each mapping independently, so none of those fragments contributes a table entry.

A synthetic Metal dispatch reproduces the bad read without any game files. The source and destination live in the same test pool. After splitting the source mapping into four adjacent fragments, the first result is zero instead of 48,880.

The proposed fix lets adjacent virtual mappings supply one page when they refer to contiguous bytes of the same backing pool. It leaves a null page for holes, pool changes and noncontiguous backing offsets. The regression also removes one fragment after a successful dispatch and checks the next dispatch observes the hole.

**@⁠fruvs** on GitHub · 2026-11-29 22:30 UTC · [original](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/656) A translated shader can read zero from a fully backed 64 KiB page if the title supplies it as four adjacent 16 KiB mappings. The native page-table builder rounds the start and end of each mapping independently, so none of those fragments contributes a table entry. A synthetic Metal dispatch reproduces the bad read without any game files. The source and destination live in the same test pool. After splitting the source mapping into four adjacent fragments, the first result is zero instead of 48,880. The proposed fix lets adjacent virtual mappings supply one page when they refer to contiguous bytes of the same backing pool. It leaves a null page for holes, pool changes and noncontiguous backing offsets. The regression also removes one fragment after a successful dispatch and checks the next dispatch observes the hole.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-29 22:32:18 +00:00
Author
Owner

@⁠fruvs on GitHub · 2026-11-29 22:30 UTC · original

/claim

**@⁠fruvs** on GitHub · 2026-11-29 22:30 UTC · [original](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/656#issuecomment-7263726885) /claim
Author
Owner

@⁠github-actions[bot] on GitHub · 2026-11-29 22:30 UTC · original

Claimed by @⁠fruvs. Open a draft pull request with Refs #656 in its description within 24 hours, or the claim expires.

**@⁠github-actions[bot]** on GitHub · 2026-11-29 22:30 UTC · [original](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/656#issuecomment-7263728991) Claimed by @⁠fruvs. Open a draft pull request with `Refs #656` in its description within 24 hours, or the claim expires.
This discussion has been locked. Commenting is limited to contributors.
No description provided.