GPU: preserve the shape of implicit depth-stencil views #2955

Open
github-bot wants to merge 2 commits from github-bot/gh-2955 into main AGit
Owner

@⁠ghptc on GitHub · 2026-11-29 19:00 UTC · original
ghptc:fix/preserve-default-depth-view-shape → main · +89 −4 · 4 files · 2 commits · open

What it changes

On promoted typeless depth textures, a null DSV description needs an explicit typed format in the host view. The synthesized description always chose TEXTURE2D. That lost array layers, the 1D dimension, and multisample view dimensions.

Reconstruct the implicit view from the resolved host texture's description. Use mip zero and every array slice for default array views. Explicit mip, slice and flags follow the existing path. Resolve the format and shape against the same host texture supplied to the bind or clear call.

ESAT586's Marvisak/VIctory#1406 covers the same default DSV dimension, layers and MSAA correction in the sibling repository, alongside RTV/SRV/UAV cases. This patch addresses the DSV path in VIctory-NVIDIA. #2535 addresses depth-test defaults in PSO stream creation. #2770 addresses depth twin invalidation.

Validation

The renderer team's synthetic CPU control found 5 mismatches among 6 implicit descriptor cases on the baseline and 0 on the candidate. Explicit mip, slice and flags matched in both arms. The baseline's invalid descriptor plan was rejected on the CPU before it reached the driver.

Independent QA on an RTX 5070 checked the candidate offscreen with a single 2D texture and a three-layer 2D array, at 1x and 4x MSAA. The readback verifier matched all 442,368 bytes, including 36,864 directly read D32 samples at 1x and 73,728 RGBA pixels across 1x/4x. Resolved color verifies the 4x occlusion results. The 1D shapes were covered by the CPU control. Candidate draw median and P95 were 12.272 µs and 17.408 µs. These are fixture timings. In-game artifact attribution and a before/after GPU speedup were outside the experiment.

Based on f889bb076fa884fff8d2b6f0b50ac86f72abfd98. Original commits f2f2c3215e9ed8d42fa1275334f1cd697b4347b6 and 5f3ecbf78f5b5e79ea07aba8ced3ac6d67b446a4, cherry-picked with original authorship.

**@⁠ghptc** on GitHub · 2026-11-29 19:00 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/2955) `ghptc:fix/preserve-default-depth-view-shape` → `main` · +89 −4 · 4 files · 2 commits · open ## What it changes On promoted typeless depth textures, a null DSV description needs an explicit typed format in the host view. The synthesized description always chose TEXTURE2D. That lost array layers, the 1D dimension, and multisample view dimensions. Reconstruct the implicit view from the resolved host texture's description. Use mip zero and every array slice for default array views. Explicit mip, slice and flags follow the existing path. Resolve the format and shape against the same host texture supplied to the bind or clear call. ESAT586's [Marvisak/VIctory#1406](https://github.com/Marvisak/VIctory/pull/1406) covers the same default DSV dimension, layers and MSAA correction in the sibling repository, alongside RTV/SRV/UAV cases. This patch addresses the DSV path in VIctory-NVIDIA. #2535 addresses depth-test defaults in PSO stream creation. #2770 addresses depth twin invalidation. ## Validation The renderer team's synthetic CPU control found 5 mismatches among 6 implicit descriptor cases on the baseline and 0 on the candidate. Explicit mip, slice and flags matched in both arms. The baseline's invalid descriptor plan was rejected on the CPU before it reached the driver. Independent QA on an RTX 5070 checked the candidate offscreen with a single 2D texture and a three-layer 2D array, at 1x and 4x MSAA. The readback verifier matched all 442,368 bytes, including 36,864 directly read D32 samples at 1x and 73,728 RGBA pixels across 1x/4x. Resolved color verifies the 4x occlusion results. The 1D shapes were covered by the CPU control. Candidate draw median and P95 were 12.272 µs and 17.408 µs. These are fixture timings. In-game artifact attribution and a before/after GPU speedup were outside the experiment. Based on `f889bb076fa884fff8d2b6f0b50ac86f72abfd98`. Original commits `f2f2c3215e9ed8d42fa1275334f1cd697b4347b6` and `5f3ecbf78f5b5e79ea07aba8ced3ac6d67b446a4`, cherry-picked with original authorship.
(cherry picked from commit f2f2c3215e9ed8d42fa1275334f1cd697b4347b6)
(cherry picked from commit 5f3ecbf78f5b5e79ea07aba8ced3ac6d67b446a4)
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-29 19:02:40 +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/2955/head:github-bot/gh-2955'
git switch 'github-bot/gh-2955'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-2955'
git switch 'github-bot/gh-2955'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-2955'
git switch 'github-bot/gh-2955'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-2955'
git switch 'main'
git merge --squash 'github-bot/gh-2955'
git switch 'main'
git merge --ff-only 'github-bot/gh-2955'
git switch 'main'
git merge 'github-bot/gh-2955'
git push origin 'main'
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!2955
No description provided.