Repository navigation
Conversation
The D3D12 debug layer named the world-load device removal on a GTX 1660 SUPER (Turing): a texture with D3D12_RESOURCE_FLAG_ALLOW_UNORDERED_ACCESS must be created with a format that can be used as (or cast to) unordered access, but the layer asks for B5G5R5A1_UNORM. The console allows it; PC D3D12 refuses, so the resource creation is invalid and the next submission device-removes. host_desc now asks the host device (D3D12_FEATURE_FORMAT_SUPPORT, UAV_TYPED_LOAD|UAV_TYPED_STORE) and drops ALLOW_UNORDERED_ACCESS when the format cannot be a UAV; unordered views of it are then refused like any other use the host does not take. Measured on 940d32f: without this a run device-removes about 10 s into the world load; with it the run is stable (25 min, no fault) and reaches the account-picker screen.
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:
- Dropping
ALLOW_UNORDERED_ACCESSwhen a format lacks typed UAV support cleanly avoids invalid D3D12 resource descriptions on NVIDIA (note: overlaps in scope with#2319and#2442). cargo test -p victory-gpu resource::tests: 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.
Drop ALLOW_UNORDERED_ACCESS when the format cannot be a UAV. 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. Overlaps #2462 (same format/UAV theme) — check whether one subsumes the other.
|
Heads-up for triage: #2442 fixes the same #2258 device removal, with two technical differences worth noting:
|
|
Independent WARP verification of #2459 at Commands (Rust 1.98.1, Windows 11, merged cleanly with
4-way comparison of the UAV-flag PRs (#2459 / #2442 / #2319 / #2432)
WARP probe of
Reading: #2442 is the narrowest fix that still honours the cast-list route main already relies on for sRGB/typeless UAV textures. #2459 and #2319 look like they regress those on a device whose typeless format reports no typed UAV (WARP here; hardware may differ, I could not check). #2432 is a different layer (view refusal + allocation-info query) and could land alongside #2442. Suggest one of the AI-assisted verification by Claude Code (Claude Sonnet 5.5). Software-only: Microsoft Basic Render Driver (WARP, vendor 0x1414, forced by |
|
Overlap check: four open PRs drop
Added 20:35Z: two newer PRs for #2725 overlap these (read from the diffs, not run):
Added 21:52Z: two more, read from the diffs (not run):
So #2834's unordered-access drop is the same creation-side change as the first four, with the device's own answer as the rule, and #2832 swaps formats like #2767 (87 there instead of 28). Added 22:21Z: artor410 measured five of these on an RTX 3070 Ti with a synthetic probe (a UAV view of 86/115 and an RTV of 115, one process per case): #735 (comment). In it the RTV of 115 still removes the device with #2442, #2462 and #1946, not with #2767 or #2773. #2459, #2319, #2834 and #2832 are not in that table. #2462 (lhnizdo) is the view-creation side. kotekompotek noted it complements #2442 rather than overlapping it. They differ mainly for typeless formats. #2180 leaves typeless formats alone, #2319 applies its rule only to family heads (typeless ones included) and formats with no family, and #2442 keeps the flag when a castable UAV format exists. (Edited: the #2319 row was backwards.) One of the four should be picked; whichever is picked, #2462 still applies. Edited after AI-assisted (Claude Code, Claude Opus 5.5). Read from the diffs only. |
Review of Marvisak#2459 (kotekompotek, oni-swr): uav_format probed only the exact format with Support2 UAV_TYPED_LOAD|STORE, an operation-support bit, so the flag was dropped from typeless and sRGB textures (e.g. R8G8B8A8_TYPELESS 27, and 29 which host_desc maps to 27) that the host can legally create unordered through their castable formats. Use the legality criterion instead: the format, or a format the texture is made castable to (the enhanced-barrier creation make_texture takes), must take a typed unordered view (descriptor::host::typed_store, D3D12_FORMAT_SUPPORT1_TYPED_UNORDERED_ACCESS_VIEW). The B5G5R5A1_UNORM case (no such format in its family on the device) still loses the flag. Adds a host-derived test (unordered_flag_follows_the_castable_route).
|
Addressed the review feedback in kotekompotek / oni-swr were right: What changed:
Checks (GTX 1660 SUPER, Turing, Rust 1.98.1): This brings the rule in line with #2442 (same criterion, cast-list aware). If the maintainers prefer #2442, I'm happy to close this one — the difference now is only surface (where the guard sits, and AI-assisted; verified on the physical Turing device noted above. |
host_desc keeps ALLOW_UNORDERED_ACCESS where a format the texture is made castable to takes a typed unordered view. But the cast-list creation (CreateCommittedResource3 / CreatePlacedResource2) can be refused (E_INVALIDARG), and the committed fallback then carried the flag on a format that cannot be a typed UAV itself, removing the device. The fallback now clears the flag when the format itself cannot take a typed unordered view: with the cast list gone the flag is only legal where it can.
|
Automated triage for the maintainers. The head is unchanged ( Generated by Claude Code |
|
Updated this branch with two things:
Found while testing on the GTX 1660 SUPER: on |
…size casts Triage was right: castable() groups by element size, so castable(B5G5R5A1_UNORM=86) includes 16-bit R16/R8G8 formats that take typed UAVs, and the flag was kept for 86 - the exact texture the report is about (probe on the GTX 1660 SUPER: typed_store(86)=false, yet castable(86)=[49,50,51,52,54,56,57,58,59,68,69,85,115] and all of [49,50,51,52,54,56,57,58,59] take typed UAVs). Use the format's own family instead (family_formats: the typeless head and its typed/sRGB twins, i.e. every format sharing its family() head), which is what a UAV of the resource can reach without changing what the texels mean. B5G5R5A1 has no such family, so it loses the flag; typeless/sRGB keep it through their typed member. The test now checks 86 loses it.
|
Triage is right — thank you, that was a real bug in the change. Confirmed empirically on the GTX 1660 SUPER:
Fixed in On the re-run you suggested: I can't reach that texture on this head, because This now overlaps #2180/#2319/#2442 as you noted; I'm happy to close this in favour of whichever AI-assisted; probe and predicate on the physical Turing device above. |
|
RTX 4060 Laptop (610.47), merged onto main 13f91ca: B5G5R5A1 UAV half fixed (flag dropped, UAVs null), B4G4R4A4 target half still removes the device; no new failures. By reading, |
…s f itself Drop the hard-coded !takes(86) from unordered_flag_follows_the_format_family: the rule (flag kept iff the format's family takes a typed UAV) is what the test should pin, and a device that stores B5G5R5A1_UNORM typed (WARP, some AMD) keeps the flag - the old assert panicked there, failing CI. amily_formats scanned only 1..=115, so a format above 115 with no family iterated nothing instead of ' alone' as its doc says; chain itself.
|
Fixed both triage points in
Local: Still overlaps #2180/#2319/#2442; happy to close in favour of whichever AI-assisted. |
|
Tested this PR at
|
|
Thanks @krcenov — good to have an Ada confirmation at One note for anyone reading this PR: the format-115 / For the record, a separate finding from the same machine (not part of this PR, no code change here): the world-load stop at AI-assisted. |
Fixes the world-load device removal on a GTX 1660 SUPER (Turing, driver 610.88) that the #1063 report hit on
940d32f.The D3D12 debug layer named the invalid call:
The console allows a texture flagged for unordered access in such a packed format; PC D3D12 does not, so the resource creation is invalid and the next submission device-removes (
GetDeviceRemovedReason=0x887A0001).host_descnow asks the host device (D3D12_FEATURE_FORMAT_SUPPORT,UAV_TYPED_LOAD|UAV_TYPED_STORE) and dropsALLOW_UNORDERED_ACCESSwhen the format cannot be a UAV; its unordered views are then refused like any other use the host does not take.Measured on
940d32f(GTX 1660 SUPER, own 1.0.2.1 copy, Agility 1.620.2 inD3D12\):crashes.log:host GPU device removed … 0x887A0001);crashes.logclean) and reaches the account-picker screen at 30 fps, thenGame Running.This is independent of the codec stop in #1063 — with this change the run reaches that stop instead of dying earlier — and it is independent of pipelines/contents tried before (a pre-built
translate --cache --pipelineslibrary, Series S, and disabling depth twins or large title-buffer copies all still device-removed until this format guard).Thanks for VIctory.