Repository navigation
Conversation
|
Reviewed and tested Blocking bug confirmed on both RTX 5090 and WARP:
|
|
Independent verification of head
Method: WARP/CPU only (no physical GPU; AI-assisted review (Claude Code / Claude Sonnet 5.5). |
…ce does not store is held back found in review on Marvisak#2773 by fuzeofficial (verified on RTX 5090 and WARP): `CheckFeatureSupport` reports no uses for a TYPELESS format (and every sRGB de-promoted one, 27/90/92): the format names no format itself, its views do. Stripping by that report left such a texture without the render target use of the game's own sRGB targets. A typeless format now takes its description's uses instead of the report's, and only the render target use is stripped at creation -- the one whose resource the device refuses wholesale (B4G4R4A4 on NVIDIA, Marvisak#2725): an unordered access use stays, the creation refusing cleanly where it does (an E_INVALIDARG, no device removal), and what removes the device is a view of it: every typed unordered access view now names a format the device stores (own format and casts alike, the description's own format included), and one it does not (B5G5R5A1, B4G4R4A4) is held back -- reads null, writes dropped. Tests: the description of 86/115/87 agrees with the device on the render target use and keeps the unordered one; typeless 27/90/92 and a sRGB promotion keep theirs; `typed_store` agrees with the device for 86, 115 and 28. Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
|
Tightens the right seam: fits() now refuses any unordered view naming a format the device can't store - including the default view case (view==0 on a typed unstorable resource), which the old cast-only guard missed. Complements the creation-side work (making RTV/DSV fallible and skipping untaken uses keeps a dropped view from silently becoming device removal). Layers well with #2442's flag-drop: even where the flag survives, a bad view reads null instead of removing the device. |
@fuzeofficlal Fixed in c1fcd74, on both points:
New tests: the sanitized description of 86/115/87 agrees with the device on the render-target use and keeps the unordered one; typeless 27/90/92 and a sRGB promotion keep all uses; AI-assisted (Mistral Vibe). |
@kotekompotek Thanks — the seam mattered: the creation side alone would have left a hole either way (keep the flag and the description's own view removes the device; drop the flag and every cast view dies with it), so the guard had to sit on the view. The default-view case (view==0 on a typed unstorable resource) was exactly the one that stayed open until this pass. Layering with #2442's flag-drop is the story of the whole fix: whatever survives the creation ends readable or bounded, never a removal. AI-assisted (Mistral Vibe). |
|
Re-verified updated
Non-blocking observations:
Looks solid and ready from my side! |
…ce does not store is held back found in review on Marvisak#2773 by fuzeofficial (verified on RTX 5090 and WARP): `CheckFeatureSupport` reports no uses for a TYPELESS format (and every sRGB de-promoted one, 27/90/92): the format names no format itself, its views do. Stripping by that report left such a texture without the render target use of the game's own sRGB targets. A typeless format now takes its description's uses instead of the report's, and only the render target use is stripped at creation -- the one whose resource the device refuses wholesale (B4G4R4A4 on NVIDIA, where it does (an E_INVALIDARG, no device removal), and what removes the device is a view of it: every typed unordered access view now names a format the device stores (own format and casts alike, the description's own format included), and one it does not (B5G5R5A1, B4G4R4A4) is held back -- reads null, writes dropped. Tests: the description of 86/115/87 agrees with the device on the render target use and keeps the unordered one; typeless 27/90/92 and a sRGB promotion keep theirs; `typed_store` agrees with the device for 86, 115 and 28. Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
|
Tested on RTX 3070 Ti, driver 610.88, Windows 11 26300, rustc 1.98.1. main 13f91ca. Merged into main cleanly (725d6f4).
Covers both formats and both uses, but by dropping them: draws to a 115 target and UAV writes to 86/115 are lost. #2767 makes the same cases work as R8G8B8A8. (Claude Code, Claude Opus 5.5.) |
The console makes any texture a target or unordered storage; the host refuses resources with uses their format cannot take -- the 16-bit packed ones on NVIDIA: B4G4R4A4 has no render target support and its and B5G5R5A1's unordered access is refused too (Marvisak#2725) -- and both the creation and a plain query of such a description removed the device: 14 of the 20 crashes in the report, one of them 13 s after launch. A format's uses now come from CheckFeatureSupport (cached), and a host description leaves the refused ones away: the texture is made without them (its shader reads work; on NVIDIA the render target clears of a B4G4R4A4 skip, on the formats that do take a use nothing changes). A render target or depth view of a texture made without its use is dropped (the view reads null) instead of made on a resource that does not allow it -- Host::rtv and Host::dsv say None, and set_targets, the clear of a render target and of depth leave such a target out, as they do one without a view. Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
…ce does not store is held back found in review on Marvisak#2773 by fuzeofficial (verified on RTX 5090 and WARP): `CheckFeatureSupport` reports no uses for a TYPELESS format (and every sRGB de-promoted one, 27/90/92): the format names no format itself, its views do. Stripping by that report left such a texture without the render target use of the game's own sRGB targets. A typeless format now takes its description's uses instead of the report's, and only the render target use is stripped at creation -- the one whose resource the device refuses wholesale (B4G4R4A4 on NVIDIA, where it does (an E_INVALIDARG, no device removal), and what removes the device is a view of it: every typed unordered access view now names a format the device stores (own format and casts alike, the description's own format included), and one it does not (B5G5R5A1, B4G4R4A4) is held back -- reads null, writes dropped. Tests: the description of 86/115/87 agrees with the device on the render target use and keeps the unordered one; typeless 27/90/92 and a sRGB promotion keep theirs; `typed_store` agrees with the device for 86, 115 and 28. Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
c1fcd74 to
924ffcf
Compare
|
Automated triage for the maintainers. The current head strips the render-target flag in
Generated by Claude Code |
|
Merged onto current
With |
Fixes #2725 (group A — 14 of the 20 crashes; may also help #2719's group A).
What
The console makes any texture a render target or unordered storage. The host (D3D12) refuses resources with uses their format cannot take — on NVIDIA the 16-bit packed ones: B4G4R4A4 has no render-target support and neither B4G4R4A4 nor B5G5R5A1 supports typed UAVs. Until now the creation itself (and even a plain
GetResourceAllocationInfoof such a description) was an invalid call, which removed the device: the verbose log of #2725 reproduces one of these crashes 13 s after launch.Now a format's uses come from a cached
CheckFeatureSupport(D3D12_FEATURE_FORMAT_SUPPORT)query, andhost_descleaves the refused uses away before anything reaches the device. The texture is created without them (its shader reads keep working).Host::rtv/Host::dsvreportNonefor a resource its view would not be valid on, andset_targets,ClearRenderTargetViewandClearDepthStencilViewleave such a target out, as they already do for a target without a recorded view — a dropped clear instead of a device removal.On formats that do take their uses (everything else), nothing changes.
Verified on hardware (RTX 5070, driver 616.87)
CheckFeatureSupportthere: B4G4R4A4 (115) — no RT, no UAV; B5G5R5A1 (86) — RT yes, UAV no — matching the report's debug-layer output.a_target_of_a_format_the_device_refuses_the_uses_of_is_made_without_them: the sanitized description agrees with the device's own answer for 86/115/87.cargo clippy --workspace --all-targets --locked -- -D warningsclean (standard and--all-features).cargo test -p victory-gpu --features diagnostics: 200 passed; the 2 failures are the heap-cap pair pre-existing on main on this machine (NVIDIA heap cap, Shaders: the null-buffer reads of the heap skip a host that caps its heaps #1943 family), unrelated to this diff.Not covered: the report's group B (DEVICE_HUNG in a mesh draw) and group C (feature level) are separate causes, and the 1M descriptor-heap cap of #2725's section 2 is its own fix; this PR takes the group that was 14/20 crashes.
AI-assisted: implemented with Mistral Vibe.