[GH #2376] GPU: a title that translates 17 programs on 940d32f crashes in init (0xC0000005 at null+0x68); the same title runs on ffe310e #2374

Open
opened 2026-11-25 13:02:27 +00:00 by bittertea0323 · 12 comments
bittertea0323 commented 2026-11-25 13:02:27 +00:00 (Migrated from github.com)
Contributor

Imported from Marvisak/VIctory. Originally posted by bittertea0323 on 2026-11-25T12:15:41Z.

Upstream labels: area: gpu, run report, gpu: nvidia


A translation-rate win on main is a runtime regression: the title crashes in init

We moved our fork from ffe310e (2026-11-24) onto main 940d32f today, mostly to pick up cd94d35/940d32f (the page-marked copy-back work). The translation numbers got much better and the title stopped running at all, so both halves are below.

Translation: much better (same corpus, same command)

victory translate <retail shaders.rpf> --list over 26,084 programs:

tree vt+pixel compute mesh failing programs
our fork at ffe310e + local fixes 12309/14027 1453/2582 8380/8713 3576
main 940d32f 14205/14247 2621/2679 8765/8765 298
main 940d32f + our six fixes 14244/14247 2668/2679 8765/8765 17

(cd94d35 and 940d32f did the bulk of that; our six are in the branch below, four of the classes they clear are the ones nobody else had started.)

Runtime: the title does not start on main 940d32f

Same machine, same title, same runner, same console model, no VICTORY_* set, no victory.toml:

940d32f (release build, target-upstream/release/victory.exe)

bound  game_scarlett_master.exe: 91 hle, 424 host, 72 title, 0 missing
...
title  BacktraceBreakpad: ... Added file 'upload_file_minidump'
ended: exited 0x

Breakpad wrote a 22 MB minidump; parsed:

ExceptionCode:    0xC0000005      access violation
ExceptionAddress: 0x7FFA341BA5F8
read of address:  0x0 + 0x68

The crash log's entity counts are all 0/0 — it dies before the world is up.

ffe310e + local fixes (our old diag build)

The same runner gets past init and runs until the guard stops it:

2026-11-25 20:15:08  STOP victory pid 16368: vram 9825 MiB > 9728

It reaches ~9.8 GB of VRAM and holds there for about a minute, i.e. it is loading and submitting.

Why we think this is a main regression and not our setup

  • No environment variables of ours are set in that shell and no victory.toml exists anywhere the tool looks, so both runs resolve to defaults.
  • The two builds differ only in the tree they were compiled from.
  • The new one never reaches shader translation at runtime (its compiler-side numbers are the good ones above), so the crash is in the host's init path, not in lowering.

Not measured

  • We did not bisect; that is the next step on our side (319 commits between ffe310e and 940d32f).
  • We have no symbolised frame for 0x7FFA341BA5F8 (Breakpad's upload of the minidump is blocked by HLE, which is expected). If a maintainer can tell us which of the new init-time allocations is allowed to be null, that would shortcut it.
  • Whether the copy-back win (cd94d35) alone is responsible for either half; we have not run cd94d35 in isolation.

Branch with our six fixes on top of 940d32f: try/upstream-base on our fork (a35b26d, 5eaf119, 9bf94e1, 1a1e1f2, 56856da, e453346).

<!-- greyfinch-sync:Marvisak/VIctory:issue:6604255222 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/issues/2376). Originally posted by [bittertea0323](https://github.com/bittertea0323) on 2026-11-25T12:15:41Z. **Upstream labels:** area: gpu, run report, gpu: nvidia --- ## A translation-rate win on `main` is a runtime regression: the title crashes in init We moved our fork from `ffe310e` (2026-11-24) onto `main` `940d32f` today, mostly to pick up `cd94d35`/`940d32f` (the page-marked copy-back work). The translation numbers got much better and the title stopped running at all, so both halves are below. ### Translation: much better (same corpus, same command) `victory translate <retail shaders.rpf> --list` over 26,084 programs: | tree | vt+pixel | compute | mesh | failing programs | |---|---|---|---|---| | our fork at `ffe310e` + local fixes | 12309/14027 | 1453/2582 | 8380/8713 | 3576 | | `main` `940d32f` | 14205/14247 | 2621/2679 | 8765/8765 | **298** | | `main` `940d32f` + our six fixes | **14244/14247** | **2668/2679** | 8765/8765 | **17** | (`cd94d35` and `940d32f` did the bulk of that; our six are in the branch below, four of the classes they clear are the ones nobody else had started.) ### Runtime: the title does not start on `main` `940d32f` Same machine, same title, same runner, same console model, no `VICTORY_*` set, no `victory.toml`: **`940d32f` (release build, `target-upstream/release/victory.exe`)** ``` bound game_scarlett_master.exe: 91 hle, 424 host, 72 title, 0 missing ... title BacktraceBreakpad: ... Added file 'upload_file_minidump' ended: exited 0x ``` Breakpad wrote a 22 MB minidump; parsed: ``` ExceptionCode: 0xC0000005 access violation ExceptionAddress: 0x7FFA341BA5F8 read of address: 0x0 + 0x68 ``` The crash log's entity counts are all `0/0` — it dies before the world is up. **`ffe310e` + local fixes (our old `diag` build)** The same runner gets past init and runs until the guard stops it: ``` 2026-11-25 20:15:08 STOP victory pid 16368: vram 9825 MiB > 9728 ``` It reaches ~9.8 GB of VRAM and holds there for about a minute, i.e. it is loading and submitting. ### Why we think this is a `main` regression and not our setup - No environment variables of ours are set in that shell and no `victory.toml` exists anywhere the tool looks, so both runs resolve to defaults. - The two builds differ only in the tree they were compiled from. - The new one never reaches shader translation at runtime (its compiler-side numbers are the good ones above), so the crash is in the host's init path, not in lowering. ### Not measured - We did not bisect; that is the next step on our side (319 commits between `ffe310e` and `940d32f`). - We have no symbolised frame for `0x7FFA341BA5F8` (Breakpad's upload of the minidump is blocked by HLE, which is expected). If a maintainer can tell us which of the new init-time allocations is allowed to be null, that would shortcut it. - Whether the copy-back win (`cd94d35`) alone is responsible for either half; we have not run `cd94d35` in isolation. Branch with our six fixes on top of `940d32f`: `try/upstream-base` on our fork (`a35b26d`, `5eaf119`, `9bf94e1`, `1a1e1f2`, `56856da`, `e453346`).
bittertea0323 commented 2026-11-25 13:02:44 +00:00 (Migrated from github.com)
Author
Contributor

Imported from Marvisak/VIctory. Originally posted by bittertea0323 on 2026-11-25T12:19:47Z.


Bisected. **

<!-- greyfinch-sync:Marvisak/VIctory:comment:7162226605 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/issues/2376#issuecomment-7162226605). Originally posted by [bittertea0323](https://github.com/bittertea0323) on 2026-11-25T12:19:47Z. --- Bisected. **
bittertea0323 commented 2026-11-25 13:02:46 +00:00 (Migrated from github.com)
Author
Contributor

Imported from Marvisak/VIctory. Originally posted by bittertea0323 on 2026-11-25T12:22:57Z.


Fixed, and the fix is not in the tree — it is a missing export.

Root cause.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7162297228 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/issues/2376#issuecomment-7162297228). Originally posted by [bittertea0323](https://github.com/bittertea0323) on 2026-11-25T12:22:57Z. --- Fixed, and the fix is not in the tree — it is a missing export. **Root cause.**
bittertea0323 commented 2026-11-25 13:03:05 +00:00 (Migrated from github.com)
Author
Contributor

Imported from Marvisak/VIctory. Originally posted by bittertea0323 on 2026-11-25T12:58:35Z.


Two more results from the same session, both of which narrow #1627 to the cause.

The black screen is the view heap cap, not the shaders. On 940d32f plus the Agility opt-in the title runs at 33.0 fps / 30.3 ms/frame with draws=192, dispatches=64 and presents normally — and the picture is completely black. itle slot past the host heap index=1029688 count=934464 appears 310,720 times in 90 seconds: the host falls back to PORTABLE_VIEWS - MIN_DYNAMIC = 934,464 because an NVIDIA CBV/SRV/UAV heap caps at 1,000,000, and the title wants 1,029,688. mirror() returns None past the cap, the slots stay null, and black is what those samples read.

Raising the shader's clamp does not move those numbers. We set HEAP_VIEWS to 1,000,000 and then to 934,464, retranslating the full corpus each time; the count stayed at exactly 310,720. Those warnings come from mirror() on the CPU side, checking the title's own index against count — not from what the shader indexes. So that is not the lever, and the fix has to be heap sharding.

Details and the proposed shape are in our comment on #1627.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7163115498 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/issues/2376#issuecomment-7163115498). Originally posted by [bittertea0323](https://github.com/bittertea0323) on 2026-11-25T12:58:35Z. --- Two more results from the same session, both of which narrow #1627 to the cause. **The black screen is the view heap cap, not the shaders.** On 940d32f plus the Agility opt-in the title runs at **33.0 fps / 30.3 ms/frame** with draws=192, dispatches=64 and presents normally — and the picture is completely black. itle slot past the host heap index=1029688 count=934464 appears **310,720 times** in 90 seconds: the host falls back to PORTABLE_VIEWS - MIN_DYNAMIC = 934,464 because an NVIDIA CBV/SRV/UAV heap caps at 1,000,000, and the title wants **1,029,688**. mirror() returns None past the cap, the slots stay null, and black is what those samples read. **Raising the shader's clamp does not move those numbers.** We set HEAP_VIEWS to 1,000,000 and then to 934,464, retranslating the full corpus each time; the count stayed at exactly 310,720. Those warnings come from mirror() on the CPU side, checking the title's own index against count — not from what the shader indexes. So that is not the lever, and the fix has to be heap sharding. Details and the proposed shape are in our comment on #1627.
cobrajet302gt commented 2026-11-25 13:03:06 +00:00 (Migrated from github.com)
Author
Contributor

Imported from Marvisak/VIctory. Originally posted by cobrajet302gt on 2026-11-25T13:00:13Z.


Boundary data point from the Wine side of the same tree, plus a corpus second opinion on your translation table.

Runtime half: on this box (CachyOS x64, Wine via Proton 11.0 files/bin/wine, stock DXVK 3.1.1 dxgi.dll, self-built master vkd3d-proton d3d12/d3d12core, RTX-class NVIDIA host), main 940d32f + #1922 (91cd87b) has booted 26 times across ~14 h with zero init crashes and zero first-chance faults — full first-boot flow to the FINISH SETUP gate and Bink-era fps, diag profile. So 940d32f's init path is alive on the winevulkan/vkd3d-proton side; your null+0x68 may be specific to the native-D3D12 init path or to the fork delta between ffe310e and your merge, not to the page-marked copy-back commits themselves. Two known divergences worth ruling out first: our tree carries no fork patches beyond #1922, and our runs pin VICTORY_TEXTURE_MIP_DROP=1 on a 16 GB card.

Translation half: we ran victory translate --validate --list over a full local Scarlett-format archive with the official dxil.dll (v1.9.2609) on the gated-main tree (940d32f + #1936) — same corpus size as your table (26,084 distinct programs). Result: all 26,084 translate; 1,784 fail — 867 vertex Flags must match usage, 735 compute cs-stage (#2027), 71 vertex-plus-primitive output > 32768, 108 translator emit refusals (lane-mask family 60, descriptor-as-data 37, misc 11). Full per-program breakdown posted under VIctory #2045. If your "17 programs" count is over a reduced pipeline-carve rather than the whole archive, the classes above tell you which of the 1,784 refusals you skipped.

Written with an AI assistant.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7163153753 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/issues/2376#issuecomment-7163153753). Originally posted by [cobrajet302gt](https://github.com/cobrajet302gt) on 2026-11-25T13:00:13Z. --- Boundary data point from the Wine side of the same tree, plus a corpus second opinion on your translation table. Runtime half: on this box (CachyOS x64, Wine via Proton 11.0 `files/bin/wine`, stock DXVK 3.1.1 `dxgi.dll`, self-built master vkd3d-proton `d3d12/d3d12core`, RTX-class NVIDIA host), `main` `940d32f` + #1922 (`91cd87b`) has booted 26 times across ~14 h with **zero init crashes and zero first-chance faults** — full first-boot flow to the FINISH SETUP gate and Bink-era fps, diag profile. So `940d32f`'s init path is alive on the winevulkan/vkd3d-proton side; your `null+0x68` may be specific to the native-D3D12 init path or to the fork delta between `ffe310e` and your merge, not to the page-marked copy-back commits themselves. Two known divergences worth ruling out first: our tree carries no fork patches beyond #1922, and our runs pin `VICTORY_TEXTURE_MIP_DROP=1` on a 16 GB card. Translation half: we ran `victory translate --validate --list` over a full local Scarlett-format archive with the official `dxil.dll` (v1.9.2609) on the gated-main tree (`940d32f` + #1936) — same corpus size as your table (26,084 distinct programs). Result: **all 26,084 translate**; 1,784 fail — 867 vertex `Flags must match usage`, 735 compute cs-stage (#2027), 71 vertex-plus-primitive output > 32768, 108 translator emit refusals (lane-mask family 60, descriptor-as-data 37, misc 11). Full per-program breakdown posted under VIctory #2045. If your "17 programs" count is over a reduced pipeline-carve rather than the whole archive, the classes above tell you which of the 1,784 refusals you skipped. Written with an AI assistant.
bittertea0323 commented 2026-11-25 14:07:16 +00:00 (Migrated from github.com)
Author
Contributor

Imported from Marvisak/VIctory. Originally posted by bittertea0323 on 2026-11-25T13:19:14Z.


Session summary: 298 failing programs → 17, and 1.0 fps → 33 fps, with the black screen isolated

Closing out what this branch did and where the remaining wall is, so the next person does not re-derive it. Everything below is measured on one machine: RTX 4070 SUPER (32-lane), driver 591.74, Windows 10.0.19045, Ryzen 7 7800X3D.

Where it started

Our fork was cut at ffe310e and had drifted 319 commits behind main. On that tree 3,576 programs failed; on 940d32f only 298 did, because the classes we had been fixing there (a descriptor read only as data, a 64-bit image atomic, a structured buffer of unknown stride) had all been fixed upstream. Checking main before continuing to patch an old base was the single most useful thing in this session.

What this branch adds, on top of 940d32f

commit what measured
a35b26d a standalone geometry shader's user data starts at s0; a table's high half is a 32-bit address an address in an SGPR that is no root parameter 195 → 167
5eaf119 a GS's parameters are found at either user-data placement 167 → 0
9bf94e1 a reused register read as data takes its mask argument a register joining a lane mask and data 40 → 0
1a1e1f2 an untracked mask reads as every-lane in mask_dword and the phi join a lane-mask join of an untracked mask 13 → 0, compute +13
56856da a mask write emits its dwords instead of failing a lane mask read as data 41 → 4, compute +33
e453346 dwords past a view address read as zero; a sampler heap counts a descriptor read only as data 36 → 0, v+p +35
2e0ea66 (cherry-pick) opt into the Agility SDK see below
27a3045 a depth plane of no known width gets no unordered view removes an invalid call that cannot report itself

Corpus totals: 298 → 17 failing programs; 14244/14247 vertex+pixel, 2668/2679 compute, 8765/8765 mesh.

Two of those are worth a comment because the obvious fix is wrong. For a lane mask read as data, skipping the write leaves its SSA value undefined (37 join of mismatched values + 4 value defined after its use), and marking it missing just moves the failure downstream (41 a lane mask write). The value has to be computed, which is what 56856da does. For a descriptor read only as data, the four PS_PuddleDetect variants load four dwords at once and read the two past the address as numbers; those were modelled as missing, so a read of them stopped the program.

The Agility opt-in is not optional on Windows 10

0b35b7f introduced bindless strides, so shaders emit root signatures with D3D12_ROOT_SIGNATURE_FLAG_CBV_SRV_UAV_HEAP_DIRECTLY_INDEXED (0x400) and SAMPLER_HEAP_DIRECTLY_INDEXED (0x800). Those are SM 6.6 flags; the in-box Windows 10 runtime refuses them (E_INVALIDARG), and root.rs only strips CONSOLE_FLAGS = 0xff00_0000, so they reach D3D12 as they should. Without the opt-in, every heap-indexed pipeline fails to create and the title dies in about two seconds with 0xC0000005 — which bisects cleanly to 0b35b7f (parent ffe310e runs). With D3D12SDKVersion/D3D12SDKPath exported and D3D12Core.dll beside the exe:

root signature refused:  0
frame=165  draws=192  dispatches=64
33.0 fps, 30.3 ms/frame

The remaining wall: the host view heap cap, not the shaders

The picture is black while presenting at 33 fps. title slot past the host heap index=1245183 count=934464 appears 310,720 times in a 90-second run, and the arithmetic closes exactly: 1,245,183 − 934,464 = 310,719. The title walks its descriptors sequentially from 0 and runs past wherever the heap stops.

Why it stops there: HEAP_VIEWS is 1 << 21, but an NVIDIA CBV/SRV/UAV heap caps at PORTABLE_VIEWS = 1_000_000, and the fallback sets the title's count to PORTABLE_VIEWS − MIN_DYNAMIC = 934,464. mirror() returns None past that, the slots stay null, and those samples read black.

Two things that do not work, measured:

Raising the shader's clamp is not the lever. We set HEAP_VIEWS to 1,000,000 and to 934,464 and retranslated the whole corpus each time; the hit count stayed at exactly 310,720, because those warnings come from mirror() on the CPU side checking the title's own index against count — not from what the shader indexes at runtime.

#747's shape cannot cover it either: reserving 2^18 dynamic slots inside the capped heap leaves 1,000,000 − 262,144 = 737,856 title slots, which is 196,608 fewer than now. That PR targets dynamic-slot exhaustion, a different failure.

What would cover it, and why I did not start it tonight: two shader-visible heaps with the title's linear index split across them. The second one needs only 310,720 slots, well under the cap. The work is in descriptor/host.rs (two heaps plus the index → (heap, slot) mapping), pipeline/host.rs (a second root descriptor and a second SetDescriptorHeaps entry), and emit/shader.rs — and there the snag is that createHandleFromHeap(index, sampler, nonuniform) takes no heap argument; it acts on whichever heap is bound. So this is not "add a comparison", it is changing how the generated shaders obtain descriptors at all, plus a full retranslation. I asked on #1627 whether adding a second root descriptor has precedent in the tree, because that is the part with the least of it.

Not measured

  • Whether the descriptor index keeps growing past 1,245,183 on a much longer run; the count was identical in every run stopped at 90 seconds, so 310,720 is an observation at that length, not a ceiling.
  • Whether the growth is per-level or per-session: if a second level pushed further, the second heap would need headroom rather than exactly 310,720.
  • Whether an AMD host or Windows 11 has the same cap at all.
  • The 14 s first frame (350+ pipelines compiled, 91 MB of textures) is recorded but not explained; it needs TdrDelay ≥ 30 on this machine or the OS resets the device before the frame finishes.
<!-- greyfinch-sync:Marvisak/VIctory:comment:7163605777 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/issues/2376#issuecomment-7163605777). Originally posted by [bittertea0323](https://github.com/bittertea0323) on 2026-11-25T13:19:14Z. --- ## Session summary: 298 failing programs → 17, and 1.0 fps → 33 fps, with the black screen isolated Closing out what this branch did and where the remaining wall is, so the next person does not re-derive it. Everything below is measured on one machine: RTX 4070 SUPER (32-lane), driver 591.74, Windows 10.0.19045, Ryzen 7 7800X3D. ### Where it started Our fork was cut at `ffe310e` and had drifted 319 commits behind `main`. On that tree 3,576 programs failed; on `940d32f` only 298 did, because the classes we had been fixing there (`a descriptor read only as data`, `a 64-bit image atomic`, `a structured buffer of unknown stride`) had all been fixed upstream. **Checking `main` before continuing to patch an old base was the single most useful thing in this session.** ### What this branch adds, on top of `940d32f` | commit | what | measured | |---|---|---| | `a35b26d` | a standalone geometry shader's user data starts at s0; a table's high half is a 32-bit address | `an address in an SGPR that is no root parameter` 195 → 167 | | `5eaf119` | a GS's parameters are found at either user-data placement | 167 → 0 | | `9bf94e1` | a reused register read as data takes its mask argument | `a register joining a lane mask and data` 40 → 0 | | `1a1e1f2` | an untracked mask reads as every-lane in `mask_dword` and the phi join | `a lane-mask join of an untracked mask` 13 → 0, **compute +13** | | `56856da` | a mask write emits its dwords instead of failing | `a lane mask read as data` 41 → 4, **compute +33** | | `e453346` | dwords past a view address read as zero; a sampler heap counts | `a descriptor read only as data` 36 → 0, **v+p +35** | | `2e0ea66` | (cherry-pick) opt into the Agility SDK | see below | | `27a3045` | a depth plane of no known width gets no unordered view | removes an invalid call that cannot report itself | Corpus totals: **298 → 17** failing programs; `14244/14247` vertex+pixel, `2668/2679` compute, `8765/8765` mesh. Two of those are worth a comment because the obvious fix is wrong. For `a lane mask read as data`, skipping the write leaves its SSA value undefined (`37 join of mismatched values + 4 value defined after its use`), and marking it missing just moves the failure downstream (`41 a lane mask write`). The value has to be *computed*, which is what `56856da` does. For `a descriptor read only as data`, the four `PS_PuddleDetect` variants load four dwords at once and read the two past the address as numbers; those were modelled as missing, so a read of them stopped the program. ### The Agility opt-in is not optional on Windows 10 `0b35b7f` introduced bindless strides, so shaders emit root signatures with `D3D12_ROOT_SIGNATURE_FLAG_CBV_SRV_UAV_HEAP_DIRECTLY_INDEXED` (0x400) and `SAMPLER_HEAP_DIRECTLY_INDEXED` (0x800). Those are SM 6.6 flags; the in-box Windows 10 runtime refuses them (`E_INVALIDARG`), and `root.rs` only strips `CONSOLE_FLAGS = 0xff00_0000`, so they reach D3D12 as they should. Without the opt-in, every heap-indexed pipeline fails to create and the title dies in about two seconds with `0xC0000005` — which bisects cleanly to `0b35b7f` (parent `ffe310e` runs). With `D3D12SDKVersion`/`D3D12SDKPath` exported and `D3D12Core.dll` beside the exe: ``` root signature refused: 0 frame=165 draws=192 dispatches=64 33.0 fps, 30.3 ms/frame ``` ### The remaining wall: the host view heap cap, not the shaders The picture is black while presenting at 33 fps. `title slot past the host heap index=1245183 count=934464` appears **310,720 times** in a 90-second run, and the arithmetic closes exactly: `1,245,183 − 934,464 = 310,719`. The title walks its descriptors sequentially from 0 and runs past wherever the heap stops. Why it stops there: `HEAP_VIEWS` is `1 << 21`, but an NVIDIA CBV/SRV/UAV heap caps at `PORTABLE_VIEWS = 1_000_000`, and the fallback sets the title's count to `PORTABLE_VIEWS − MIN_DYNAMIC = 934,464`. `mirror()` returns `None` past that, the slots stay null, and those samples read black. **Two things that do not work, measured:** Raising the shader's clamp is not the lever. We set `HEAP_VIEWS` to 1,000,000 and to 934,464 and retranslated the whole corpus each time; the hit count stayed at exactly 310,720, because those warnings come from `mirror()` on the CPU side checking the title's own index against `count` — not from what the shader indexes at runtime. `#747`'s shape cannot cover it either: reserving 2^18 dynamic slots inside the capped heap leaves `1,000,000 − 262,144 = 737,856` title slots, which is 196,608 *fewer* than now. That PR targets dynamic-slot exhaustion, a different failure. **What would cover it**, and why I did not start it tonight: two shader-visible heaps with the title's linear index split across them. The second one needs only 310,720 slots, well under the cap. The work is in `descriptor/host.rs` (two heaps plus the `index → (heap, slot)` mapping), `pipeline/host.rs` (a second root descriptor and a second `SetDescriptorHeaps` entry), and `emit/shader.rs` — and there the snag is that `createHandleFromHeap(index, sampler, nonuniform)` **takes no heap argument**; it acts on whichever heap is bound. So this is not "add a comparison", it is changing how the generated shaders obtain descriptors at all, plus a full retranslation. I asked on #1627 whether adding a second root descriptor has precedent in the tree, because that is the part with the least of it. ### Not measured - Whether the descriptor index keeps growing past 1,245,183 on a much longer run; the count was identical in every run stopped at 90 seconds, so 310,720 is an observation at that length, not a ceiling. - Whether the growth is per-level or per-session: if a second level pushed further, the second heap would need headroom rather than exactly 310,720. - Whether an AMD host or Windows 11 has the same cap at all. - The 14 s first frame (350+ pipelines compiled, 91 MB of textures) is recorded but not explained; it needs `TdrDelay` ≥ 30 on this machine or the OS resets the device before the frame finishes.
cobrajet302gt commented 2026-11-25 14:07:20 +00:00 (Migrated from github.com)
Author
Contributor

Imported from Marvisak/VIctory. Originally posted by cobrajet302gt on 2026-11-25T13:29:38Z.


Two facts from the Wine side that narrow your remaining wall, since our runs touch the same arithmetic.

The Agility half of your init story does not bite on winevulkan/vkd3d-proton. We boot post-0b35b7f trees (our main stack is 940d32f + #1922) on Windows-host-less Wine with self-built master vkd3d-proton and never see a root-signature refusal — the 0x400/0x800 SM 6.6 flags reach vkd3d-proton directly and it accepts them, so the in-box-runtime E_INVALIDARG you bisected has no analog in this lane. If it saves anyone a night: on Wine the second-run Agility dance isn't needed.

The heap-cap arithmetic matches our logs exactly. Our very first boot on 940d32f lineage logged the same wants-vs-granted pair you quote (heap cap at 1,000,000, wants 1,245,184) — so the 310,720-slot overshoot is a host-side mirror problem on NVIDIA through vkd3d-proton too, not a Windows-runtime artifact; we expect to meet the same black-at-world-entry wall the moment our traversal crosses FINISH SETUP.

One alternative your "what would cover it" section may want on its list: the fxceless fork's same-night fix took the other direction — instead of splitting title indices across two heaps (and fighting createHandleFromHeap's missing heap argument), it mirrors the title's byte-copied descriptor records into real host slots before each submission (~40,000 records/frame that no call had announced) and keeps card room for the copies — first room renders with walls/textures/people/lamps at 2–5 fps as of 0b0074e. If the records can be mirrored where they land, the linear walk past 10^6 becomes a slot-table question instead of a shader-ABI question, and no retranslation is needed. Worth cross-reading if nobody has pointed the two groups at each other yet.

Written with an AI assistant.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7163856778 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/issues/2376#issuecomment-7163856778). Originally posted by [cobrajet302gt](https://github.com/cobrajet302gt) on 2026-11-25T13:29:38Z. --- Two facts from the Wine side that narrow your remaining wall, since our runs touch the same arithmetic. **The Agility half of your init story does not bite on winevulkan/vkd3d-proton.** We boot post-`0b35b7f` trees (our main stack is `940d32f` + #1922) on Windows-host-less Wine with self-built master vkd3d-proton and never see a root-signature refusal — the 0x400/0x800 SM 6.6 flags reach vkd3d-proton directly and it accepts them, so the in-box-runtime `E_INVALIDARG` you bisected has no analog in this lane. If it saves anyone a night: on Wine the second-run Agility dance isn't needed. **The heap-cap arithmetic matches our logs exactly.** Our very first boot on `940d32f` lineage logged the same wants-vs-granted pair you quote (`heap cap at 1,000,000`, wants `1,245,184`) — so the 310,720-slot overshoot is a host-side mirror problem on NVIDIA *through vkd3d-proton too*, not a Windows-runtime artifact; we expect to meet the same black-at-world-entry wall the moment our traversal crosses FINISH SETUP. One alternative your "what would cover it" section may want on its list: the fxceless fork's same-night fix took the other direction — instead of splitting title indices across two heaps (and fighting `createHandleFromHeap`'s missing heap argument), it **mirrors the title's byte-copied descriptor records into real host slots before each submission** (~40,000 records/frame that no call had announced) and keeps card room for the copies — first room renders with walls/textures/people/lamps at 2–5 fps as of `0b0074e`. If the records can be mirrored where they land, the linear walk past 10^6 becomes a slot-table question instead of a shader-ABI question, and no retranslation is needed. Worth cross-reading if nobody has pointed the two groups at each other yet. Written with an AI assistant.
YaBulochka commented 2026-11-25 14:07:28 +00:00 (Migrated from github.com)
Author
Contributor

Imported from Marvisak/VIctory. Originally posted by YaBulochka on 2026-11-25T13:40:00Z.


Counter-data point on the init crash: on plain 940d32f (no fork fixes) init does not crash here, so the regression may be in the fork's six fixes rather than in 940d32f itself.

Setup. Linux, RADV 26.99.99, RX 7600 XT 8 GB, Wine 11.22, vkd3d-proton master. Upstream 940d32f, x86_64-pc-windows-gnu release, retail 1.0.2.1, VICTORY_WINDOW_MAX=1920x1080, VICTORY_KEYS to advance the menus.

Result: init completes, menus run, the first 3D frame arrives in about 2.5 minutes, then the run sits at 297 draws/frame, 0.4-1 fps with VRAM 7.91/8.0 GB and 27/30 GB RAM. No 0xC0000005 at null+0x68, no init crash - I stopped it myself because memory was nearly full.

Caveats, so this is not read as a contradiction: different platform (Linux/RADV vs Windows/Adrenaline), and I did not apply your six fixes. So it does not prove 940d32f is innocent - only that the null+0x68 crash is not unconditional on 940d32f, which makes a bisect between 940d32f and 940d32f + your fixes the cheapest next step if you have not done it.

For what it is worth on the translation side: my own numbers agree with yours - ffe310e gives 21,724 validated on the whole dump, 940d32f 23,918, so the jump is real and is not specific to your fork.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7164110731 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/issues/2376#issuecomment-7164110731). Originally posted by [YaBulochka](https://github.com/YaBulochka) on 2026-11-25T13:40:00Z. --- Counter-data point on the init crash: on plain `940d32f` (no fork fixes) init does not crash here, so the regression may be in the fork's six fixes rather than in `940d32f` itself. **Setup.** Linux, RADV 26.99.99, RX 7600 XT 8 GB, Wine 11.22, vkd3d-proton master. Upstream `940d32f`, `x86_64-pc-windows-gnu` release, retail 1.0.2.1, `VICTORY_WINDOW_MAX=1920x1080`, `VICTORY_KEYS` to advance the menus. **Result:** init completes, menus run, the first 3D frame arrives in about 2.5 minutes, then the run sits at **297 draws/frame, 0.4-1 fps** with VRAM 7.91/8.0 GB and 27/30 GB RAM. No `0xC0000005 at null+0x68`, no init crash - I stopped it myself because memory was nearly full. Caveats, so this is not read as a contradiction: different platform (Linux/RADV vs Windows/Adrenaline), and I did not apply your six fixes. So it does not prove `940d32f` is innocent - only that the null+0x68 crash is not unconditional on `940d32f`, which makes a bisect between `940d32f` and `940d32f + your fixes` the cheapest next step if you have not done it. For what it is worth on the translation side: my own numbers agree with yours - `ffe310e` gives 21,724 validated on the whole dump, `940d32f` 23,918, so the jump is real and is not specific to your fork.
cobrajet302gt commented 2026-11-25 14:07:30 +00:00 (Migrated from github.com)
Author
Contributor

Imported from Marvisak/VIctory. Originally posted by cobrajet302gt on 2026-11-25T13:50:13Z.


Third data point in the same column (Wine, NVIDIA side), plus a line that may steer the bisect recommendation: plain 940d32f+#1922 under Wine + master vkd3d-proton on RTX-class hardware — 26 boots, no init crash, our --validate pass reports the identical 23,918 validated count @ 940d32f (agreeing with both tables above).

On "the regression may be in the fork's fixes": if it is, expect the geometry-shader class, not the mask half — that's the split we can attest to from an NVIDIA build of the same fixes. The mask/descriptor-semantic commits (9bf94e1, 1a1e1f2, 56856da, e453346) are translator-emitter-side and bought +33 validated compute and +35 vertex+pixel cleanly on our hardware; the two GS placement commits (a35b26d, 5eaf119) are the ones that change emitted geometry-shader ABI, so a null+0x68 at init on a title that binds GS-heavy front-end pipelines bisects far more plausibly through those two. Cheap form of the test, if someone wants it: revert 5eaf119 alone (a35b26d's s0-start without either-or placement) and re-run init; one retranslation of the 195-program GS class.

Written with an AI assistant.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7164361318 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/issues/2376#issuecomment-7164361318). Originally posted by [cobrajet302gt](https://github.com/cobrajet302gt) on 2026-11-25T13:50:13Z. --- Third data point in the same column (Wine, NVIDIA side), plus a line that may steer the bisect recommendation: plain `940d32f`+`#1922` under Wine + master vkd3d-proton on RTX-class hardware — 26 boots, no init crash, our `--validate` pass reports the identical 23,918 validated count @ `940d32f` (agreeing with both tables above). On "the regression may be in the fork's fixes": if it is, expect the geometry-shader class, not the mask half — that's the split we can attest to from an NVIDIA build of the same fixes. The mask/descriptor-semantic commits (`9bf94e1`, `1a1e1f2`, `56856da`, `e453346`) are translator-emitter-side and bought +33 validated compute and +35 vertex+pixel cleanly on our hardware; the two GS placement commits (`a35b26d`, `5eaf119`) are the ones that change emitted geometry-shader ABI, so a null+0x68 at init on a title that binds GS-heavy front-end pipelines bisects far more plausibly through those two. Cheap form of the test, if someone wants it: revert `5eaf119` alone (`a35b26d`'s s0-start without either-or placement) and re-run init; one retranslation of the 195-program GS class. Written with an AI assistant.
bittertea0323 commented 2026-11-25 15:04:21 +00:00 (Migrated from github.com)
Author
Contributor

Imported from Marvisak/VIctory. Originally posted by bittertea0323 on 2026-11-25T14:31:25Z.


Three useful replies. I tested the one that was actionable tonight, and it does not hold — the rest of this is what the test says and where it leaves the disagreement.

@cobrajet302gt's GS hypothesis: tested, negative

You wrote that if the regression is in the fork's fixes, expect the geometry-shader pair (35b26d, 5eaf119) and not the mask half, and suggested reverting 5eaf119 alone. Did exactly that: git revert --no-commit 5eaf119, rebuild, run.

with 5eaf119:     device removed = 2   past-the-heap = 310720
without 5eaf119:  device removed = 2   past-the-heap = 310720

Identical, including the 0.1 fps / 14416 ms first frame and the 30.0 fps steady frame. So neither GS commit is it, and your reading of the mask commits as emitter-side-only matches what I see. Reverted the revert; the branch is back at 1765838 and clean.

But I think we are measuring different init paths, which is why our results differ

@YaBulochka: plain 940d32f runs on RADV/Wine to 297 draws at 0.4–1 fps, no
ull+0x68. @cobrajet302gt: 26 boots, zero init faults under Proton + vkd3d-proton. Both of those go through vkd3d-proton, and you said it yourself: the

<!-- greyfinch-sync:Marvisak/VIctory:comment:7165408278 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/issues/2376#issuecomment-7165408278). Originally posted by [bittertea0323](https://github.com/bittertea0323) on 2026-11-25T14:31:25Z. --- Three useful replies. I tested the one that was actionable tonight, and it does not hold — the rest of this is what the test says and where it leaves the disagreement. ### @cobrajet302gt's GS hypothesis: tested, negative You wrote that if the regression is in the fork's fixes, expect the geometry-shader pair (35b26d, 5eaf119) and not the mask half, and suggested reverting 5eaf119 alone. Did exactly that: git revert --no-commit 5eaf119, rebuild, run. ``` with 5eaf119: device removed = 2 past-the-heap = 310720 without 5eaf119: device removed = 2 past-the-heap = 310720 ``` Identical, including the 0.1 fps / 14416 ms first frame and the 30.0 fps steady frame. So neither GS commit is it, and your reading of the mask commits as emitter-side-only matches what I see. Reverted the revert; the branch is back at 1765838 and clean. ### But I think we are measuring different init paths, which is why our results differ @YaBulochka: plain 940d32f runs on RADV/Wine to 297 draws at 0.4–1 fps, no ull+0x68. @cobrajet302gt: 26 boots, zero init faults under Proton + vkd3d-proton. Both of those go through **vkd3d-proton**, and you said it yourself: the
Marvisak commented 2026-11-25 16:09:38 +00:00 (Migrated from github.com)
Author
Contributor

Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T16:00:18Z.


Automated triage for the maintainers.

Run report (RTX 4070 SUPER, Windows 10 19045, 940d32f and a fork branch). The thread's own findings come down to two known failures, both still in main (13f91ca):

  • The init crash on Windows 10 comes from the in-box D3D12 runtime refusing the root signature flags 0x400/0x800 (heap-indexed roots), and it goes away with the Agility SDK opt-in. Main exports no D3D12SDKVersion/D3D12SDKPath. Discussed in #84 (also #753); open PR #2460 loads the Agility SDK from .\D3D12\. That also explains why the Wine/vkd3d-proton runs in this thread do not crash.
  • The black picture with "title slot past the host heap ... count=934464" x 310,720 is the NVIDIA view heap cap in HostHeap::new (crates/victory-gpu/src/descriptor/host.rs), discussed in #1760 (also #1808, #1851). Open PRs take different routes: #2121 pages title slots onto the capped heap (no second shader-visible heap), and #2185 clamps the indices. Comparing them belongs on #1760.

The translator changes on the fork branch are covered in #2268. Two of them are in open PRs #2284 and #2546. The latest comment only acknowledges the above and adds no new run.


Generated by Claude Code

<!-- greyfinch-sync:Marvisak/VIctory:comment:7167506830 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/issues/2376#issuecomment-7167506830). Originally posted by [Marvisak](https://github.com/Marvisak) on 2026-11-25T16:00:18Z. --- <!-- victory-issue-triage v1 verdict=tracked seen=2026-11-25T16:08:13Z at=2026-11-25T19:01:00Z --> Automated triage for the maintainers. Run report (RTX 4070 SUPER, Windows 10 19045, 940d32f and a fork branch). The thread's own findings come down to two known failures, both still in main (13f91ca): - **The init crash on Windows 10** comes from the in-box D3D12 runtime refusing the root signature flags 0x400/0x800 (heap-indexed roots), and it goes away with the Agility SDK opt-in. Main exports no `D3D12SDKVersion`/`D3D12SDKPath`. Discussed in #84 (also #753); open PR #2460 loads the Agility SDK from `.\D3D12\`. That also explains why the Wine/vkd3d-proton runs in this thread do not crash. - **The black picture with "title slot past the host heap ... count=934464" x 310,720** is the NVIDIA view heap cap in `HostHeap::new` (`crates/victory-gpu/src/descriptor/host.rs`), discussed in #1760 (also #1808, #1851). Open PRs take different routes: #2121 pages title slots onto the capped heap (no second shader-visible heap), and #2185 clamps the indices. Comparing them belongs on #1760. The translator changes on the fork branch are covered in #2268. Two of them are in open PRs #2284 and #2546. The latest comment only acknowledges the above and adds no new run. --- _Generated by [Claude Code](https://claude.ai/code)_
cobrajet302gt commented 2026-11-25 16:09:55 +00:00 (Migrated from github.com)
Author
Contributor

Imported from Marvisak/VIctory. Originally posted by cobrajet302gt on 2026-11-25T16:08:13Z.


Fair test, clean negative — GS hypothesis dropped, thanks for running it the same hour it was posted. Your reframing is the right one: our lane's clean boots all route through vkd3d-proton, which is exactly why the in-box-runtime refusal never reaches us; glad the triage could use that as the boundary.

One consequence worth pinning for the Linux side now that the triage named the mechanism: with the black picture settled as the capped-host-heap mirror gap, there are now three open routes — #2185 (clamp indices), #2121 (page title slots onto the capped heap, no shader-ABI change), and the fork's pre-submission record mirroring. We'll take whichever merges first as a cherry-pick onto our next world attempt; #2121's paging form is the one that needs no fork at all if it lands, so that's the one we'll watch.

Written with an AI assistant.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7167624773 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/issues/2376#issuecomment-7167624773). Originally posted by [cobrajet302gt](https://github.com/cobrajet302gt) on 2026-11-25T16:08:13Z. --- Fair test, clean negative — GS hypothesis dropped, thanks for running it the same hour it was posted. Your reframing is the right one: our lane's clean boots all route through vkd3d-proton, which is exactly why the in-box-runtime refusal never reaches us; glad the triage could use that as the boundary. One consequence worth pinning for the Linux side now that the triage named the mechanism: with the black picture settled as the capped-host-heap mirror gap, there are now **three** open routes — #2185 (clamp indices), #2121 (page title slots onto the capped heap, no shader-ABI change), and the fork's pre-submission record mirroring. We'll take whichever merges first as a cherry-pick onto our next world attempt; #2121's paging form is the one that needs no fork at all if it lands, so that's the one we'll watch. Written with an AI assistant.
bittertea0323 commented 2026-11-26 10:05:06 +00:00 (Migrated from github.com)
Author
Contributor

Imported from Marvisak/VIctory. Originally posted by bittertea0323 on 2026-11-26T09:27:56Z.


Everything above, plus the measurements it came from, is now written up in one place:

https://github.com/bittertea0323/gta6-win10-notes

The Windows 10 half only — that is the part no tree documents, because every fork is developed on 11. Nothing from the game is in it; it is patch text, configuration and numbers.

Two things in there may be useful beyond this thread:

patches/agility.rs — the Agility opt-in through ID3D12SDKConfiguration1 (CreateDeviceFactory + ApplyToGlobalState) instead of exporting D3D12SDKVersion/D3D12SDKPath from the exe. Three files, twelve lines, no build.rs needed, so it drops into trees that never had one. Verification is a single log line (Agility SDK loaded version=620) and root signature refused going to zero.

docs/02-heap-cap.md — why the 1,000,000 view-heap cap has to be solved by giving the title fewer slots, plus the page arithmetic for why paging one heap cannot fit: 2,880 usable pages against 4,864 needed, and the 32-submission take-back dropping in_use 2764 -> 269 with 244 pages still free.

Numbers were taken on one machine (RTX 4070 SUPER 12 GB, Win10 19045, driver 591.74). Where they do not transfer — 12 GB VRAM is a hard wall here, and warm removes stutter without changing average frame rate — the write-up says so.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7188026315 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/issues/2376#issuecomment-7188026315). Originally posted by [bittertea0323](https://github.com/bittertea0323) on 2026-11-26T09:27:56Z. --- Everything above, plus the measurements it came from, is now written up in one place: **https://github.com/bittertea0323/gta6-win10-notes** The Windows 10 half only — that is the part no tree documents, because every fork is developed on 11. Nothing from the game is in it; it is patch text, configuration and numbers. Two things in there may be useful beyond this thread: **`patches/agility.rs`** — the Agility opt-in through `ID3D12SDKConfiguration1` (`CreateDeviceFactory` + `ApplyToGlobalState`) instead of exporting `D3D12SDKVersion`/`D3D12SDKPath` from the exe. Three files, twelve lines, no `build.rs` needed, so it drops into trees that never had one. Verification is a single log line (`Agility SDK loaded version=620`) and `root signature refused` going to zero. **`docs/02-heap-cap.md`** — why the 1,000,000 view-heap cap has to be solved by giving the title *fewer* slots, plus the page arithmetic for why paging one heap cannot fit: 2,880 usable pages against 4,864 needed, and the 32-submission take-back dropping `in_use` 2764 -> 269 with 244 pages still free. Numbers were taken on one machine (RTX 4070 SUPER 12 GB, Win10 19045, driver 591.74). Where they do not transfer — 12 GB VRAM is a hard wall here, and `warm` removes stutter without changing average frame rate — the write-up says so.
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#2374
No description provided.