GPU: a shared texture's allocation size is asked of its own description (NVIDIA device removal) #2286
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory!2286
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/2286/head"
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?
@Bullet18x on GitHub · 2026-11-25 09:48 UTC · original
Bullet18x:fix/nvidia-allocation-info→main· +5 −2 · 1 files · 1 commits · merged 2026-11-25 21:56 UTCProblem
Since
13bbd6f("one host texture per texture memory"),shared_texture()asksGetResourceAllocationInfofor the bytes sharing saved, using the title's descriptiond. That description can ask for uses its format does not take on the host. On NVIDIA it asks for unordered access onB5G5R5A1_UNORM, the query rejects it, and the device is removed a few seconds into the title on every NVIDIA card.With
VICTORY_D3D12_DEBUG=1(RTX 5090, driver 621.40):followed by
host GPU device removed after a submission of 1 lists ... (0x887A0001 DXGI_ERROR_INVALID_CALL)around frame 32.Fix
Ask the size of the live texture the description is shared with (
t.texture.GetDesc()), asHostTexture::newalready does. That is a description the host made a texture from, so the query always accepts it. Only theSAVEDstatistic reads the result; it now counts the live texture's size, which is the memory the sharing actually saved.Tested
GetResourceAllocationInfoerror is gone and the run gets past frame 32 (before, the device was removed there every time).cargo clippy -p victory-gpu --all-targets --locked -- -D warnings: clean.cargo test -p victory-gpu: 141 passed, 2 failed. The 2 (dynamic_slots_are_held_until_released,lists_share_a_table_and_copies_keep_their_views) fail the same way onmainon this card: NVIDIA's 1,000,000 view-heap cap, which #2177 / #2185 address.Not covered
B5G5R5A1_UNORMalso reachesCreateUnorderedAccessViewand render-target creation on NVIDIA. #1780 and #2180 cover those; with them on top of this, the title gets much further on this card. This PR only fixes the statistics query, whichmainhits first.AI-assisted (Claude Code).
🤖 Generated with Claude Code
@Marvisak on GitHub · 2026-11-25 13:33 UTC · original
Automated triage for the maintainers.
This is a small, focused fix that may matter a lot. In
shared_texture(crates/victory-gpu/src/resource.rs), main sizes theSAVEDstatistic by callingGetResourceAllocationInfoon the title's descriptiond. That description can ask for unordered access on a format the host cannot take that way (B5G5R5A1 on NVIDIA), and the PR's debug-layer log shows the call failing and the device being removed. The PR queries the live texture's own description instead, and only the statistic reads the result. CI passes. The same line is also fixed inside the much larger open #2212, which usest.bytesinstead, even simpler and with no COM call. That would be a fine one-line change here, but this PR is the cleaner one to merge.Generated by Claude Code
@KainanP on GitHub · 2026-11-25 19:36 UTC · original
RTX 4060 Laptop (610.47), merged onto main
13f91cae: neither half fixed alone (the UAV in 86 and the RTV in 115 still remove the device; without the debug layer the allocation-size query did not remove it here); no new failures. Details and the side-by-side table with the other #1753 PRs: #1753. Tested with the help of an AI assistant (Claude Code).