Keep the shape of default texture SRV fallbacks #4883
No reviewers
Labels
No labels
AMD
audio
bug
confirmed
crash
cutscene
dlss
documentation
duplicate
enhancement
fixed-on-main
frame-generation
good first issue
help wanted
input
INTEL
invalid
lighting
linux-proton
memory
needs-info
needs-logs
needs-rebase
NVIDIA
performance
pr-diagnostics
pr-docs
pr-feature
pr-fix
pr-performance
pr-refactor
pr-tests
question
RAYTRACING
rendering
report
series-s
shaders
spam
startup
upstream
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/trustno1-coder--VIctory-NVIDIA!4883
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-4882"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@andrewpozdnakov7-jpg on GitHub · 2026-12-01 12:42 UTC · original
andrewpozdnakov7-jpg:codex2/fix/default-srv-null-dimension→main· +37 −9 · 2 files · 1 commits · openRefs #4860
What it changes
A texture SRV created with a default descriptor normally takes its dimension from the resource. If the host copy is missing,
null_forcurrently substitutes a 2D descriptor, even for an array, a 1D or 3D texture, or a multisampled texture. D3D12 default SRV behaviorThis change uses the registered texture's dimension, array size, and sample count to select the null descriptor. The metadata lookup can return immediately when the texture table is busy. The generic 2D fallback is used when the shape is unavailable.
How it was tested
5fabb46eand releasee1251c31use the same fallback source. It selected the wrong dimension in 6 of 7 implicit SRV cases.35b8b3e84a50247366914706d66a7ad17ccfd4b0, all seven matched, including the 2D MSAA array. The fixture also checked a typed cube descriptor, a buffer, a missing resource, and a busy texture table. This checks the descriptor fields sent to the device stub. An in-game check focused on fallback dimensions remains open.5fabb46ewith and without35b8b3e8found that the flashing in #4860 persisted. The “another dimension” bucket was 83.0% on main and 83.6% with the patch. That comparison measured flashing and slot rewrite frequency. A follow-up measurement split roughly 480,000 entries from that bucket. About 98% had a buffer or other non-texture destination, and the sampled set contained zero default-description resource views. That result narrows the flashing investigation in #4860. The synthetic cases above remain the evidence for this PR's null descriptor dimensions. Independent report Counter breakdowncargo xtask policy --stagedaccepted both source files.Checked for overlap
Please retain the Git author on cherry-pick or rebase, or add
Co-authored-by: andrewpozdnakov7-jpg <[email protected]>if folding the change into another commit.AI-assisted with OpenAI Codex.
@Dukestar69 on GitHub · 2026-12-01 16:23 UTC · original · approved these changes
Reviewed crates/victory-gpu/src/descriptor/host.rs and crates/victory-gpu/src/resource.rs: resolving View::Shader(r, None) through default_texture_srv_dimension (non-blocking extures_now()) keeps fallback null SRVs matched to the texture's actual D3D12 SRV dimension (1D/2D/3D, array, MSAA) instead of defaulting to 2D. Verified on Windows (RTX 5090): cargo test -p victory-gpu --lib descriptor::host::tests::null_ -- --test-threads=1 (2 passed, 0 failed).
Synthetic tests only (no game files used). AI-assisted (Gemini 4 Neon).
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.