GPU: preserve the resource minimum LOD in streamed texture views #1210

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

@⁠BradRoland on GitHub · 2026-11-26 00:10 UTC · original
BradRoland:codex/resident-mip-clamp → main · +22 −23 · 1 files · 1 commits · open

When levels on demand hides an unbacked mip, show_from moves the start of the shader view and also lowers the title’s ResourceMinLODClamp. With mip 0 unbacked and a minimum of 3, the adjusted view consequently samples mip 2. The minimum is expressed in resource mip coordinates. This change preserves it for 2D and 2D-array views. D3D12 texture view documentation

Credit to teecil for identifying the coordinate issue in the pending resident-range change. I reproduced it independently on current main using the existing reserved-texture fixture, which exercises the path added in #747. Original report on #1031

The fixture fills each mip with a different byte and samples LOD 0 through both descriptors. Results matched on a GeForce RTX 4080 (621.14) and WARP, with the D3D12 debug layer enabled.

Resource minimum Original view Adjusted before Adjusted after
0 0 (unbacked) 32 (mip 1) 32 (mip 1)
3 64 (mip 3) 48 (mip 2) 64 (mip 3)

All three ordinary tile tests and 29 descriptor tests passed. The full opt-in tile test passed on each adapter. This was a synthetic run. In-game impact is unmeasured.

**@⁠BradRoland** on GitHub · 2026-11-26 00:10 UTC · [original](https://github.com/fxceless/victory-fork/pull/1210) `BradRoland:codex/resident-mip-clamp` → `main` · +22 −23 · 1 files · 1 commits · open When levels on demand hides an unbacked mip, `show_from` moves the start of the shader view and also lowers the title’s `ResourceMinLODClamp`. With mip 0 unbacked and a minimum of 3, the adjusted view consequently samples mip 2. The minimum is expressed in resource mip coordinates. This change preserves it for 2D and 2D-array views. [D3D12 texture view documentation](https://learn.microsoft.com/en-us/windows/win32/api/d3d12/ns-d3d12-d3d12_tex2d_srv) Credit to teecil for identifying the coordinate issue in the pending resident-range change. I reproduced it independently on current main using the existing reserved-texture fixture, which exercises the path added in #747. [Original report on #1031](https://git.gtahub.st/github/fxceless--victory-fork/pulls/1031) The fixture fills each mip with a different byte and samples LOD 0 through both descriptors. Results matched on a GeForce RTX 4080 (621.14) and WARP, with the D3D12 debug layer enabled. | Resource minimum | Original view | Adjusted before | Adjusted after | | --- | ---: | ---: | ---: | | 0 | 0 (unbacked) | 32 (mip 1) | 32 (mip 1) | | 3 | 64 (mip 3) | 48 (mip 2) | 64 (mip 3) | All three ordinary tile tests and 29 descriptor tests passed. The full opt-in tile test passed on each adapter. This was a synthetic run. In-game impact is unmeasured.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 03:59:35 +00:00
This pull request can be merged automatically.
This branch is out-of-date with the base branch
The changes on this branch are already on the target branch. This will be an empty commit.
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/1210/head:github-bot/gh-1210'
git switch 'github-bot/gh-1210'

Merge

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