NVIDIA (RTX 3080): device removed on null/unsupported views during world load — two fixes + one open hang #392
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#392
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?
@Lancito01 on GitHub · 2026-11-24 02:53 UTC · original
Summary
On an NVIDIA RTX 3080, GTA VI under VIctory loses the D3D12 device during the world load (before or at the first cinematic). DRED breadcrumbs (
--profile diag --features diagnostics,VICTORY_D3D12_DRED=1) point each time at a dispatch whose UAV slot holds a null descriptor. AMD appears to tolerate these; NVIDIA removes the device.Two of the three causes have a working fix (patch attached). The third needs a design-level change, so I'm reporting it rather than patching it.
Environment
d2a4bae(main, 2026-11-24) + attached patchcargo build --profile diag -p victory --features diagnosticsvictory run --execute <game exe>withVICTORY_D3D12_DRED=1, no skipped pipelinesHang 1 — UAV on a depth-stencil texture (fixed)
op 5, kind 10), meshae9ee9074f2e971f/ pixel54e55d28e6ee4f5c, command 2131 of 4974;u8→ heap 330192: null.R16_TYPELESS, flags0x2).fits()refuses it (view the host does not allow), and the slot becomes a null view.depth_scratch()indescriptor/host.rsgives such views a per-texture scratch texture (same size, typeless family,ALLOW_UNORDERED_ACCESS; view format mapped toR16_UINT/R32_UINT). Writes land in the scratch, so that effect is wrong, but the device survives. Logged once asdepth UAV: scratch stand-in(seen: format 53, 768×768).Hang 2 — packed 16-bit colour textures not creatable on NVIDIA (fixed)
899bc578934bc5be, command 1129 of 3363;u8→ heap 329720: null.no host texture(E_INVALIDARG) for two 2560×1440 textures:B5G5R5A1_UNORM(86) with RT|UAV (flags 5) andB4G4R4A4_UNORM(115) with RT (flags 1). NVIDIA doesn't support these as render targets / typed UAVs, so every view of them is null.resource.rsstores formats 86/115 asR16_TYPELESS(same bytes per pixel, so copies line up; clear value →R16_UNORM), andfits()maps their views toR16_UNORM(SRV) /R16_UINT(UAV). Channels read as raw 16 bits, so the content is wrong, but the textures exist. After this, nono host textureerrors before device removal.Hang 3 — slots that were never written (open)
e06a21f3cea46973;u4→ heap 339972: null,u6→ heap 726: null.null_for()already notes the hardware "does not survive" that in general; NVIDIA consistently removes the device. A real fix likely needs the null view to match the translated shader's declared resource type per slot, which is beyond a local patch.Also seen (may be related)
+0x23cf683, crash annotationGPU Loc Sig = 7333478d) killed a diag run ~2 min into loading. The same watchdog fires under XCL. The title's physical pool was at 2.12 / 2.31 GB.without a host pipeline, indirect).Attached
nvidia-null-view-fixes.patch— the two fixes above, againstd2a4bae.No logs, dumps or game files are attached; I can rerun with specific
VICTORY_*settings if that helps.@Lancito01 on GitHub · 2026-11-24 02:54 UTC · original
File attached.
nvidia-null-view-fixes.txt
@ChruutvoLuzi on GitHub · 2026-11-24 03:07 UTC · original
Tried the first part of the patch (the depth-UAV scratch stand-in) on another NVIDIA card. RTX 4090, driver 621.01, Windows 11, diag build,
VICTORY_D3D12_DRED=1, the first mission's opening. Base:d2a4baewith #189, #205, #206, #134, #123, #89, #136, #193, #282 and #388 merged locally. I left out the packed 16-bit part because #89 already makes those textures creatable here.It does what it says: the stand-in is made once per run,
depth UAV: scratch stand-in format=53 width=768 height=768, for the sameR16_TYPELESSdepth texture whose UAVfits()refuses (view the host does not allow unordered=true format=53 flags=2shows up once in every run on this card).On this card it doesn't stop the hang, though. The world ran about 55 s, then a 5.5 s submission and
0x887A0006, with DRED atmesh 1 [mesh 8c8f0165ddd5199d, pixel 4cde906781d9b043], the same pair a 5070 Ti run in #71 stopped at.About the Hang 1 signature: of 13 runs on this card without the patch that ended in the hang, DRED stopped at
ae9ee9074f2e971f/54e55d28e6ee4f5conce. The other 12 stopped in 11 different mesh or compute programs, and in #71 skipping single programs just moves the stop. So a run that no longer stops at that dispatch may not mean the hang is gone. How long did the world run on the 3080 with the patch, compared with without it?AI-assisted (Claude Code).
@FrancescoGelosoEterea on GitHub · 2026-11-24 03:27 UTC · original
The packed 16-bit part also needs the render target view remapped. Without that, on an RTX 5070 Ti it ends in
DXGI_ERROR_INVALID_CALLabout 5 s into the world.Setup
RTX 5070 Ti, driver 621.24, Ryzen 7 9800X3D, Windows 11 Pro 26300, Xbox Series 1.0.2.1 (own copy), Series X mode.
d2a4bae+ #336 + the attachednvidia-null-view-fixes.txt(both parts). Diag build,VICTORY_D3D12_DRED=1. Each run entered the world from the start screen.What happens with the patch as attached
depth UAV: scratch stand-in format=53 width=768 height=768, once per run.no host texturewarnings for formats 86 and 115 are gone.0x887A0001(INVALID_CALL), not the usual0x887A0006hang. DRED has no breadcrumbs. Without the patch, #336 alone lasted 47 s in the world before the #71 hang.With
VICTORY_D3D12_DEBUG=1the debug layer names the call:fits()remaps the SRV/UAV formats of these textures, but render target views are made inHost::rtv(crates/victory-gpu/src/host.rs), which doesn't go throughfits(). So it still asks for B5G5R5A1/B4G4R4A4 on the R16_TYPELESS resource.Fix
The same remap in
Host::rtv:Result with the fix
Same build plus the diff above, with
VICTORY_D3D12_DEBUG=1 VICTORY_D3D12_DRED=1:CreateRenderTargetViewerror, and no INVALID_CALL.0x887A0006. The debug layer was on, so the time isn't directly comparable to the 47 s without it.'title buffer 0x1ce0000+0xae00000'with before stateUNORDERED_ACCESSwhile the resource is still inVERTEX_AND_CONSTANT_BUFFER(assumed at first use), id 527, a few times per run.So with the RTV remap, the packed 16-bit part no longer breaks anything on this card, but it doesn't fix the hang either.
@Lancito01 on GitHub · 2026-11-24 03:43 UTC · original
Release-build results on the RTX 3080 (
d2a4bae+ the attached patch + theHost::rtvremap from the comment above), with a comparison to earlier release runs on the same machine. No debug layer or DRED, so the times are comparable.d2a4baeHost::rtvremap + queue-wait experiment (below)With the RTV remap, the first cinematic is actually drawn. Near the end of run 3 there were about 4,254 draws per frame; runs 1 and 2 drew about 300 and dropped most of the rest. The last frames:
On screen: no picture and no captions any more (earlier runs showed captions stacking on a black frame), choppy audio, then
0x887A0004with no breadcrumbs. Together with the 5.5 s submission ChruutvoLuzi saw, this looks like a timeout (TDR) from the cost of a fully drawn frame, about 1 s of copies plus 1.3 s of GPU time, rather than one bad command.Queue-wait experiment, ruled out here.
ID3D12CommandQueue::Waitis a no-op inqueue.rs, and since submissions run synchronously, a wait the title issues before the signalling work is submitted would let dependent work run first. Another project reported that kind of ordering bug causing their black screen. I tried holding the submitting thread inWaituntil the fence is reached (500 ms timeout, opt-in withVICTORY_QUEUE_WAIT). In run 3 the timeout never fired: zero waits timed out. I didn't log how many waits actually blocked, so I can't say whether it reordered anything, but it didn't stop the hang. The diff is small and I can post it if anyone wants to test it elsewhere.Not tried: a longer
TdrDelay, which would show whether the frame finishes or really hangs.AI-assisted (Claude Code).
@marcogravbrot on GitHub · 2026-11-24 04:49 UTC · original
A finding from an RTX 3080 Ti that may explain part of this (world stalls of several seconds, then
DEVICE_HUNG), measured withVICTORY_GPU_TIMING=1and a D3D12 debug-layer run.One dispatch took 6.3 s on the GPU every frame:
depth_pyramid:CS_InitDepthPyramidWithCpuOcclusion3x3(128x64 groups). Its loop bounds are quotients of dimensions it reads with scalar buffer loads from two small structured SRVs (16- and 20-byte structures, one element each). The title's memory held sane values; the shader got zeros for every dword after the first, so a divisor was 0, the bound became infinite and every loop ran to the 2^20 limit.Why zeros. A scalar
s_buffer_loadof an SRV is lowered through a raw handle while the host view is the title's structured one. On NVIDIA that combination does not read bytes: with a view of 16-byte structures, byte offset 4 returned dword 4 (the offset is taken as an element index) and byte offset 24 returned 0 (past the element count). A hand-assembled test on the test host shows it: reading bytes 24 and 4 of[100, 101, ...]gives[0, 104]instead of[106, 101].Things I tried on this GPU, in case they save someone time:
E_OUTOFMEMORY(seen from 336 bytes in one shader, 2044 in others).CreateShaderResourceView: ... FirstElement must be a multiple of 4), which title views often do not.byte >> 2, element offset 0), root views staying raw. With that the dispatch above takes well under a millisecond and GPU time per world frame fell from about 8 s to about 0.2 s.Not a complete fix for this issue: after it I still see page faults from unbounded reads and frames dominated by CPU-side copies.
@walterwallaceson on GitHub · 2026-11-24 08:07 UTC · original
RTX 3070 / Windows 10 data point for the runaway-loop explanation above (marcogravbrot's zero reads): with
VICTORY_SHADER_LOOP_LIMIT=4096the world hang goes away here, and the title reaches player control for the first time on this machine.Setup
d2a4bae+ #233/#320/#439 (f653ea4), #55, #89, #336, #334, #493 + #483 (conflict resolved as described on #493), #688 (0a146af), #581 (0a936b6)take_dynamic, since #688 removesState::dynamic.resource.rs. I kept #89'starget_formatand left out #581's packed 16-bit R16_TYPELESS fallback (it would never fire after #89), like the RTX 4090 test above.cargo build --profile diag -p victory --features diagnostics(the loop limit is diagnostics-only)Before: run 16, default limit (2^20),
VICTORY_D3D12_DEBUG=1+VICTORY_D3D12_DRED=1depth UAV: scratch stand-in, format 53, 768×768); 0 debug-layer errors.DXGI_ERROR_DEVICE_HUNG. DRED: one list stopped at command 150 of 172 onDispatchMesh(op 42); every later list in the submission never started. It still reached only the loading screens.After: run 17,
VICTORY_SHADER_LOOP_LIMIT=4096, no debug layer, no DREDCompared with the longest default-limit run (release, same stack minus #581, ~11 min), over the world part of each run:
0x887A0006after a 15.5 s submissionslow host submissionWith the limit, a late world frame is ~980 ms: ~560 ms preparing (copies ~365 ms, ~230 MB), ~190 ms on the GPU, ~210 ms copying back. So the frame is now bound by CPU-side copies, not GPU time. The dynamic slots still run out (dropped draws reach 131072), and the late frame lines still report ~1,050 draws dropped without a host pipeline and ~1,600 indirect.
So on this GPU the world hang looks like loops running to 2^20 rather than a bad descriptor: the typed nulls from #581 don't stop it (run 16), and capping the loops does. Caveat: the default-limit release runs above didn't include #581, so the comparison isn't a single-variable one, though run 16 shows #581 alone doesn't remove the hang. That fits the zero reads through structured views described above; I haven't tested #704 / #709 / #437, which target those reads. One run with the limit so far.
No game data in this report.
AI-assisted (Claude Code); everything above was run on my machine.
@walterwallaceson on GitHub · 2026-11-24 10:11 UTC · original
Follow-up from the RTX 3070 / Windows 10 machine above, on current
mainwith the stack rebuilt from today's PR heads. Short version: no crash and no device errors in 15 minutes, player control reached at about 1 fps, but the world draws nothing (black).Setup
main8e79c80+ #175, #55, #89, #439 (1ca87f7), #334, #493, #483, #688 (bf4e37e), #581, #704 (42538cd). #336 is inmainnow.cargo build --profile diag -p victory --features diagnostics,VICTORY_SHADER_LOOP_LIMIT=4096, no debug layer, one 15-minute run ended by a scriptMerging notes, for anyone building the same stack
main: #680 changed the footprint upload incopy_texture_regiontolist.defer_fill(the Wine fix), while #89 moved that code intoprepare_footprint_upload. I kept #89's helper and useddefer_fillin it. The two other hunks inlist.rskeep both checks, #89'sskip_mixed_packed_copyfirst, thenmain'stitle_writtenupload.resource.rs: same as before. I kept #89'starget_formatand left out #581's packed 16-bit fallback.take_dynamic(one line).mainboth add a line tovictory config. I kept both.Run, compared with the older stack plus #704
d5b23e1The title gets through the account screen, the loading screens and the first cutscene (subtitles over black) to the movement hint, so the game side runs. Nothing of the world is visible. The flat colour has changed with each stack (grey, then near-white, now black), so I can't call it progress or a regression yet.
Two once-warnings also appeared on the older stack:
no free dynamic descriptor slots: a table is not made(n=130, about 3 minutes in), and #704's 65,536 raw-view slots filling up once, about 9 minutes in. The view heap is still capped at 1,000,000 here (the title asks for 1,245,184).Next I'm looking at why nothing is drawn, with the debug layer on this stack. Suggestions for what to log are welcome.
I'm testing with Claude's help, and Claude drafted this comment.
@MichaelSmithAI on GitHub · 2026-11-24 11:24 UTC · original
For the measured 6.3-second
CS_InitDepthPyramidWithCpuOcclusion3x3dispatch, can you tell from your existing shader metadata whether the original PSV0 declares structured SRVs at the exact two table bindings used by the scalar loads? The register, space and binding kind for each would be enough. The GPU capture already identifies the runtime views as single 16- and 20-byte records.That distinction would tell us whether the declaration-based scalar-load change covers this shader. In a synthetic comparison it preserved the raw-buffer case and read the expected word from a structured view; its effect on this depth-pyramid pass is unmeasured. Comparison branch and numeric test
@ByMateos on GitHub · 2026-11-24 13:19 UTC · original
Another NVIDIA data point, on newer main: same null-descriptor signature, and skipping the faulting program only moves the stop (as in #71).
Setup: RTX 3070 Ti, driver 621.35, Windows 11 Pro 26300, 32 GB. VIctory
ffe310e(main, 2026-11-24), no extra patches. Diag build,VICTORY_D3D12_DEBUG=1 VICTORY_D3D12_DRED=1, entering the world from the start screen.Run 1 (no skips): world ran ~75 s at 0.4–1.5 fps (scene dark, audio fine), then 0x887A0006.
Run 2 (
VICTORY_SKIP_PIPELINES=a26422c01dcf5612): ~45 s in the world, then 0x887A0006 at a different mesh program:The same DRED report shows many other null slots in bound tables (
heap 338080: null×22,heap 330472×6, and others).Also seen: 426
shader does not translatewarnings per run; several compute pipelines refused with E_INVALIDARG (0709e8356abd9082,e4576c6eca0f8ce3,13dfdd3b1136e407);refreshesof 6–11 GB per 5 s report while in the world.So on
ffe310ethis still reproduces on Ampere 3070 Ti, consistent with the "not one program" reading. Logs available if useful.AI-assisted (Claude Code).
@Marvisak on GitHub · 2026-11-25 01:47 UTC · original
Automated triage for the maintainers.
Thanks for the report and the patch. Pull requests are open to everyone, so please open the fixes as a PR rather than an attached file, so they can be reviewed and tested in CI. What already exists for each part:
CreateRenderTargetViewINVALID_CALL that the attached R16_TYPELESS approach hit without theHost::rtvremap.main.null_for(crates/victory-gpu/src/descriptor/host.rs). A run onffe310ein the comments still shows null slots in bound tables before the hang.The device removal that remains in every run here (
0x887A0006, with the DRED stop moving between programs) is the NVIDIA world hang tracked in #71. This issue holds the null and unsupported-view part of it. If you post again, please include the NVIDIA driver version for the RTX 3080 runs.Generated by Claude Code