NVIDIA: main at 70564ae removes the device ~6 s after start (typed UAV on B5G5R5A1_UNORM, DXGI_ERROR_INVALID_CALL) #1753
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#1753
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
@JurajSimicevic on GitHub · 2026-11-24 21:59 UTC · original
Setup: RTX 5080 16 GB (driver 32.0.16.1742), Intel Core Ultra 7 270K Plus, Windows 11 Pro 26200. Plain
mainat70564ae, diag build (--profile diag --features diagnostics),VICTORY_D3D12_DEBUG=1 VICTORY_D3D12_DRED=1. Series X dump.What happens: about 6 s after start, during the first boot screens (one frame-rate line, 0.2 fps), the device is removed with
DXGI_ERROR_INVALID_CALLafter a submission of one list (no breadcrumbs). Runs onffe310e(before tonight's merges) on the same machine reached the world every time.Right before it, the debug layer reports:
So a typed UAV is made on a
B5G5R5A1_UNORMtexture, a format NVIDIA doesn't support for typed UAVs; creating it invalidates the device.Also new since
ffe310e, in the same seconds:title slot past the host heap index=… count=934464 for_draw=false(indices 934,464 to 1,245,183): the title's view heap of 1,245,184 slots is capped at 1,000,000 (host view heap capped at 1000000), and views for the slots past the cap are now asked for outside draws.CreateDescriptorHeap: NumDescriptors 2097152 / 1507328 / 1310720, but the limit for shader visible view heaps is 1000000(theHEAP_VIEWSattempts, then the fallbacks).Not the cause: my branch for the view-heap dynamic range (#1751) stops in exactly the same way, with the same messages and the same count of warnings; plain
mainwas checked separately to be sure.Possibly a fix along the lines of checking
D3D12_FORMAT_SUPPORT2_UAV_TYPED_*/CheckFormatSupportbefore making a typed UAV (or making a typeless/null one instead), but I haven't traced which commit betweenffe310eand70564aestarted making this view.AI-assisted (Claude Code).
@alessiodeia on GitHub · 2026-11-24 22:08 UTC · original
Same crash on an RTX 2070 SUPER (Turing, driver 621.40), plain
70564ae: device removed after ~70 s withDXGI_ERROR_INVALID_CALL. The debug layer showsCreateUnorderedAccessView: The format (0x56, B5G5R5A1_UNORM) cannot be used with a Typed Unordered Access Viewright before it.@JurajSimicevic I saw your claim in #1633 and I'm not opening a competing PR. I had already written and verified the same fix, so here it is in case it saves you time:
alessiodeia/VIctory@7c889c2onfix/typed-uav-format-support. Feel free to take any of it.view=86 own=86 flags=5(render target + unordered access) on a texture made throughCreateCommittedResource3withcastable(86)= R8G8/R16 formats plus B5G6R5/B4G4R4A4. The castable list is what lets the device accept the UAV flag on B5G5R5A1.fitsthen sees no cast and the same family, sotyped_storeis never asked.fits, checktyped_storeon the format the view is actually made in (ownunless the view casts or the texture is typeless), and againstownwhen the view has no format. This replaces the cast-only check.CreateCommittedResourceand the UAV flag passes vacuously. On this card the device refuses to create it, so the case is skipped. The texture has to be made withCreateCommittedResource3and the castable list, asmake_texturedoes. With that, the test (unordered_views_need_a_format_the_device_stores_to) fails on70564ae(B5G6R5 accepted) and passes with the fix. It also makes R8G8B8A8 as a control and checks the device is alive at the end.an unordered view in a format the host cannot store view=86 own=86) at the point where the plain build died, and the run went on to ~4.8 min. It then hit a different removal before the world: a 4.5 s submission ending indispatch 16x16x16 [compute 00167d58cc5a78d7], with 119 wave64 compute pipelines refused on this 32-lane card. I expect that one is a wave64 matter (#439/#189), not this bug.-D warningsclean with and without--all-features;cargo xtask policyok. On this carddynamic_slots_are_held_until_releasedandlists_share_a_table_and_copies_keep_their_viewsfail on plain70564aeas well (capped view heap), so they're unrelated.AI-assisted (Claude Code). No game data attached.
@Ryanarcx2 on GitHub · 2026-11-24 22:16 UTC · original
Confirming on an RTX 5070 Ti (driver 32.0.16.1742), Windows 11,
mainat70564ae, aftertranslate --cache --pipelines.VICTORY_D3D12_DEBUG=1DXGI_ERROR_INVALID_CALL; debug layer:GetResourceAllocationInfo: ALLOW_UNORDERED_ACCESS texture with format B5G5R5A1_UNORM0x887A0001, 1 list submittedThe release run logs, under a second before removal:
the host refuses castable formats ... 2560x1440thenno host texture ... format: 115(E_INVALIDARG). Onffe310ethe same two 2560x1440 textures (formats 86/115) were also refused, but the run continued through the menus to the first cutscene. So this looks like a regression from13bbd6fon NVIDIA. It happens before the account picker, with or without the debug layer.Happy to test #1763 / #1765.
@antoinerz1 on GitHub · 2026-11-24 22:40 UTC · original
Review of the three open fixes for this crash (#1763, #1775, #1780), tested on an RTX 4060 Ti
All three change the same check in
descriptor::host::fits. I ran each one's tests on NVIDIA, then undid each fix (keeping its test) to see whether the test catches the bug. No game run, no game data.Setup: RTX 4060 Ti, driver 32.0.16.1088, Windows 11 26300,
mainat70564ae. Heads: #1763dbd4fc2, #17753f91087, #1780151fa7d.cargo test -p victory-gpu --locked --lib descriptor::host.view=86 own=86, the one the title makes)view == 0) on a B5G5R5A1 texture#1780: the
if view == 0 { return !typeless; }early return comes before the new check, so a UAV without a description on a B5G5R5A1 texture still reachesCreateUnorderedAccessView.viewed_formathandlesview == 0, butfitsnever calls it with 0. I applied #1775's GPU test on top of #1780: it fails atassert_eq!(fits(&texture, &castable, None, true), stores)(left: true, right: false). The new test checksviewed_formatalone, so it would still pass iffitsstopped calling it. The title's view in the reports has a description, so this does not show in the game runs, but the device-removal path is still there.#1763: the fix is the same as #1775's. Its tests don't exercise it:
unsupported_typed_uav_format_is_refuseduses anR16_TYPELESStexture viewed as B5G5R5A1, a cast across families thatmainalready refused. With both changed lines put back tomain's, both new tests still pass here.#1775: with the fix undone, its test fails on this card (
left: true, right: false), so it creates the castable B5G5R5A1 texture the wayresourcedoes and checks both the described and undescribed views. It is also the only one with a game run reported past the boot (#1753 author, RTX 5080).So #1775 looks like the one to merge, and #1763/#1780 can close in its favour. In all three, the only other failure in that module is
dynamic_slots_are_held_until_released, which fails onmainon this card too (theHEAP_VIEWScap, #1751/#1777).AI-assisted (Claude Code).
@crissuper20 on GitHub · 2026-11-24 23:17 UTC · original
Same crash on a GTX 1650 (Turing TU117, 4 GB, driver 32.0.16.2124), Windows 11 LTSC 24H2, diag build, Series S, my existing save. On plain
70564aethe device is removed withDXGI_ERROR_INVALID_CALLafter a 1-list submission, ~2.5 min after start and before the world load.Each of the three fixes on its own, merged onto
70564ae, 6-minute runs with the same save and input script:70564aedbd4fc2)3f91087)151fa7d)So all three remove it here too; nothing on this card favors one over another. Fine to pick whichever the reviewers prefer and close the other two.
Claude Code assisted.
@PigBun-AI on GitHub · 2026-11-24 23:50 UTC · original
AI-assisted comment (PigBun-AI): the measurements below were taken by an AI agent team on one machine and are reported as-is.
Confirming #1753 on an RTX 5090 (Windows, D3D12 FL 12.2; driver version not recorded),
mainat70564ae0, default adapter, 1280x720 window. Measurements only:Without any fix (
70564ae0, diagnostics build,VICTORY_D3D12_DEBUG=1): the device is removed about 24 s after start (17 s in the first run without the debug layer). The D3D12 debug layer says, immediately before the removal:Nothing is drawn (8 captured frames all black). Two runs had the same event order.
With a guard (one extra commit on top of
70564ae0that asksCheckFeatureSupport(FORMAT_SUPPORT)for the view format and creates a null UAV whenUAV_TYPED_STOREis missing), the same RTX 5090 query for DXGI 86 returnsi.e. TYPED_UNORDERED_ACCESS_VIEW (and UAV_TYPED_STORE) are not reported for B5G5R5A1_UNORM; of the 24 formats the game asked about in that run, only 86 was refused (a 2560x1440 texture). With the guard the device was not removed again for the whole 71 s that the run lasted, and the game reached its first world frame at ~59 s.
Caveats: single machine, single run per configuration; the guarded run was stopped by our own memory guard 12 s after entering the world, so it says nothing about later stability. In the same guarded run 77 compute pipelines were refused with 0x80070057 shortly after the world started; we have not looked into why. We saw no report of this on a 5090 in this issue, so this may help others on the 50 series.
Debug-layer log lines and the guard output are available if useful.
@MoonYueya on GitHub · 2026-11-25 05:49 UTC · original
Still reproduces on current
main940d32f(RTX 3080 10 GB, driver 32.0.16.1742, Windows 11 26300): device removed ~20 s after start, before any menu, exit0x887A0001, max frame 128 (64 with the debug layer). WithVICTORY_D3D12_DEBUG=1 GBV=1 DRED=1the last calls are, within 16 µs:DRED breadcrumbs are empty, so it is the invalid call, not a GPU hang.
#1843 + #1832 merged together on
940d32f(both clean merges, local only), same switches: ids 342 and 232 are gone, no device removal, the run reaches the world (frame 1024, 111 s, captured frames change). That agrees with the other confirmations here.The next blocker after that fix, in case nobody has hit it yet: the same run then dies at frame 1024 with an access violation writing address 0:
Still present with the fix: id 645 ×3 (
CreateDescriptorHeapasks for 2,097,152 / 1,507,328 / 1,310,720 views), id 599/817 once each for theB4G4R4A4_UNORMrender target, and 310,720title slot past the host heaplines (the title wants 1,245,184 slots, the heap is capped at 1,000,000).Not tested: #1843 or #1832 alone; which commit introduced the removal; the access violation beyond its offset.
AI-assisted: an AI agent ran the builds, runs and log analysis on my machine.
@Marvisak on GitHub · 2026-11-25 12:52 UTC · original · edited 2026-11-26 00:47 UTC
Automated triage for the maintainers.
The view-side defect described here is fixed in
main(current63bcca4) by #1273 (merged 2026-11-25 21:40 UTC) andea488a9"GPU: no typed unordered view in a format the host cannot store to" (#2462, merged 21:57 UTC). Infits(crates/victory-gpu/src/descriptor/host.rs), every typed unordered view is now checked withtyped_storeagainst the format it is made in (the texture's own format unless the view is castable or the texture typeless), and a UAV with no description is checked against the texture's own format. AB5G5R5A1_UNORMunordered view on NVIDIA is refused (an unordered view in a format the host cannot store, logged once) and its slot left null instead of reachingCreateUnorderedAccessView. Writes through it are dropped.MoonYueya's follow-up (still removed on
13f91cae) was measured on the commit both of those PRs were based on, i.e. before they landed, so it does not contradict this. Their local port of the same change on13f91caestopped the removal (600 s runs, no device removal).Not changed by these:
host_desc(crates/victory-gpu/src/resource.rs) still keepsALLOW_UNORDERED_ACCESSon these textures, so with the debug layer onGetResourceAllocationInfostill reports them (KainanP measured that this does not remove the device without the debug layer). TheB4G4R4A4_UNORMcolour target whose RTV removes the device on NVIDIA (debug id 599) is a separate failure tracked in #735 and #2563.Proposed for closing as fixed in
main(#1273 and ea488a9/#2462,fitsincrates/victory-gpu/src/descriptor/host.rs). This issue will be closed in 48 hours unless the reporter replies or a maintainer removes thetriage: proposed closelabel. If a run on63bcca4or later on NVIDIA still removes the device right after aB5G5R5A1unordered view (debug id 342), please post the commit, GPU, driver and the debug-layer lines, and this stays open.Generated by Claude Code
@KainanP on GitHub · 2026-11-25 19:35 UTC · original
One test of the open #1753 PRs, measured on an affected NVIDIA card plus Intel and WARP
There are about 20 open PRs for this bug. I ran the same two-part reproduction test against each one that merges, so they can be compared directly. No game, no game data.
Machine: Windows 11 Home 26200. DXGI adapter 0: RTX 4060 Laptop GPU (10de:28a0, driver 610.47 / UMD 32.0.16.1047). Adapter 1: Intel UHD Graphics (8086:a78b, 31.0.101.5445). Also WARP (10.0.26100.9818).
mainat13f91cae. The D3D12 debug layer (SDK layers) is not installed here. Results come fromGetDeviceRemovedReasonand the process exit code.What each adapter reports (
CheckFeatureSupport, then a plainCreateCommittedResource64x64 without a cast list)None of these plain creations removes the device. They just return E_INVALIDARG. Two things here differ from what the PR descriptions say:
RENDER_TARGET = nofor 115. It does not report support and then refuse, which is the premise of #2305 and #2332. Onmainthe 115 target gets a host texture anyway, because it is created with a castable-format list (CreateCommittedResource3). What removes the device is the render target view in 115.maindoes not crash. Instead the castable creation is refused, so the B5G5R5A1 texture gets no host texture at all. Half (a) is not NVIDIA-only.The reproduction test (on
main, without the game)Branch
KainanP/VIctory@test/1753-packed-format-repro, one commitc2fce178. It adds two tests toresource.rsthat go through the crate's normal paths:nvidia_1753_b5g5r5a1_texture_asking_for_unordered_access: a placed B5G5R5A1 title texture whose usage asks for unordered access, then a second title texture on the same memory (the shared path's allocation-size query), then its UAVs throughdescriptor::host::make_view, once in B5G5R5A1 and once without a description. Passes if the device is alive after each step.nvidia_1753_b4g4r4a4_colour_target: a B4G4R4A4 colour target and the title's RTV record, bound the wayset_targetsbinds it (host.rtv). Passes if the device is alive and the host texture is one the host renders to. If it is not, the title's draws to it are lost.On
mainwith the RTX, both tests fail withDXGI_ERROR_INVALID_CALLdevice removal. (a) fails at the UAV in 86 and (b) fails at the RTV in 115. On WARP both pass. On Intel, (a) fails because there is no host texture and (b) passes.Per PR (RTX 4060 unless noted; PR heads as of this comment)
"Suite" means
cargo test -p victory-gpuwithheap_direct_texture_reads_mark_their_heap_indexskipped (#2571). On this RTX,mainitself fails 2 tests,dynamic_slots_are_held_until_releasedandlists_share_a_table_and_copies_keep_their_views(capped view heap). "none" means the PR adds no failure beyond those 2. No PR touchesvictory-shader.13f91caemainf1e53b87)#[ignore])3502e6c5)fits35588589)ce9d6fda)73a602b1)fitsa1ac77f3)fitsf88e3ef4)make)644aed49)main's README)--cpu-percent, DXIL dumps)a4abd078)draw.rs:421,list.rs:1016need&texture); tested with that fixe0e5096f)6b966912)97df7659)151fa7d7)fits, butview == 0returns before the new checkf7cb3f3e)d1dc7ad4)0e350ab1)pc_format(adjacent arms; keptmain's 118 to 120)pc_format(118) == 45, main now maps it to 20)dbce84b5)CreateRenderTargetView(None, None, ..), removes the device itselfNot run:
capture.rs: it decodes captures and cannot affect either half.make_texturehas been rewritten since (real conflict).descriptor/host.rs,list.rsandtexture.rs. It uses the same R8G8B8A8 widening idea as #2626.Intel UHD (local adapter hook), a selection:
maina_texture_written_in_one_format_reads_in_another_through_a_placed_view)WARP (
--features diagnostics,VICTORY_D3D12_WARP=1):main, #1843+#1832 and #2626 all pass both halves and the full suite (0 failures). The fixes are no-ops there because WARP stores to and renders 86 and 115.Semantic differences
fitsthen refuses every UAV and the slot is null, so a shader that stores to it writes nothing. This is the only kind of (a) fix that also works on Intel, wheremaingets no texture at all. It also keeps the flag out of the plain description thatGetResourceAllocationInfosees (the debug-layer error quoted in this issue). Here, without the debug layer, that query did not remove the device. #2459's test asserts!takes(86)unconditionally, so by reading it would fail on hosts that store 86 (WARP, AMD).CreateUnorderedAccessViewand crashes the process on this RTX.castable(86)always contains R16_* formats, so the flag stays and the UAV in 86 is still made.Recommendation
fitsbecause #2626 removestyped_store. I resolved it by keeping #1763's check and definingtyped_store(f)ascrate::resource::format_support(f).contains(D3D12_FORMAT_SUPPORT1_TYPED_UNORDERED_ACCESS_VIEW). With that, #2626 + #1763 pass both halves on the RTX and the suite shows only the 2 known failures.Reproduce
The Intel runs used a local adapter-selection hook (
VICTORY_TEST_ADAPTER=Intel) that is not upstream. The format table came from a throwaway test that callsCheckFeatureSupportand a plainCreateCommittedResourceon every DXGI adapter plus WARP.Tested with the help of an AI assistant (Claude Code).
@MoonYueya on GitHub · 2026-11-25 22:19 UTC · original
Follow-up on
13f91cae: 83 commits later, the pre-menu device removal is unchangedSummary
At
13f91caee25f2fdf2c062be5f7a27f058e51cbcathe title still removes the device before any menu appears. Two runs, same binary, same linked overlay, same title executable:0x887A0005VICTORY_D3D12_DEBUG=1 GBV=1 DRED=10x887A0005The debug-layer timeline (run B, microseconds):
DRED breadcrumbs are empty, so this is a CPU-side invalid call.
What did not move across the 83 commits
This is the part I think is worth recording, because a lot of GPU work landed in this range (heap/view/descriptor rework, texture placement, copy tracking) and yet:
940d32f613f91caetitle slot past the host heaphost view heap capped at 1000000no host textureno room for the null buffer viewsAnd the two code sites behind the two loudest ids are untouched:
const PORTABLE_VIEWS: u32 = 1_000_000;(crates/victory-gpu/src/descriptor/host.rs:87) — unchanged.D3D12_ROOT_SIGNATURE_FLAG_SAMPLER_HEAP_DIRECTLY_INDEXEDis still set unconditionally (pipeline/host.rs:784,victory-shader/src/emit/host.rs:255) with no matching sampler-heap bind.I also checked whether the two open proposals that address the fatal call have landed: they have not.
fits()still short-circuits a format-less view withreturn !typeless;(host.rs:1295), without consultingtyped_store(); andresource.rscontains no stripping ofALLOW_UNORDERED_ACCESS.What I could and could not test
I ported those two proposals locally (never pushed) onto
13f91cae— the format-less-view guard change plus the flag strip. With the patch the device is no longer removed: two 600 s runs completed withdeviceRemoved=0,panic=0, 0 untranslated shaders, a steady 30 fps and max frame 16384.But they did not reach the world, so this is not evidence that the port fixes playability. Both runs came to rest on the account-picker screen and stayed there for the remaining ~16 minutes (frame fingerprint unchanged from frame 2048 to frame 16384). That is my input script's shortcoming, not a claim about the title.
Consequently, everything world-side is untested here: the frame rate, the two material pixel programs, and audio. I am reporting this only so the "did the patch work?" question is not read as answered.
Reproduction
cargo build --profile diag -p victory --features diagnosticsVICTORY_D3D12_DEBUG=1(addGBV=1 DRED=1for the ids above).Input was fully automated: the title reads its key timeline from an environment variable inside its own process; no synthetic input was sent to the desktop and no window was brought to the foreground.
Machine: NVIDIA RTX 3080 10 GB, driver 32.0.16.1742; AMD Ryzen 7 7700; 31.1 GB RAM; Windows 11 build 26300. TDR settings at OS defaults.
Written with AI assistance: the builds, runs and log analysis were carried out by an AI agent on the author's machine.
@JurajSimicevic on GitHub · 2026-11-26 11:34 UTC · original
Closing as fixed on
main, as the triage above says. #1273 andea488a9(#2462) check every typed unordered view against the format it is made in. TheB5G5R5A1_UNORMview is now refused and its slot stays null, so it no longer reachesCreateUnorderedAccessView.Checked on the RTX 5080 (driver 32.0.16.1742) with plain
main63bcca4: a diag build, run withVICTORY_D3D12_DEBUG=1andVICTORY_D3D12_DRED=1, nothing else added.an unordered view in a format the host cannot store, once).mainremoved the device on this card about 6 s after start, before any menu.The
B4G4R4A4_UNORMrender target (debug id 599) is a separate failure, tracked in #735 and #2563.AI-assisted.
@zdaniukdmitry on GitHub · 2026-11-26 16:49 UTC · original
Confirmed on a desktop RTX 4060 (8 GB, driver 610.88, Windows 11 26300), plain
main63bcca4, no local changes, title 1.0.2.1: the boot-time removal is gone. Menus run at30 fps; the world is reached and drawn (3.9k–5.3k draws/frame). A 10-minute run had no
device removal and an empty
crashes.log, and it played through the intro into theprologue — sound is there, but the picture stays almost black apart from credits and
subtitles (the black-world side of that belongs in #71). Before this fix the same card
died on the first submission with
B4G4R4A4_UNORMas a clear value andB5G5R5A1_UNORMas a typed UAV, which I had worked around by mapping 85/86/115 toB8G8R8A8_UNORMlocally — that workaround is no longer needed.Still refused on this card: compute pipelines needing wave64 (
host pipeline refused 0x80070057), as in #2220.Assembled with an AI assistant from local logs; I reviewed the text.