Repository navigation
Conversation
catminou4
left a comment
There was a problem hiding this comment.
No render target view of a format the driver refuses while its support query says it takes it (vendor-id check, #1952). 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. Vendor workaround tied to issue #1952.
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:
- Checking both
refuses_target(self.vendor, ...)(for NVIDIAB4G4R4A4_UNORM#1952) andtakes_render_targetbeforeCreateRenderTargetView, falling back to a null RTV when unsupported, avoids device removal without penalizing vendors that support the format. cargo test -p victory-gpu host::tests: all 7/7host::tests::*passed on RTX 5090 and 7/7 on WARP (only the pre-existing NVIDIA #1744 baseline failure indescriptor::host::tests::dynamic_slots_are_held_until_releasedmatched the substring).cargo clippy -p victory-gpu --all-targets -- -D warnings: 0 warnings.cargo xtask policy: 183 files ok.
AI-assisted (Gemini 4 Neon).
|
A risk I want on the record before this lands: a null view of the 1440p target can turn a crash into a black screen While tracing where the refused format comes from, I found that That means the target this pull request turns into a null view is very plausibly the title's scene target (2560×1440, flags So I want this merged as what it is: a run-keeper, not a renderer, and the description now says so. The picture needs a real stand-in for format 115 in Two consequences I accept, and one I do not want:
If it is preferred that the guard not land before the stand-in, I will hold it; the mechanism and the measurement are in #1952 either way, and a closed pull request with the analysis is worth more than an open one that misleads. No game data is involved: a format number and code. Written with an AI assistant. |
A 1440p
B4G4R4A4_UNORMrender target removes the device, and the support query says it should notWith
VICTORY_D3D12_DEBUG=1andVICTORY_D3D12_DRED=1on an RTX 4090 (32.0.16.2124), the debug layer names the call that ends a run (issue #1952):The obvious guard — refuse the view when
CheckFeatureSupport(D3D12_FEATURE_FORMAT_SUPPORT)does not reportRENDER_TARGET— does not work here, and I measured why before writing this:So the query is kept for the formats it answers honestly, and a second, vendor-aware refusal covers the case it gets wrong: NVIDIA reports the format as a target and then refuses the view, while AMD takes it (that is the card on which the same title reaches the lit world).
Change:
Hostkeeps the adapter'sVendorId(read fromIDXGIDevice::GetAdapteronce, at creation — the only other use of a vendor id in this file is a diagnostic inwarp_adapter), andrtvasks two things before creating a view:refuses_target(vendor, format): NVIDIA andB4G4R4A4_UNORM— the measured case;takes_render_target(format): the support query, for formats that answer honestly.When either says no, the slot is filled with a null view and the draw goes nowhere, which costs the target and keeps the device and the run. A warning names the format and the vendor on the first refusal of each format.
Verification
--features diagnostics);--all-featuresunder-D warnings;rustfmt --checkshows the same 45 hunksmainalready has in this file and no new one;no render target of this format on this host: a null view.No game data is involved: format numbers, a vendor id, an HRESULT and debug-layer text.
Written with an AI assistant.