GPU: batch sparse texture working-set queries and retain per-page fallback #2870

Manually merged
github merged 2 commits from github-bot/gh-2870 into gh-pr/2870/base 2026-11-30 14:16:28 +00:00 AGit
Owner

@⁠ghptc on GitHub · 2026-11-29 18:24 UTC · original
ghptc:perf/sparse-texture-probe-20261129 → main · +129 −29 · 1 files · 2 commits · merged 2026-11-30 14:12 UTC

Port the 64 KiB sparse texture residency batching by Matheus from fxceless/victory-fork#177. The first commit retains the original author and sparse-range regression. A second commit shares page validation with the contiguous reader and retries individual page queries on a failed batch, preserving the resident-or-readable decision for each block. A failed batch cannot publish partially filled flags.

The Win64 control used real allocations, decommits and a private Proton Experimental prefix. It compared sparse and dense regions, unaligned ends, a range of 513 blocks and an injected failed batch. All byte counts agreed. In 100 scans of 64 resident blocks, working-set queries fell from 6,400 to 100 and median total time fell from 2.326 to 0.738 ms. For sparse blocks the same 4,800 fallback reads were needed, with 5.655 to 4.467 ms. A single block took 35 µs per 100 scans in both arms. These are CPU measurements of this branch of texture polling.

A separate ABBA Win64 workload sampled 24 sparse/dense procedural textures while software-rendering a perspective terrain. Resident byte counts selected the texture and mip. Four arms produced identical RGB for 160 camera states (93 distinct images). During motion, workload P50/P95 fell from 1.088/1.374 ms to 0.765/1.051 ms. Across both runs per variant the working-set call count fell from 366,516 to 10,496 with the same 107,472 fallback reads.

**@⁠ghptc** on GitHub · 2026-11-29 18:24 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/2870) `ghptc:perf/sparse-texture-probe-20261129` → `main` · +129 −29 · 1 files · 2 commits · merged 2026-11-30 14:12 UTC Port the 64 KiB sparse texture residency batching by Matheus from [fxceless/victory-fork#177](https://github.com/fxceless/victory-fork/pull/177). The first commit retains the original author and sparse-range regression. A second commit shares page validation with the contiguous reader and retries individual page queries on a failed batch, preserving the resident-or-readable decision for each block. A failed batch cannot publish partially filled flags. The Win64 control used real allocations, decommits and a private Proton Experimental prefix. It compared sparse and dense regions, unaligned ends, a range of 513 blocks and an injected failed batch. All byte counts agreed. In 100 scans of 64 resident blocks, working-set queries fell from 6,400 to 100 and median total time fell from 2.326 to 0.738 ms. For sparse blocks the same 4,800 fallback reads were needed, with 5.655 to 4.467 ms. A single block took 35 µs per 100 scans in both arms. These are CPU measurements of this branch of texture polling. A separate ABBA Win64 workload sampled 24 sparse/dense procedural textures while software-rendering a perspective terrain. Resident byte counts selected the texture and mip. Four arms produced identical RGB for 160 camera states (93 distinct images). During motion, workload P50/P95 fell from 1.088/1.374 ms to 0.765/1.051 ms. Across both runs per variant the working-set call count fell from 366,516 to 10,496 with the same 107,472 fallback reads.
Ported from fxceless/victory-fork#177, commit
5873ea7aac2c5df31db59645918753a2b499abc4. Omit its EOF-only hunk.

(cherry picked from commit 975e214c64b676ae675d75d50d83c8975ee0e6dd)
Share page validation with the contiguous path and exercise decommit, partial blocks and batch boundaries. Follow up the batched probe by Matheus. The integrated implementation was independently exercised with the Linux memory control (22043f5ef6a3bc724659793e134186e37dbbd083).

(cherry picked from commit 92e5f933117e34f1e017101b456a87881ec27ee3)
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-29 18:28:52 +00:00
github-bot changed target branch from main to gh-pr/2870/base 2026-11-30 14:15:41 +00:00
github manually merged commit 421804a434 into gh-pr/2870/base 2026-11-30 14:15:51 +00:00
This discussion has been locked. Commenting is limited to contributors.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github/trustno1-coder--VIctory-NVIDIA!2870
No description provided.