NVIDIA RTX 3060: device hung/removed entering the world: view heap cap at 1M, wave64-only compute shaders #3330

Open
opened 2026-11-26 18:29:24 +00:00 by github-bot · 0 comments
Owner

@⁠eda9777cz-gif on GitHub · 2026-11-26 18:24 UTC · original

Setup

  • GPU: NVIDIA GeForce RTX 3060 12 GB, driver 32.0.16.2140 (2026-11-21)
  • CPU: Intel Core i5-11400F, Windows 10.0.26200
  • VIctory at 63bcca4 ("update readme"), Series 1.0.2.1, diag build, VICTORY_D3D12_DRED=1

Stock 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:

  1. View heap cap. host view heap capped at 1000000 ... count=1245184. After that there are ~40,000 title slot past the host heap warnings (index up to ~975k). HEAP_VIEWS is 1 << 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).
  2. Wave size. The debug layer reports Shader wants wave lane count of 64 but maximum wave lane count for device is 32 for ~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 at HEAP_VIEWS - 2/-1 fit. The game then gets through loading into the intro cutscene: the credits are drawn, there is audio, and it doesn't crash.
  • One hang left: DRED points at WindNew: CS_CopyLatestWindFieldForRenderingWithSmooth (00167d58cc5a78d7, 4x4x4 threads, dispatch 16x16x16). It never completes within the TDR timeout on the 3060. With VICTORY_SKIP_PIPELINES=00167d58cc5a78d7 the game runs on.
  • wave64 programs as wave32 (wave = 32 in lower.rs): most refused pipelines are now created. This variant also split the XboxBvhBuilder.dll programs 28918b7150a7aad5 and caa78b8ca62bc3d6 (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 include tiled_lighting: CS_MaterialTiles* / CS_ShadowRevealTiles*, deferred_tiled: CS_DepthProcessingHBO, shader_binning_utils, shadowmask, sr_tracing, indirect_light_probes, lens_flares and subsurfacescatter. 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

**@⁠eda9777cz-gif** on GitHub · 2026-11-26 18:24 UTC · [original](https://github.com/Marvisak/VIctory/issues/3330) ## Setup - GPU: NVIDIA GeForce RTX 3060 12 GB, driver 32.0.16.2140 (2026-11-21) - CPU: Intel Core i5-11400F, Windows 10.0.26200 - VIctory at `63bcca4` ("update readme"), Series 1.0.2.1, `diag` build, `VICTORY_D3D12_DRED=1` ## Stock 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: 1. **View heap cap.** `host view heap capped at 1000000 ... count=1245184`. After that there are ~40,000 `title slot past the host heap` warnings (index up to ~975k). `HEAP_VIEWS` is `1 << 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). 2. **Wave size.** The debug layer reports `Shader wants wave lane count of 64 but maximum wave lane count for device is 32` for ~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 at `HEAP_VIEWS - 2/-1` fit. The game then gets through loading into the intro cutscene: the credits are drawn, there is audio, and it doesn't crash. - **One hang left:** DRED points at `WindNew: CS_CopyLatestWindFieldForRenderingWithSmooth` (`00167d58cc5a78d7`, 4x4x4 threads, dispatch 16x16x16). It never completes within the TDR timeout on the 3060. With `VICTORY_SKIP_PIPELINES=00167d58cc5a78d7` the game runs on. - **wave64 programs as wave32** (`wave = 32` in `lower.rs`): most refused pipelines are now created. This variant also split the XboxBvhBuilder.dll programs `28918b7150a7aad5` and `caa78b8ca62bc3d6` (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 include `tiled_lighting: CS_MaterialTiles*` / `CS_ShadowRevealTiles*`, `deferred_tiled: CS_DepthProcessingHBO`, `shader_binning_utils`, `shadowmask`, `sr_tracing`, `indirect_light_probes`, `lens_flares` and `subsurfacescatter`. 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](https://github.com/user-attachments/files/35477735/issue.md)
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 18:29:24 +00:00
This discussion has been locked. Commenting is limited to contributors.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github/Marvisak--VIctory#3330
No description provided.