GPU: no typed unordered view in a format the host cannot store to #2462
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory!2462
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/2462/head"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@lhnizdo on GitHub · 2026-11-25 14:02 UTC · original
lhnizdo:pr/uav-format-support→main· +10 −0 · 1 files · 2 commits · merged 2026-11-25 21:57 UTCfits()asks the host whether it can store to a typed unordered view's format (typed_store) only when the view is cast to another format family. A view in the texture's own format goes toCreateUnorderedAccessViewunchecked.On an NVIDIA card (Windows 10), the title makes unordered views of
B5G5R5A1_UNORMtextures, a format that card can't use for unordered access. The device was removed withDXGI_ERROR_INVALID_CALLduring loading. The debug layer reported:followed by
RemoveDevice.Every typed unordered view is now checked, whatever its family. One the host can't store to is not made, like other views the host doesn't allow ("an unordered view in a format the host cannot store", logged once), and its slot stays null.
Checked on that machine: the view is refused once, the device is no longer removed there, and the run (with the Agility SDK and heap-limit PRs) went from frame 128 to past frame 1,700. Clippy is clean and the
victory-gputests are unchanged.🤖 Generated with Claude Code. The change was written by Claude Code (Claude Opus 5.5) in my session; the commit carries a
Co-Authored-By: Claudeline.@kotekompotek on GitHub · 2026-11-25 14:12 UTC · original
Complements #2442 rather than overlapping it: #2442 legalizes the resource flag at creation, this guards the view-creation side — a typed UAV descriptor in a store-incapable format (incl. a cast view format, via
typed = viewwhen nonzero) is refused beforefitscan pass it to the host, where creation removes the device the same way. Theview == 0 && typelessexemption is consistent —fitsalready returns!typelessthere, so this skips a probe/log that cannot change the outcome. Both halves are needed: the title can request a UAV view whose declared format differs from the texture format.@Marvisak on GitHub · 2026-11-25 15:57 UTC · original · edited 2026-11-25 18:46 UTC
Automated triage for the maintainers.
Merge candidate. In
crates/victory-gpu/src/descriptor/host.rs,fitsnow refuses any typed unordered view whose format the host cannot store to (typed_store,D3D12_FORMAT_SUPPORT1_TYPED_UNORDERED_ACCESS_VIEW), including views in the texture's own format. Before, only views cast to another family were checked, and the debug-layer message in the description shows the device being removed for one in the texture's own format. I checked the newtypedchoice against the rest offits. A typed texture's view is made in its own format unless the requested format is castable, and a typeless texture's view is made in the requested format. The typeless case with no format keeps its old result. The later check for cast views is now redundant but harmless. CIcheckpasses. It complements whicheverhost_descflag fix is chosen (#2442 / #2459).On your reply: the earlier nit is addressed. The check now looks at the format the view is actually made in.
Generated by Claude Code
@lhnizdo on GitHub · 2026-11-25 18:07 UTC · original
Thanks for testing on the RTX 3080, @fyernald, and for checking it together with #2319.
I've addressed the triage nit: the store check now looks at the format the view is actually made in. That's the texture's own format, unless the requested one is castable, which matches what
fitsdoes further down. Also rebased onto currentmain(13f91ca).@KainanP on GitHub · 2026-11-25 19:36 UTC · original
RTX 4060 Laptop (610.47), merged onto main
13f91cae: B5G5R5A1 UAV half fixed (views refused), B4G4R4A4 target half still removes the device; no new failures. On Intel UHD the UAV half still fails because main gets no host texture there (creation refused), which a view check cannot help. Details and the side-by-side table with the other #1753 PRs: #1753. Tested with the help of an AI assistant (Claude Code).@lhnizdo on GitHub · 2026-11-25 21:01 UTC · original
Thanks @KainanP for the RTX 4060 run and the side-by-side in #1753. The
B5G5R5A1unordered-view half being fixed with no new failures is exactly what this PR is for. TheB4G4R4A4render-target half, and Intel UHD where no host texture is made at all, need the creation-side fixes from the other #1753 PRs; a view check can't reach them.@artor410 on GitHub · 2026-11-25 21:53 UTC · original
Tested on RTX 3070 Ti, driver 610.88, Windows 11 26300, rustc 1.98.1. main
13f91ca. Heada1ac77f(fast-forward on main).cargo test -p victory-gpu(main: 193 passed, 2 failed: the known heap-cap pairdynamic_slots_are_held_until_released,lists_share_a_table_and_copies_keep_their_views). With this PR: 193 passed, same 2 failed. No new test.create_placedwith the UAV and/or RT flag, thendescriptor::host::make_view(View::Unordered(..))andHost::rtv(texture, None), thenGetDeviceRemovedReason, one process per case. On main: UAV view of 86 or 115 crashes the test process (0xc0000005 inside the driver); RTV of 115 removes the device (0x887A0001); 115 with RT|UAV gets no host texture.CheckFeatureSupporthere: 86 RT yes, typed UAV no; 115 RT no, typed UAV no.UAV only: the B4G4R4A4 render-target half of #735 is not covered, and UAV writes are dropped. Same effect as #1946.
(Claude Code, Claude Opus 5.5.)