NVIDIA RTX 3060: device hung/removed entering the world: view heap cap at 1M, wave64-only compute shaders #3330
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?
Imported from Marvisak/VIctory. Originally posted by eda9777cz-gif on 2026-11-26T18:24:17Z.
Setup
63bcca4("update readme"), Series 1.0.2.1,diagbuild,VICTORY_D3D12_DRED=1Stock build
Menus, the intro video and loading run fine at 30 fps. Shortly after the world starts, the device is removed with
DXGI_ERROR_DEVICE_HUNG(0x887A0006). I found two NVIDIA-specific causes:host view heap capped at 1000000 ... count=1245184. After that there are ~40,000title slot past the host heapwarnings (index up to ~975k).HEAP_VIEWSis1 << 21, so translated shaders clamp indices to 2,097,151. That is past NVIDIA's 1,000,000-descriptor shader-visible heap, so on NVIDIA the clamp doesn't prevent the fault (the code's own shortcut comment says as much).Shader wants wave lane count of 64 but maximum wave lane count for device is 32for ~90 compute shaders, and their pipelines are refused (0x80070057). These include tiled_lighting, deferred_lighting/deferred_tiled, cascadeshadows_*, InstanceCulling, depth_pyramid, TAA, DepthOfField, GPU particles, hair_resolve and sr_tracing.Experiments (patch below)
HEAP_VIEWS = 1_000_000, with 4 slots reserved at the end of the capped heap so the null buffer views atHEAP_VIEWS - 2/-1fit. The game then gets through loading into the intro cutscene: the credits are drawn, there is audio, and it doesn't crash.WindNew: CS_CopyLatestWindFieldForRenderingWithSmooth(00167d58cc5a78d7, 4x4x4 threads, dispatch 16x16x16). It never completes within the TDR timeout on the 3060. WithVICTORY_SKIP_PIPELINES=00167d58cc5a78d7the game runs on.wave = 32inlower.rs): most refused pipelines are now created. This variant also split the XboxBvhBuilder.dll programs28918b7150a7aad5andcaa78b8ca62bc3d6(64 threads, LDS shared without barriers), and those hang the GPU. Keeping single-wave LDS programs (threads <= 64 with LDS) at wave64 avoids the hang. Those 64 programs stay refused, though. They includetiled_lighting: CS_MaterialTiles*/CS_ShadowRevealTiles*,deferred_tiled: CS_DepthProcessingHBO,shader_binning_utils,shadowmask,sr_tracing,indirect_light_probes,lens_flaresandsubsurfacescatter. The result: 2,000–3,000 draws/frame and no crash, but a black image (presumably no tiled lighting), with about 5 s/frame on the GPU.So on NVIDIA (and anything without wave64) the main gap seems to be running wave64 programs on 32-lane hosts, especially single-wave programs that share LDS without barriers. The heap-cap change looks like a cheap fix on its own.
Full patch: attached
victory-nvidia.patch.I can run test builds or collect logs on this machine if that helps.
(Investigated and written up with help from Claude.)
issue.md
Imported from Marvisak/VIctory. Originally posted by omarsaifuddin on 2026-11-28T14:12:30Z.
Same two causes as this issue on an RTX 3070 Ti (Windows 11, Ampere, wave size 32..32), and with the PRs below stacked it gets through the world load and renders the prologue instead of being removed. One card, one scene, so treat this as a data point, not proof.
What happens on plain main (
63bcca4): about 2 minutes after launch, as the world loads,DXGI_ERROR_DEVICE_HUNG(0x887A0006) in a 16x16x16 dispatch of compute00167d58cc5a78d7, in a submission that had already run 6.3 s (the 26-list submission in the report). The host view heap is capped (1245184requested, 1,000,000 granted) and ~310k title slots are dropped.What changed it, step by step
+0x5149aec, the pool crash in #698/#1232). It conflicts with #2683 (competing capped-heap fixes), so they cannot be stacked.E_INVALIDARG. With the debug layer (Graphics Tools installed) the reason isShader wants wave lane count of 64 but maximum wave lane count for device is 32(185 messages): the translator declaresWaveSize(64)for wave64 programs that use lane ops, and NVIDIA's maximum is 32.Emulate, picked automatically here) gets that to 117 refused, 0 of 1,637 host pipelines refused, and is what makes the picture look right: lighting and volumetrics work, and the prologue prison yard shows up with the figures behind the fence. #3200 stacked on it changed little.Stack used: main + #3226 + #2323 + #2885 + #3518 (hand-merged with #2885 in
descriptor/host.rs,emit/lower.rs,emit/mod.rs) + #3016 + #2348 + #3670 + #3496 + #3587 + #3588 + #189 + #3200, plus my local edits: table size+ 1and span 0 inState::tables, 2^18 dynamic slots with 410,176 direct and 327,680 overflow on the capped path, andROOT_VIEW_RUN16 (I did not isolate that last one; it did not visibly change the held-slot count). #2091 and #3115 conflict with #189 and were left out.victory-gpupasses 236/0; #189's wave64 tests pass 40/0 on the 3070 Ti. One of #3200's tests (gpu_128_threads_ds_swizzle_and_dpp_row_mask) fails on WARP (4-lane waves) in Emulate mode while passing on the NVIDIA and AMD adapters.Still wrong: 117 shaders refused (51 LDS without a uniform fence in split wave64, 49 divergent 64-lane ballots, 10 divergent reductions, 4 divergent cross-lane reads, 2 LDS over 32 KiB), ~800 dropped draws and dispatches after 16 minutes (mostly "root view's offset: no root view, or outside title buffers" and the refused shaders), and some ghosted panels at the edges of the frame.
Imported from Marvisak/VIctory. Originally posted by omarsaifuddin on 2026-11-30T07:37:39Z.
An updated run on the RTX 3070 Ti (Windows 11, driver 32.0.16.2140, 1440p) with the stack from this thread plus #3822:
main63bcca4+ #189 + #3200 + #2703 + #2118 + #3016 + #2348 + #3670 + #3496 + #3587 + #3588 + #3226 + #2323 + #2885 + #3518 + #3822, plus the local capped-heap edits.The 51 LDS-fence programs are now the largest remaining class on this host.