GPU: no unordered views in formats the host cannot store (NVIDIA) #1801
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!1801
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/1801/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?
@bulva2 on GitHub · 2026-11-24 22:47 UTC · original
fix/nvidia-typed-uav-formats→main· +34 −7 · 2 files · 1 commits · closed without mergingTitle: GPU: no unordered views in formats the host cannot store (NVIDIA boot crash)
Summary
On NVIDIA,
mainloses the device about 17 s into the first-boot screens(
DXGI_ERROR_INVALID_CALL). The cause is a typed unordered access view inB5G5R5A1_UNORM, a format NVIDIA cannot store to through typed UAVs. Thischange asks the device before making any typed UAV and leaves the slot a
null view when the format is refused. With it, an RTX 3070 boots into the
world again.
Hosts that store to every format the title uses (AMD) make exactly the same
views as before.
The failure
RTX 3070, driver 32.0.16.1088,
mainat70564ae, diagnostics build withVICTORY_D3D12_DEBUG=1:Create*Viewreturns nothing, so D3D12 removes the device for an invalidone. The same machine reached the world on
8e79c80; the views appearedwith the texture changes since then (
13bbd6fand others).Cause
typed_store()already queriesD3D12_FORMAT_SUPPORT1_TYPED_UNORDERED_ACCESS_VIEW(cached per format), but it only guarded castable views of another format
family. Three paths made typed UAVs without it:
fits(): a view in the texture's own family (or a castable one of thesame family);
buffer_uav(): typed buffer views (not raw, not structured);twin::uav(): views of a depth texture's writable twin.The change
fits()checks the format the view ends up with (the title's view format,or the texture's own when the view takes it). This subsumes the old
cross-family check, which is removed.
buffer_uav()checks typed buffer views; raw and structured views usefixed formats and are unchanged.
twin::uav()checks the twin plane's format.make(), so the slot gets the existingnull_for()null view of the title's kind (writes dropped, reads zero),as for any view the host cannot make.
typed_store()logs each refused format once:the host cannot store to unordered views in this format: they are null format=86.34 lines added, 7 removed, in
descriptor/host.rsandtwin.rs.Testing
is refused once, the debug layer reports no typed-UAV errors, and the title
boots into the world (first world frame 1695, 11,178 draws). Before: device
removed at boot in 2 of 2 runs.
typed_unordered_views_only_in_formats_the_device_stores:R32_UINT(required on every device) is accepted,UNKNOWNis not.cargo clippy --workspace --all-targets -- -D warnings, with and without--all-features: clean.cargo test --workspace: passes except twovictory-gputests that alreadyfail on
mainon NVIDIA (see below).it cannot make, so an AMD host that supports these formats takes the same
path as before.
Known NVIDIA issues this does not fix
Found while testing, left for separate changes:
(
DXGI_ERROR_DEVICE_HUNG, a dispatch with no marker).at exactly 1,000,000 descriptors (measured on the RTX 3070, binding tier 3).
Translated shaders clamp heap indices below
HEAP_VIEWS(2^21) and readNULL_BUFFER_VIEW(2^21 − 2) for a missing buffer view. On a 1,000,000-slotheap that null view is always out of bounds.
ran out 2 s into the world in earlier runs, dropping about 800 indirect mesh
draws per frame.
main:dynamic_slots_are_held_until_released(asserts a heap of at leastHEAP_VIEWS) andlists_share_a_table_and_copies_keep_their_views(asserts2^18 dynamic slots).
🤖 Generated with Claude Code
@upipibi on GitHub · 2026-11-24 22:51 UTC · original
Overlap for the reviewers: this is the fourth open fix for the same
B5G5R5A1_UNORMtyped-UAV boot crash on NVIDIA (#1753 / #1754). #1763 (opened first, at 22:09), #1775 and #1780 each makedescriptor::host::fitschecktyped_storefor every unordered view. #1787 (resource.rs) is the complementary half: it dropsUNORDEREDfrom such a texture's host description beforeGetResourceAllocationInfo. This PR editsdescriptor/host.rslike the first three. From reading the descriptions and file lists; nothing built.AI-assisted (Claude Code).
Pull request closed