NVIDIA world hang: mesh shaders read through root SRVs megabytes past the end of their title-memory copy (DMA page fault, Aftermath); fix on a fork #951

Open
opened 2026-11-24 14:26:35 +00:00 by gangg111 · 5 comments
gangg111 commented 2026-11-24 14:26:35 +00:00 (Migrated from github.com)
Contributor

Imported from Marvisak/VIctory. Originally posted by gangg111 on 2026-11-24T14:26:35Z.


Setup

  • VIctory based on d2a4bae, plus #459, #483 and local work; diagnostics build (--profile diag --features diagnostics)
  • Windows 11 Pro 26300, NVIDIA GeForce RTX 3080 10 GB (GA102), driver 621.01, no Resizable BAR
  • Retail GTA VI 1.0.2.1, Series X (default)
  • No game files or dumps attached.

How it was measured

Nsight Aftermath (Nsight Graphics 2026.4) in global mode with GPU crash dumps only, shader error reporting off. With shader error reporting on, the driver stops the title on accesses that are otherwise harmless, and every run blamed a different compute shader; those reports were not the hang. The dumps were decoded with the Aftermath SDK, the faulting PC mapped to DXIL via VICTORY_DXIL_DUMP and GFSDK_Aftermath_GetShaderHash.

Finding 1: the world's device removal is a page fault behind a root SRV

Every real hang in the world (7 dumps) is Device state: Error_DMA_PageFault, a read of a GPU address that does not translate, in a mesh shader (857b2e13c9cc107f, c962201cddbdd7dd, f0c7efd2aceb2aaa, c2b963cd8c154f0a, 37f363f0a5dcd806, 7f7b42a21c8e68e3, db4835a364449a45). The faulting instruction is a RawBufferLoad from t3, space1, the title's root SRV.

A root SRV is a bare GPU address without bounds. draw.rs::root_view gives it an address inside the copy (shadow) of the title buffer or loose window it points into, and the shader fetches vertices megabytes past that point, past the end of the copy. On the console that is more title memory; on the host it is the next allocation. Logging every root SRV's host range (VICTORY_ROOT_LOG) against the fault address:

  • a root SRV at title 0x71fffc900 had 14,080 bytes left in its 4 MiB loose window; the fault was 3 MB past the window's end, inside a freed BC7 2048x2048 texture placed right after it (Aftermath resource tracking);
  • other dumps: 3.2 MB and about 16 MB past the end of the copy;
  • one root SRV had 42 KB left before the end of the title's committed memory, and the shader read 741 KB past it. So the reads also go past committed memory (streaming pools; the console answers those reads with zeros, see also ivall/xcl#1031).

This matches #59 (c2b963cd8c154f0a is the mesh shader in the RX 9070 XT fault there) and probably part of #898.

Fix (on a fork)

Two commits on gangg111/VIctory branch gpu-189:

  • gangg111/VIctory@a3a8fe7 GPU: a root SRV gets a copy that holds 32 MB past it: a root SRV closer than 32 MB to the end of its copy gets a copy holding [address, address + 32 MB): a title buffer around it if there is one, else a window of title memory on a power-of-two grid (each byte in at most two windows).
  • gangg111/VIctory@94908df GPU: wide root SRV windows are sparse buffers backed from the root SRV on: a wide window is a reserved buffer. Tiles from the lowest root SRV in it to the end of the title's committed memory map a CPU-visible heap; the rest stay unmapped and read as zeros (tiled resources tier 2+), at no memory cost. A window grows when the title commits more (checked at most every 100 ms) or a lower root SRV comes.

Results on the RTX 3080:

world wide copies
before device removed 1-2 min after entering the world, every run -
reach 8 MB page fault again -
reach 32 MB, fully backed windows 5 min in the world, no hang 180 windows, 11.5 GB
windows cut at the committed end page fault again (reads past committed memory) 4.2 GB
reach 32 MB, sparse windows (gangg111/VIctory@94908df) no page fault in 7 runs of 8-10 min, 6 of them to the end 206 windows, 3.2 GB

The seventh run ended in a TDR: a single 6.4 s list of compute work, no page fault, no Aftermath dump. That looks like the #898 family, not this one.

Finding 2 (preliminary): the world stays black because most indirect mesh records run empty

With the hang gone the world still presents black. Render target dumps (VICTORY_DUMP_TARGETS) at frames 1900 and 2000 show the geometry (a per-pixel class buffer written by compute has the opening cutscene's characters, scaffolding, a crane), but the RGBA8 G-buffer targets are all zero, although about 944 indirect mesh executions and 50 direct mesh dispatches target them and run. In a PIX capture of a world frame, 4,366 ExecuteIndirect calls expand to only 202 executed commands, with zero pixel shader invocations attributed to them. None of these executions use a count buffer.

Raising the argument clamp's per-list budget in indirect.rs (BUDGET 2^27 to 2^31, VICTORY_INDIRECT_BUDGET_LOG2=31, a local knob) made the G-buffer targets at frame 1950 hold the world (power line pylons with wires, the water surface, the sky in the normal target). The final image is still black, so lighting or later passes lose it too. A same-frame A/B against the default budget is running; I will add it here. If it holds, records with garbage arguments (from passes that do not translate) use up the budget early in a list, and every later record runs empty. Note that #898 lowered the budget without curing its hang, which is a different symptom.

Also found earlier: NVIDIA reads a raw view of a structured SRV only up to NumElements * 4 bytes

ByteAddressBuffer.Load through a structured SRV returns zero past NumElements * 4 bytes on NVIDIA (WARP reads the whole buffer). A shader that the translator lowers to raw loads on a structured table slot therefore reads zeros on NVIDIA, which made the world's cascade loops run to the loop limit. Fixed on the same branch in gangg111/VIctory@0a4b89f (raw views for table slots a shader reads only raw). Related: #704, #709.

AI-assisted (Claude).

<!-- greyfinch-sync:Marvisak/VIctory:issue:6584020559 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/issues/951). Originally posted by [gangg111](https://github.com/gangg111) on 2026-11-24T14:26:35Z. --- ### Setup - VIctory based on `d2a4bae`, plus #459, #483 and local work; diagnostics build (`--profile diag --features diagnostics`) - Windows 11 Pro 26300, NVIDIA GeForce RTX 3080 10 GB (GA102), driver 621.01, no Resizable BAR - Retail GTA VI 1.0.2.1, Series X (default) - No game files or dumps attached. ### How it was measured Nsight Aftermath (Nsight Graphics 2026.4) in global mode with **GPU crash dumps only**, shader error reporting off. With shader error reporting on, the driver stops the title on accesses that are otherwise harmless, and every run blamed a different compute shader; those reports were not the hang. The dumps were decoded with the Aftermath SDK, the faulting PC mapped to DXIL via `VICTORY_DXIL_DUMP` and `GFSDK_Aftermath_GetShaderHash`. ### Finding 1: the world's device removal is a page fault behind a root SRV Every real hang in the world (7 dumps) is `Device state: Error_DMA_PageFault`, a read of a GPU address that does not translate, in a **mesh** shader (`857b2e13c9cc107f`, `c962201cddbdd7dd`, `f0c7efd2aceb2aaa`, `c2b963cd8c154f0a`, `37f363f0a5dcd806`, `7f7b42a21c8e68e3`, `db4835a364449a45`). The faulting instruction is a `RawBufferLoad` from `t3, space1`, the title's root SRV. A root SRV is a bare GPU address without bounds. `draw.rs::root_view` gives it an address inside the copy (`shadow`) of the title buffer or loose window it points into, and the shader fetches vertices megabytes past that point, past the end of the copy. On the console that is more title memory; on the host it is the next allocation. Logging every root SRV's host range (`VICTORY_ROOT_LOG`) against the fault address: - a root SRV at title `0x71fffc900` had **14,080 bytes** left in its 4 MiB loose window; the fault was **3 MB past the window's end**, inside a freed BC7 2048x2048 texture placed right after it (Aftermath resource tracking); - other dumps: 3.2 MB and about 16 MB past the end of the copy; - one root SRV had 42 KB left before the end of the title's **committed** memory, and the shader read **741 KB past it**. So the reads also go past committed memory (streaming pools; the console answers those reads with zeros, see also ivall/xcl#1031). This matches #59 (`c2b963cd8c154f0a` is the mesh shader in the RX 9070 XT fault there) and probably part of #898. ### Fix (on a fork) Two commits on `gangg111/VIctory` branch [`gpu-189`](https://github.com/gangg111/VIctory/tree/gpu-189): - gangg111/VIctory@a3a8fe7 *GPU: a root SRV gets a copy that holds 32 MB past it*: a root SRV closer than 32 MB to the end of its copy gets a copy holding `[address, address + 32 MB)`: a title buffer around it if there is one, else a window of title memory on a power-of-two grid (each byte in at most two windows). - gangg111/VIctory@94908df *GPU: wide root SRV windows are sparse buffers backed from the root SRV on*: a wide window is a reserved buffer. Tiles from the lowest root SRV in it to the end of the title's committed memory map a CPU-visible heap; the rest stay unmapped and read as zeros (tiled resources tier 2+), at no memory cost. A window grows when the title commits more (checked at most every 100 ms) or a lower root SRV comes. Results on the RTX 3080: | | world | wide copies | |---|---|---| | before | device removed 1-2 min after entering the world, every run | - | | reach 8 MB | page fault again | - | | reach 32 MB, fully backed windows | 5 min in the world, no hang | 180 windows, 11.5 GB | | windows cut at the committed end | page fault again (reads past committed memory) | 4.2 GB | | **reach 32 MB, sparse windows (gangg111/VIctory@94908df)** | **no page fault in 7 runs of 8-10 min, 6 of them to the end** | **206 windows, 3.2 GB** | The seventh run ended in a TDR: a single 6.4 s list of compute work, no page fault, no Aftermath dump. That looks like the #898 family, not this one. ### Finding 2 (preliminary): the world stays black because most indirect mesh records run empty With the hang gone the world still presents black. Render target dumps (`VICTORY_DUMP_TARGETS`) at frames 1900 and 2000 show the geometry (a per-pixel class buffer written by compute has the opening cutscene's characters, scaffolding, a crane), but the RGBA8 G-buffer targets are all zero, although about 944 indirect mesh executions and 50 direct mesh dispatches target them and run. In a PIX capture of a world frame, **4,366 `ExecuteIndirect` calls expand to only 202 executed commands**, with zero pixel shader invocations attributed to them. None of these executions use a count buffer. Raising the argument clamp's per-list budget in `indirect.rs` (`BUDGET` 2^27 to 2^31, `VICTORY_INDIRECT_BUDGET_LOG2=31`, a local knob) made the G-buffer targets at frame 1950 hold the world (power line pylons with wires, the water surface, the sky in the normal target). The final image is still black, so lighting or later passes lose it too. A same-frame A/B against the default budget is running; I will add it here. If it holds, records with garbage arguments (from passes that do not translate) use up the budget early in a list, and every later record runs empty. Note that #898 lowered the budget without curing its hang, which is a different symptom. ### Also found earlier: NVIDIA reads a raw view of a structured SRV only up to `NumElements * 4` bytes `ByteAddressBuffer.Load` through a structured SRV returns zero past `NumElements * 4` bytes on NVIDIA (WARP reads the whole buffer). A shader that the translator lowers to raw loads on a structured table slot therefore reads zeros on NVIDIA, which made the world's cascade loops run to the loop limit. Fixed on the same branch in gangg111/VIctory@0a4b89f (*raw views for table slots a shader reads only raw*). Related: #704, #709. AI-assisted (Claude).
gangg111 commented 2026-11-24 15:04:05 +00:00 (Migrated from github.com)
Author
Contributor

Imported from Marvisak/VIctory. Originally posted by gangg111 on 2026-11-24T14:32:21Z.


Correction to Finding 2: the same-frame A/B does not support the budget explanation.

With the default budget (2^27), frame 1895 of the world has the G-buffer drawn: two RGBA8 targets hold the scene's geometry (normals of walls and ground, mean 20 and 61 of 255) and the depth-like target holds the same shapes. The all-zero G-buffer at frames 1900 and 2000 of earlier runs came from what was on screen at that moment (the opening cutscene), not from the clamp's budget, and the "raised budget" run that showed pylons and water simply landed on a gameplay frame. Please disregard that part.

What stands: in all variants the presented image stays black while the G-buffer has geometry, so the picture is lost in lighting or a later pass. The root SRV fix (Finding 1) and its measurements are unaffected.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7134540731 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/issues/951#issuecomment-7134540731). Originally posted by [gangg111](https://github.com/gangg111) on 2026-11-24T14:32:21Z. --- Correction to Finding 2: the same-frame A/B does **not** support the budget explanation. With the default budget (2^27), frame 1895 of the world has the G-buffer drawn: two RGBA8 targets hold the scene's geometry (normals of walls and ground, mean 20 and 61 of 255) and the depth-like target holds the same shapes. The all-zero G-buffer at frames 1900 and 2000 of earlier runs came from what was on screen at that moment (the opening cutscene), not from the clamp's budget, and the "raised budget" run that showed pylons and water simply landed on a gameplay frame. Please disregard that part. What stands: in all variants the presented image stays black while the G-buffer has geometry, so the picture is lost in lighting or a later pass. The root SRV fix (Finding 1) and its measurements are unaffected.
jamesn-xt commented 2026-11-24 17:04:47 +00:00 (Migrated from github.com)
Author
Contributor

Imported from Marvisak/VIctory. Originally posted by jamesn-xt on 2026-11-24T16:59:14Z.


Independent RTX 4080 reproduction and a synthetic regression test for the raw-table-view change described here.

Windows 11 x64 build 26200, Ryzen 5 5600, 32 GiB RAM, RTX 4080 / NVIDIA 617.42, Rust 1.98.1.

I backported gangg111's 0a4b89f onto the tested integration from #1096/#492, preserving the original authorship. API adaptations retain current heap-initialization safety and table-allocation failure handling, use #206's current raw-window argument order, and update current HostShader test initializers/cache metadata.

Source: https://github.com/jamesn-xt/VIctory/tree/test/rtx4080-raw-table-views

  • Backport: 5640d9819fb9d56a3006fd0d8f4790eacc51db1a (original author retained).
  • New regression test: 682eed07349a9e642d6031c0ee3db0e6bb78db50.

The new case reuses #206's synthetic read/write fixture, but starts the SRV on a 32-byte element boundary so the misalignment fallback cannot fix it. Four 32-byte records are read through a ByteAddressBuffer; all 128 bytes must match the generated numbered dwords, and existing write/canary checks remain.

  • Raw-only correction enabled: all 32 dwords match on RTX 4080.
  • Negative control VICTORY_RAW_SRV=0: the targeted test fails, returning the first 8 expected dwords and zeros for the remaining 24. This is the measured result, not a claim about the exact general hardware bound.
  • All-feature workspace tests: 360 passed, 6 ignored.
  • Workspace Clippy, all targets/all features, warnings denied: passed.
  • Diagnostics build and staged asset-policy hooks passed.

No title run with this backport yet, so it is not established as a fix for our 32-list device hang or black 3D output. The previous integrated runtime still produced a black 3D-stage frame and device removal as reported in #1096. No retail logs, game captures or title-derived fixtures are attached.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7138511988 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/issues/951#issuecomment-7138511988). Originally posted by [jamesn-xt](https://github.com/jamesn-xt) on 2026-11-24T16:59:14Z. --- Independent RTX 4080 reproduction and a synthetic regression test for the raw-table-view change described here. Windows 11 x64 build 26200, Ryzen 5 5600, 32 GiB RAM, RTX 4080 / NVIDIA 617.42, Rust 1.98.1. I backported gangg111's `0a4b89f` onto the tested integration from #1096/#492, preserving the original authorship. API adaptations retain current heap-initialization safety and table-allocation failure handling, use #206's current raw-window argument order, and update current HostShader test initializers/cache metadata. Source: https://github.com/jamesn-xt/VIctory/tree/test/rtx4080-raw-table-views - Backport: `5640d9819fb9d56a3006fd0d8f4790eacc51db1a` (original author retained). - New regression test: `682eed07349a9e642d6031c0ee3db0e6bb78db50`. The new case reuses #206's synthetic read/write fixture, but starts the SRV on a 32-byte element boundary so the misalignment fallback cannot fix it. Four 32-byte records are read through a ByteAddressBuffer; all 128 bytes must match the generated numbered dwords, and existing write/canary checks remain. - Raw-only correction enabled: all 32 dwords match on RTX 4080. - Negative control `VICTORY_RAW_SRV=0`: the targeted test fails, returning the first 8 expected dwords and zeros for the remaining 24. This is the measured result, not a claim about the exact general hardware bound. - All-feature workspace tests: 360 passed, 6 ignored. - Workspace Clippy, all targets/all features, warnings denied: passed. - Diagnostics build and staged asset-policy hooks passed. No title run with this backport yet, so it is not established as a fix for our 32-list device hang or black 3D output. The previous integrated runtime still produced a black 3D-stage frame and device removal as reported in #1096. No retail logs, game captures or title-derived fixtures are attached.
Marvisak commented 2026-11-25 07:03:29 +00:00 (Migrated from github.com)
Author
Contributor

Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T06:57:23Z.


Automated triage for the maintainers.

Thanks for the Aftermath work (RTX 3080, driver 621.01, Windows 11 26300, d2a4bae plus patches), and to @taovuokko for the run on current main.

Raw reads through structured views: confirmed on main (940d32f). buffer_srv in crates/victory-gpu/src/descriptor/host.rs mirrors the title's structured view as a structured host view with its stride. When the translated program reads that slot with raw loads, NVIDIA returns zeros past the first NumElements * 4 bytes, as measured here. The RTX 2080 Ti run ties the world's slowest compute program (8.7-13 s per dispatch) to this and shows that cost disappearing once such views are raw. #1762, which made that change, was closed without being merged. Open PR #2178 ("back structured buffer views with raw descriptors") appears to carry the same change. Review belongs there, including the 16-byte start alignment noted above.

Root SRV page fault: since d71c388, root_view in crates/victory-gpu/src/draw.rs binds a raw view over the whole host copy, so a read past the copy returns zero instead of faulting. Nobody has rerun Aftermath on current main yet. A run showing whether Error_DMA_PageFault in these mesh programs is gone would settle that part. The gpu-189 branch isn't in a pull request, and pull requests are open to everyone. The NVIDIA world hang is tracked in #71.


Generated by Claude Code

<!-- greyfinch-sync:Marvisak/VIctory:comment:7155333702 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/issues/951#issuecomment-7155333702). Originally posted by [Marvisak](https://github.com/Marvisak) on 2026-11-25T06:57:23Z. --- <!-- victory-issue-triage v1 verdict=confirmed seen=2026-11-25T09:36:33Z at=2026-11-25T09:50:38Z --> Automated triage for the maintainers. Thanks for the Aftermath work (RTX 3080, driver 621.01, Windows 11 26300, `d2a4bae` plus patches), and to @taovuokko for the run on current `main`. **Raw reads through structured views: confirmed on `main` (`940d32f`).** `buffer_srv` in `crates/victory-gpu/src/descriptor/host.rs` mirrors the title's structured view as a structured host view with its stride. When the translated program reads that slot with raw loads, NVIDIA returns zeros past the first `NumElements * 4` bytes, as measured here. The RTX 2080 Ti run ties the world's slowest compute program (8.7-13 s per dispatch) to this and shows that cost disappearing once such views are raw. #1762, which made that change, was closed without being merged. Open PR #2178 ("back structured buffer views with raw descriptors") appears to carry the same change. Review belongs there, including the 16-byte start alignment noted above. **Root SRV page fault:** since `d71c388`, `root_view` in `crates/victory-gpu/src/draw.rs` binds a raw view over the whole host copy, so a read past the copy returns zero instead of faulting. Nobody has rerun Aftermath on current `main` yet. A run showing whether `Error_DMA_PageFault` in these mesh programs is gone would settle that part. The `gpu-189` branch isn't in a pull request, and pull requests are open to everyone. The NVIDIA world hang is tracked in #71. --- _Generated by [Claude Code](https://claude.ai/code)_
taovuokko commented 2026-11-25 10:07:46 +00:00 (Migrated from github.com)
Author
Contributor

Imported from Marvisak/VIctory. Originally posted by taovuokko on 2026-11-25T09:36:33Z.


Title run on current main for the structured/raw part ("NVIDIA reads a raw view of a structured SRV only up to NumElements * 4 bytes"): on an RTX 2080 Ti it is the cause of the world's slowest compute program, and converting the views removes it

Answering the triage's request for a run of current main, for the last section of this issue (not the root SRV page fault, which I did not measure: no Aftermath here).

Setup: RTX 2080 Ti (Turing, 32-lane waves), i9-9900KS, 32 GB, Windows 11, driver 32.0.16.1088. main 940d32f + #1763 (needed on NVIDIA to get past boot, #1753/#1754), diagnostics build, VICTORY_GPU_TIMING=1, default loop limit (2^20). The title's view heap budget is lowered locally so the heap fits the 1,000,000 cap (#1760) and the title's own hang-watchdog crash is disabled, so runs reach the world. My run script's memory guard stops runs after about 165 s in the world. No game data attached.

What the slow program does. The slowest command in the world on this card is compute 00167d58cc5a78d7 (dispatch 16x16x16, 262,144 lanes): 8.7-13 s per dispatch, about 90 % of the GPU time of a world frame (5.3-9 s per frame). Its loop bounds come from a dword that a raw (ByteAddressBuffer) handle reads at byte 284 of a heap slot that the title made as a structured view of stride 680; main mirrors that view as structured. On NVIDIA that read returns the wrong value, so the loops run to the 2^20 cap. (Counts only from the translated program.)

Converting the views, measured in game:

build (all at the lowered heap budget) slowest dispatch of that program GPU per world frame slowest submission device removed
main + #1763 8.7-8.9 s (13.1-13.3 s in two runs) 5.3-9 s 13.3 s none in about 10 runs
+ local test: only stride-680 structured buffer views made raw views of the same bytes (2 runs) not among the slow commands 0.47 / 0.59 s 0.84 / 1.26 s none
+ #1762 at 19c8013 (structured views made raw on the host, the same idea as 0a4b89f above, with 16-byte alignment handling; 1 run) not among the slow commands 0.57 s 0.85 s none

Frame rate in the world goes from 0.2-0.3 to 0.65-0.94 fps and is CPU-bound after it. This is the title run that the RTX 4080 backport comment above did not have yet.

Two notes for whoever takes this up:

  • #1762 was closed today without being merged (it was closed together with all other pull requests of its author, with no review comment), so the fix is not on main. The same change is still needed; the measurements above say it matters on Turing too.
  • Alignment matters. A local test that turned all structured buffer views into raw views without handling where the raw view starts removed the device with DXGI_ERROR_INVALID_CALL at about frame 1,100, before the world. Not traced, but it fits the 16-byte start rule that #1762 handled.

Not covered:

  • The picture stays black on this tree in the time I can run (other testers saw the scene with #1762 plus #1775, #1778, #1779, #1769, #2175 and longer runs).
  • At the title's default heap budget the device is still lost after a 33 s submission of 24 compute lists, with or without the view conversion (#1760); that is a separate cause.
  • Not run on AMD; unit tests not run.

Measured on my own machine; analysis AI-assisted (Claude Code). No game data, captures or addresses are attached.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7158560652 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/issues/951#issuecomment-7158560652). Originally posted by [taovuokko](https://github.com/taovuokko) on 2026-11-25T09:36:33Z. --- **Title run on current `main` for the structured/raw part ("NVIDIA reads a raw view of a structured SRV only up to NumElements * 4 bytes"): on an RTX 2080 Ti it is the cause of the world's slowest compute program, and converting the views removes it** Answering the triage's request for a run of current `main`, for the last section of this issue (not the root SRV page fault, which I did not measure: no Aftermath here). Setup: RTX 2080 Ti (Turing, 32-lane waves), i9-9900KS, 32 GB, Windows 11, driver 32.0.16.1088. `main` `940d32f` + #1763 (needed on NVIDIA to get past boot, #1753/#1754), diagnostics build, `VICTORY_GPU_TIMING=1`, default loop limit (2^20). The title's view heap budget is lowered locally so the heap fits the 1,000,000 cap (#1760) and the title's own hang-watchdog crash is disabled, so runs reach the world. My run script's memory guard stops runs after about 165 s in the world. No game data attached. **What the slow program does.** The slowest command in the world on this card is compute `00167d58cc5a78d7` (`dispatch 16x16x16`, 262,144 lanes): 8.7-13 s per dispatch, about 90 % of the GPU time of a world frame (5.3-9 s per frame). Its loop bounds come from a dword that a raw (`ByteAddressBuffer`) handle reads at byte 284 of a heap slot that the title made as a structured view of stride 680; `main` mirrors that view as structured. On NVIDIA that read returns the wrong value, so the loops run to the 2^20 cap. (Counts only from the translated program.) **Converting the views, measured in game:** | build (all at the lowered heap budget) | slowest dispatch of that program | GPU per world frame | slowest submission | device removed | |---|---|---|---|---| | `main` + #1763 | 8.7-8.9 s (13.1-13.3 s in two runs) | 5.3-9 s | 13.3 s | none in about 10 runs | | + local test: only stride-680 structured buffer views made raw views of the same bytes (2 runs) | not among the slow commands | 0.47 / 0.59 s | 0.84 / 1.26 s | none | | + #1762 at `19c8013` (structured views made raw on the host, the same idea as `0a4b89f` above, with 16-byte alignment handling; 1 run) | not among the slow commands | 0.57 s | 0.85 s | none | Frame rate in the world goes from 0.2-0.3 to 0.65-0.94 fps and is CPU-bound after it. This is the title run that the RTX 4080 backport comment above did not have yet. Two notes for whoever takes this up: - **#1762 was closed today without being merged** (it was closed together with all other pull requests of its author, with no review comment), so the fix is not on `main`. The same change is still needed; the measurements above say it matters on Turing too. - **Alignment matters.** A local test that turned *all* structured buffer views into raw views without handling where the raw view starts removed the device with `DXGI_ERROR_INVALID_CALL` at about frame 1,100, before the world. Not traced, but it fits the 16-byte start rule that #1762 handled. Not covered: - The picture stays black on this tree in the time I can run (other testers saw the scene with #1762 plus #1775, #1778, #1779, #1769, #2175 and longer runs). - At the title's default heap budget the device is still lost after a 33 s submission of 24 compute lists, with or without the view conversion (#1760); that is a separate cause. - Not run on AMD; unit tests not run. Measured on my own machine; analysis AI-assisted (Claude Code). No game data, captures or addresses are attached.
oeirughrepuiohg commented 2026-11-27 17:26:02 +00:00 (Migrated from github.com)
Author
Contributor

Imported from Marvisak/VIctory. Originally posted by oeirughrepuiohg on 2026-11-27T17:26:02Z.


A related short-copy case on Linux/NVIDIA, on the path where the root SRV is bound through a bounded descriptor: the view ends at the 4 MiB window boundary, reads past it do not fault, and a character's face loses its texture coordinates. Different path from the fault reported here and no common fix tested yet, but the same starting point: a root SRV with little left of its loose window.

Setup

  • VIctory based on 833a282b (main lineage plus fxceless/victory-fork#1002), diagnostics builds: a logging build for the capture comparison, and 833a282b + thin LTO + the fix commit for timing
  • Linux, Proton (GE) with vkd3d-proton, NVIDIA GeForce RTX 4070 Ti 12 GB
  • Xbox build 1.0.2.1, Series S profile (1280x720), opening diner cutscene
  • No game files or dumps attached.

What happens

On this base the title's t3, space1 root SRV for mesh shaders is bound as a one-descriptor table holding a raw R32_TYPELESS view. The title gives only an address, so the view's length is whatever is left of the copy that the unsized lookup (shadow::find(address, 1)) selects. When no registered title buffer covers the address, that copy is a loose window ending at the next 4 MiB boundary. A buffer that starts near the end of a cell gets a view shorter than the data the shader reads.

For the waitress's face (mesh shader f841ad74ec6e7367, pixel shader 6695d7f5e3f6d351, root slot 3), three launches without a fix:

Launch Face binds Valid UV headers UV base beyond the view
1 7,498 7,491 1,729
2 7,511 7,504 1,754
3 (ended early on Xid 109) 935 927 0
  • The 34 flat-face captures (launches 1 and 2) all join to a 65,536-byte view while the shader's UV stream starts at byte 610,972; every valid incoming U/V tap in those captures decodes to zero.
  • The 11 correct captures (launch 3, before its fault) have the same UV base with 1,114,112 bytes in the view, and U/V vary.

A sized table SRV at the same title address (a compute pass uses one, 934,368 bytes) is not affected: it carries its own length.

Narrow fix we run

For that one root slot we reuse the copy behind the largest explicitly sized SRV at the same title address, only while it is the live canonical sized shadow, aligned, shared-memory, at most 1 MiB, with the extension bytes committed and no pending writes on either shadow; otherwise the stock view is used (+202/-7 lines).

  • Three launches with it on: 0 of 22,452 valid UV headers beyond the view, 0 of 49 face captures flat. Those 49 captures happened to have enough stock coverage anyway, so they do not by themselves show a rescue; in one of the launches 2,737 sampled UV bases would have been beyond the stock view and fit the extended one.
  • Timing, separate three-launch gate: 11.25 / 6.67 / 5.97 fps (average / 1% low / 0.1% low) against 11.32 / 6.35 / 5.54 without it.
  • 38 of the 49 captures still showed a red-tinted face. That is a separate defect (an unbound texture slot) and not related to this view.

We can put the patch on a branch if it is useful.

It is not only this shader

In launch 1, counting root views shorter than a known sized view at the same base: 685b26d3 3,040 of 3,153 binds, 5bd95fde 1,815 of 23,636, a97a5ee6 548 of 559, d4111a6e 69 of 311, 02df3d73 8 of 9,927. This is a proxy; we did not measure executed out-of-view reads for these. From the source, sizeless root CBVs end at the cell boundary the same way; we have no measured incidence for them.

Applying our reuse rule to every shader removed about 96% of those short views (613 / 1,009 / 791 left per launch) and its 0.1% lows were worse (4.75 fps average against 5.18), so we did not adopt it. The wider-window approach in gangg111's a3a8fe7 / 94908df (a 32 MB window, then sparse backing) is untested here. From reading it, it works on the direct root-address path, while this base binds root SRVs through bounded tables, and its multi-GiB window backing does not fit a 12 GB card that is already at its cap, so we have not ported it. A general fix for the bounded path is still open.


Measured and written with AI assistance (Claude Code with Claude Opus 5.5 and Claude Mythos 5.2; Codex with gpt-6.2-sol for the fix and the capture analysis).

<!-- greyfinch-sync:Marvisak/VIctory:comment:7224399839 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/issues/951#issuecomment-7224399839). Originally posted by [oeirughrepuiohg](https://github.com/oeirughrepuiohg) on 2026-11-27T17:26:02Z. --- A related short-copy case on Linux/NVIDIA, on the path where the root SRV is bound through a bounded descriptor: the view ends at the 4 MiB window boundary, reads past it do not fault, and a character's face loses its texture coordinates. Different path from the fault reported here and no common fix tested yet, but the same starting point: a root SRV with little left of its loose window. ### Setup - VIctory based on `833a282b` (main lineage plus fxceless/victory-fork#1002), diagnostics builds: a logging build for the capture comparison, and `833a282b` + thin LTO + the fix commit for timing - Linux, Proton (GE) with vkd3d-proton, NVIDIA GeForce RTX 4070 Ti 12 GB - Xbox build 1.0.2.1, Series S profile (1280x720), opening diner cutscene - No game files or dumps attached. ### What happens On this base the title's `t3, space1` root SRV for mesh shaders is bound as a one-descriptor table holding a raw `R32_TYPELESS` view. The title gives only an address, so the view's length is whatever is left of the copy that the unsized lookup (`shadow::find(address, 1)`) selects. When no registered title buffer covers the address, that copy is a loose window ending at the next 4 MiB boundary. A buffer that starts near the end of a cell gets a view shorter than the data the shader reads. For the waitress's face (mesh shader `f841ad74ec6e7367`, pixel shader `6695d7f5e3f6d351`, root slot 3), three launches without a fix: | Launch | Face binds | Valid UV headers | UV base beyond the view | |---|---:|---:|---:| | 1 | 7,498 | 7,491 | 1,729 | | 2 | 7,511 | 7,504 | 1,754 | | 3 (ended early on Xid 109) | 935 | 927 | 0 | - The 34 flat-face captures (launches 1 and 2) all join to a 65,536-byte view while the shader's UV stream starts at byte 610,972; every valid incoming U/V tap in those captures decodes to zero. - The 11 correct captures (launch 3, before its fault) have the same UV base with 1,114,112 bytes in the view, and U/V vary. A sized table SRV at the same title address (a compute pass uses one, 934,368 bytes) is not affected: it carries its own length. ### Narrow fix we run For that one root slot we reuse the copy behind the largest explicitly sized SRV at the same title address, only while it is the live canonical sized shadow, aligned, shared-memory, at most 1 MiB, with the extension bytes committed and no pending writes on either shadow; otherwise the stock view is used (+202/-7 lines). - Three launches with it on: 0 of 22,452 valid UV headers beyond the view, 0 of 49 face captures flat. Those 49 captures happened to have enough stock coverage anyway, so they do not by themselves show a rescue; in one of the launches 2,737 sampled UV bases would have been beyond the stock view and fit the extended one. - Timing, separate three-launch gate: 11.25 / 6.67 / 5.97 fps (average / 1% low / 0.1% low) against 11.32 / 6.35 / 5.54 without it. - 38 of the 49 captures still showed a red-tinted face. That is a separate defect (an unbound texture slot) and not related to this view. We can put the patch on a branch if it is useful. ### It is not only this shader In launch 1, counting root views shorter than a known sized view at the same base: `685b26d3` 3,040 of 3,153 binds, `5bd95fde` 1,815 of 23,636, `a97a5ee6` 548 of 559, `d4111a6e` 69 of 311, `02df3d73` 8 of 9,927. This is a proxy; we did not measure executed out-of-view reads for these. From the source, sizeless root CBVs end at the cell boundary the same way; we have no measured incidence for them. Applying our reuse rule to every shader removed about 96% of those short views (613 / 1,009 / 791 left per launch) and its 0.1% lows were worse (4.75 fps average against 5.18), so we did not adopt it. The wider-window approach in gangg111's `a3a8fe7` / `94908df` (a 32 MB window, then sparse backing) is untested here. From reading it, it works on the direct root-address path, while this base binds root SRVs through bounded tables, and its multi-GiB window backing does not fit a 12 GB card that is already at its cap, so we have not ported it. A general fix for the bounded path is still open. --- *Measured and written with AI assistance (Claude Code with Claude Opus 5.5 and Claude Mythos 5.2; Codex with gpt-6.2-sol for the fix and the capture analysis).*
Sign in to join this conversation.
No labels
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.

Reference
Marvisak/VIctory#951
No description provided.