Repository navigation
GPU: a shared texture's allocation size is asked of its own description (NVIDIA device removal) - #2286
Open
Bullet18x wants to merge 1 commit into
Open
GPU: a shared texture's allocation size is asked of its own description (NVIDIA device removal)#2286Bullet18x wants to merge 1 commit into
Bullet18x wants to merge 1 commit into
Conversation
shared_texture() asks GetResourceAllocationInfo for the size it saves, with the title's description. That description may ask for uses its format does not take on the host: on NVIDIA, unordered access on B5G5R5A1_UNORM. The query rejects it, and the device is removed (DXGI_ERROR_INVALID_CALL) a few seconds into the title on every NVIDIA card. Ask it of the live texture the description is shared with, as HostTexture::new does: a description the host made the texture from. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
zhaibingye
added a commit
to zhaibingye/VIctory
that referenced
this pull request
Nov 25, 2026
DenRakEiw
approved these changes
Nov 25, 2026
DenRakEiw
left a comment
There was a problem hiding this comment.
Verified against origin/main (940d32f) on Windows 11 + NVIDIA GeForce RTX 5090 and WARP:
- Querying
t.texture.GetDesc()instead of the incoming titledavoids passing host-invalid flag/format combinations (e.g. UAV onB5G5R5A1on NVIDIA) toGetResourceAllocationInfoand eliminates the raw pointer cast /read_unaligned. cargo test -p victory-gpu resource::: 10/10 passed on RTX 5090, 10/10 passed on WARP.cargo clippy -p victory-gpu --all-targets -- -D warnings: 0 warnings.cargo xtask policy: 183 files ok.
AI-assisted (Gemini 4 Neon).
catminou4
reviewed
Nov 25, 2026
catminou4
left a comment
Contributor
There was a problem hiding this comment.
Shared texture allocation size asked of the live texture's own GetDesc() instead of the requested desc (B5G5R5A1 UAV on NVIDIA removed the device). Static review only: victory-gpu/victory-hle are Windows-only (D3D12/windows-sys); not compiled or tested on this macOS arm64 host. rustc 1.98.1. Real device-removal fix, 5 lines.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
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 GPU+shader: clamp and place null buffer views within capped host descriptor heaps #2177 / fix: clamp shader heap indices to the host's view-heap cap (NVIDIA) #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