GPU: keep streamed textures with mapped mip data in the middle #1023

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

@⁠Lkxex on GitHub · 2026-11-25 16:31 UTC · original
Lkxex:fix/texture-mapped-interior → main · +37 −14 · 1 files · 1 commits · open

The indexed texture pass treats mapped_bytes == 0 as a streamed-out resource and drops its host slot. The previous endpoint check returned zero whenever the first and last pages were unavailable, even if pages in the middle of the texture were already readable.

Keep the console-page sampling path when either endpoint is available. When neither endpoint is available, walk virtual memory regions so a fully absent reservation still reads as zero and committed mip data inside it is counted. Exclude no-access and guard regions from the readable-byte total.

The new Windows regression reserves 256 KiB, commits a middle 64 KiB region, and verifies that the staging reader sees its bytes with zeros in the holes. On the original implementation mapped_bytes returned 0. The fixed code returns 65,536, including with VICTORY_COMMITTED_QUERY=1 and a neighboring no-access region. All three title-memory tests passed in both query configurations. The test uses synthetic memory and no title files. Game capture and frame cost of the sparse fallback are unmeasured.

AI-assisted.

**@⁠Lkxex** on GitHub · 2026-11-25 16:31 UTC · [original](https://github.com/fxceless/victory-fork/pull/1023) `Lkxex:fix/texture-mapped-interior` → `main` · +37 −14 · 1 files · 1 commits · open The indexed texture pass treats mapped_bytes == 0 as a streamed-out resource and drops its host slot. The previous endpoint check returned zero whenever the first and last pages were unavailable, even if pages in the middle of the texture were already readable. Keep the console-page sampling path when either endpoint is available. When neither endpoint is available, walk virtual memory regions so a fully absent reservation still reads as zero and committed mip data inside it is counted. Exclude no-access and guard regions from the readable-byte total. The new Windows regression reserves 256 KiB, commits a middle 64 KiB region, and verifies that the staging reader sees its bytes with zeros in the holes. On the original implementation mapped_bytes returned 0. The fixed code returns 65,536, including with VICTORY_COMMITTED_QUERY=1 and a neighboring no-access region. All three title-memory tests passed in both query configurations. The test uses synthetic memory and no title files. Game capture and frame cost of the sparse fallback are unmeasured. AI-assisted.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 03:56:09 +00:00
This pull request can be merged automatically.
This branch is out-of-date with the base branch
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/1023/head:github-bot/gh-1023'
git switch 'github-bot/gh-1023'

Merge

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