Repository navigation
GPU: a shared texture's allocation size is asked of its own description (NVIDIA device removal) - #2286
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>
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
left a comment
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.
|
Automated triage for the maintainers. This is a small, focused fix that may matter a lot. In Generated by Claude Code |
|
RTX 4060 Laptop (610.47), merged onto main 13f91ca: 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 (comment). Tested with the help of an AI assistant (Claude Code). |
… of its own description (NVIDIA device removal)
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