Ray tracing: title memory by address made ready for the structure builder, and view addresses read by slot (stacked on #854 and #993) #992

Open
PiloteCode wants to merge 37 commits from upstream-pr/994 into main
PiloteCode commented 2026-11-25 15:24:40 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by PiloteCode on 2026-11-25T15:24:40Z.


Stacked on #993 (pilote:pr/shaders2, 43ae84f9), itself on #854, on main 9a9091d1. The 15 commits after #993's are this PR's.

What main took meanwhile

This PR's lead was the structure builder running without crashing the title. main has the pieces of that now, in its own way, so they are left out here:

  • Dispatches by thread counts. main has #646's USER_DISPATCH_THREADS (dispatch_threads.rs, 0x106). This PR's thread-count form (USER_THREAD_LIMIT, a second translation for a cut-short last group) and its two tests are left out. #854 makes the paired form follow main's counts, lane by lane.
  • The builder runs by default (4966cd67, VICTORY_BVH_BUILDER=0 turns it off). This PR's commit that kept it opt-in is left out.
  • Node tests answer no hit while the builder is off. main does this at translation (VICTORY_BVH_NO_HIT, on while the builder is off; its comment credits this PR's idea). This PR's host word for it (USER_STRUCTURES) is left out.
    • BradRoland's commit on top of it (no lookup in the directory of title memory while traversal is off) is left out with it. main's no-hit form binds neither the directory nor the fault buffer (a_node_test_that_answers_no_hit_reads_nothing), which is what that commit made our host word do.
  • A structure's view at a fixed place of a table gives the structure's address. HyperEndgame found this on this PR, with the builder on, and fixed it in three lines (his probe went from no node test to 14.3M a frame). main made the same fix in 9a9091d1 (view_address). His test is kept here.
  • Copies of title memory by address kept current where named. main's 9a9091d1 syncs the copies a list's dispatches name and those reached through pointers (VICTORY_MEMORY_SYNC_ALL=1 for all), with up to 4,095 copies. This PR's version of that (VICTORY_MEMORY_ALL) is left out.

What this PR still adds

Title memory by address made ready for the builder (list.rs, memory.rs, host.rs, queue.rs, pipeline.rs, draw.rs)

  • List upload memory where shaders reach it. The builder hands its stages the addresses of tables it writes into list upload memory (allocate_upload), and its header stage reads its records through them. The layer gave out blocks of the process heap at 1.5-1.8 TiB, beyond the console's 40 bits and the directory of title memory by address (below 128 GiB): the records read as zeros and no structure header was written. Upload memory now comes from 4 MiB chunks of one 512 MiB write-watched reservation between 4 GiB and 128 GiB. Each chunk is a window of memory outside buffers, named with a dispatch's root views, so that what a stage reaches through pointers there is current. Larger requests still come from the heap.
  • The addresses in the records of upload memory are named. The leaf rehydration reads 48-byte D3D12_RAYTRACING_GEOMETRY_TRIANGLES_DESC records through a root SRV in upload memory, and loads vertices and indices through the addresses in them, which no root argument names. In one run, 638 of the 2,139 such addresses lay in no copy when the stage ran, and those leaves read zeros. Before such a dispatch, the block each root SRV points into is looked through (16 KiB at most) for 8-byte title addresses. Each one is named as the dispatch's own root views are, and is counted as a view in main's meter line.
  • Copies by address declared written only for address stores. main declared copies written for any program that reaches title memory by address and can store anywhere. Here only a program that can store through a raw address does: a flat or global store or atomic, not to scratch, or code not all known. Of the builder's 52 programs, 11 store that way. main's written-page notes then narrow it to the pages flagged.
  • The structures' sizes are copied on the card. The title copies each structure's compacted size out of the builder's buffer with CopyBufferRegion, in the list that computed it. Done on the CPU at submission, the copy took what the buffer held before the list's shaders ran. Now, in a list whose shaders store by address, a copy whose source those shaders declared written runs on the card behind them, and its destination is declared written. Other title copies stay on the CPU. VICTORY_CARD_TITLE_COPIES=0 turns this off.
  • Remaps after the flights. CopyPageMappingsBatchX maps pool pages at once, while the console does it behind the work sent before. A remap now first waits for the flights in the air whose declared writes touch its range, so that their writes are not put back into pages mapped there since. VICTORY_REMAP_LAND=0 turns this off.

View addresses read from the view heap by slot (descriptor/host.rs, draw.rs, emit/lower.rs)

Four sun-shadow trace programs (shadowmask:CS_TraceShadowRays at full, half, quarter and eighth resolution) take their structure's address out of a buffer descriptor they pick from the view heap at a computed index. Without this they stop at "a descriptor read only as data". The host keeps, per view heap, a table of each slot's view address (SLOT_VIEW_ADDRESSES, a root SRV beside the strides), built with main's view_address, and such a load reads it.

Diagnostics (diagnostics builds)

  • VICTORY_BVH_TRACE=<file>, written unbuffered so that a crashing run keeps it. One line per:
    • dispatch of the builder and of programs that reach title memory by address;
    • read of upload memory;
    • range put back into title memory;
    • page mapping, copy and read-back.
  • VICTORY_BVH_DRY=1 binds the builder's dispatches without running them.
  • VICTORY_BVH_CHECK=<hash>[,<hash>] walks the structures that the header stage, and the in-place rebuild's header stage, start, once their headers are put back. It reports bad nodes: bounds not finite, inverted or outside the parent's, nodes outside the structure or reached twice.
  • VICTORY_CRASH_MEMORY=1 adds to a crash report the title memory around each register that holds a title address, and one pointer further.

Tests

  • With VICTORY_TEST_BVH_DLL pointing at the title's builder DLL (skipped when unset), the builder's wave64 programs run in their picked and paired forms on the same inputs, and agree (main's paired form now).
  • HyperEndgame's: a structure's view at a fixed place of a table gives the structure's address, and an empty slot 0 (no adapter needed).
  • The shader tests keep one device per adapter for the whole test process. Two card test sessions had died in the driver (an access violation in the display driver on a driver thread, reading freed memory) after a test made and dropped its device.

Switches

Switch Default Effect
VICTORY_CARD_TITLE_COPIES on =0: the title's buffer copies all on the CPU, as before
VICTORY_REMAP_LAND on =0: remaps do not wait for flights
VICTORY_BVH_TRACE, VICTORY_BVH_DRY, VICTORY_BVH_CHECK, VICTORY_CRASH_MEMORY off diagnostics, above

Tested

The branch was checked as it is (on #993 on 9a9091d1), on the software adapter (no card):

  • cargo test -p victory-shader -- --test-threads=1 with VICTORY_WARP=1: 294 passed, 6 failed, 18 ignored. These are the same six as on #854 and #993. The tests that need the title's builder DLL skip.
  • cargo test -p victory-gpu --features diagnostics -- --test-threads=1 --skip stacks_that_mean_nothing_are_walked_without_a_fault with VICTORY_D3D12_WARP=1: 264 passed, none failed.
  • cargo clippy -p victory-shader -p victory-gpu -p victory -p victory-loader --locked -- -D warnings: clean.
  • The same with --all-targets --all-features for victory-gpu and victory-loader: clean.
  • cargo build --profile diag -p victory --features diagnostics passes.

Earlier, before the rebuild, in runs of our tree on an RTX 5090 with this PR's own thread-count form and these changes: 420 s of save gameplay with the builder on, no fault and no card loss.

The census of the shader pack for this rebuild follows.

Overlaps with open pull requests

  • #916 is the same change as "copies by address declared written only for address stores" (stores_by_address in pipeline.rs).
  • #738 and #749 keep a table of view addresses by heap slot as well. #738 uses the same slot (SLOT_VIEW_ADDRESSES, 252) and also widens complement masks, which makes the fifth shadow-mask program translate. #749 keeps addresses, lengths and strides.
  • #814 and #905 (live ray tracing) carry view addresses and title-memory write-back changes of their own.
  • #911 caps constant buffer views at 64 KiB. With the builder on, main needed it (or an equivalent cap) when we last ran it: without it a 1.3 MB view removed the device on an RTX 4070 about 36 s after the builder's pipelines were ready (rafaconvaitis on this PR).

Not tested

  • A run of this exact branch in the title.
  • Pictures against the console's: whether the traced passes light right with the builder on.
  • GPUs with 64-lane waves (AMD); Intel; Linux/Proton.

Where this also lives

These changes are also in PiloteBox (https://github.com/PiloteCode/PiloteBox), a tree kept up to date for NVIDIA cards. Its 0.13.1 runs the Series X profile at about 21 frames a second on an RTX 5090 (46.6 and 48.8 ms a frame in one scene; its changelog says how that was measured).

<!-- greyfinch-sync:fxceless/victory-fork:issue:5494228876 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/994). Originally posted by [PiloteCode](https://github.com/PiloteCode) on 2026-11-25T15:24:40Z. --- **Stacked on #993** (`pilote:pr/shaders2`, 43ae84f9), itself on #854, on `main` `9a9091d1`. The 15 commits after #993's are this PR's. ## What `main` took meanwhile This PR's lead was the structure builder running without crashing the title. `main` has the pieces of that now, in its own way, so they are left out here: - **Dispatches by thread counts.** `main` has #646's `USER_DISPATCH_THREADS` (`dispatch_threads.rs`, 0x106). This PR's thread-count form (`USER_THREAD_LIMIT`, a second translation for a cut-short last group) and its two tests are left out. #854 makes the paired form follow `main`'s counts, lane by lane. - **The builder runs by default** (4966cd67, `VICTORY_BVH_BUILDER=0` turns it off). This PR's commit that kept it opt-in is left out. - **Node tests answer no hit while the builder is off.** `main` does this at translation (`VICTORY_BVH_NO_HIT`, on while the builder is off; its comment credits this PR's idea). This PR's host word for it (`USER_STRUCTURES`) is left out. - BradRoland's commit on top of it (no lookup in the directory of title memory while traversal is off) is left out with it. `main`'s no-hit form binds neither the directory nor the fault buffer (`a_node_test_that_answers_no_hit_reads_nothing`), which is what that commit made our host word do. - **A structure's view at a fixed place of a table gives the structure's address.** HyperEndgame found this on this PR, with the builder on, and fixed it in three lines (his probe went from no node test to 14.3M a frame). `main` made the same fix in 9a9091d1 (`view_address`). His test is kept here. - **Copies of title memory by address kept current where named.** `main`'s 9a9091d1 syncs the copies a list's dispatches name and those reached through pointers (`VICTORY_MEMORY_SYNC_ALL=1` for all), with up to 4,095 copies. This PR's version of that (`VICTORY_MEMORY_ALL`) is left out. ## What this PR still adds ### Title memory by address made ready for the builder (`list.rs`, `memory.rs`, `host.rs`, `queue.rs`, `pipeline.rs`, `draw.rs`) - **List upload memory where shaders reach it.** The builder hands its stages the addresses of tables it writes into list upload memory (`allocate_upload`), and its header stage reads its records through them. The layer gave out blocks of the process heap at 1.5-1.8 TiB, beyond the console's 40 bits and the directory of title memory by address (below 128 GiB): the records read as zeros and no structure header was written. Upload memory now comes from 4 MiB chunks of one 512 MiB write-watched reservation between 4 GiB and 128 GiB. Each chunk is a window of memory outside buffers, named with a dispatch's root views, so that what a stage reaches through pointers there is current. Larger requests still come from the heap. - **The addresses in the records of upload memory are named.** The leaf rehydration reads 48-byte `D3D12_RAYTRACING_GEOMETRY_TRIANGLES_DESC` records through a root SRV in upload memory, and loads vertices and indices through the addresses in them, which no root argument names. In one run, 638 of the 2,139 such addresses lay in no copy when the stage ran, and those leaves read zeros. Before such a dispatch, the block each root SRV points into is looked through (16 KiB at most) for 8-byte title addresses. Each one is named as the dispatch's own root views are, and is counted as a view in `main`'s meter line. - **Copies by address declared written only for address stores.** `main` declared copies written for any program that reaches title memory by address and can store anywhere. Here only a program that can store through a raw address does: a flat or global store or atomic, not to scratch, or code not all known. Of the builder's 52 programs, 11 store that way. `main`'s written-page notes then narrow it to the pages flagged. - **The structures' sizes are copied on the card.** The title copies each structure's compacted size out of the builder's buffer with `CopyBufferRegion`, in the list that computed it. Done on the CPU at submission, the copy took what the buffer held before the list's shaders ran. Now, in a list whose shaders store by address, a copy whose source those shaders declared written runs on the card behind them, and its destination is declared written. Other title copies stay on the CPU. `VICTORY_CARD_TITLE_COPIES=0` turns this off. - **Remaps after the flights.** `CopyPageMappingsBatchX` maps pool pages at once, while the console does it behind the work sent before. A remap now first waits for the flights in the air whose declared writes touch its range, so that their writes are not put back into pages mapped there since. `VICTORY_REMAP_LAND=0` turns this off. ### View addresses read from the view heap by slot (`descriptor/host.rs`, `draw.rs`, `emit/lower.rs`) Four sun-shadow trace programs (`shadowmask:CS_TraceShadowRays` at full, half, quarter and eighth resolution) take their structure's address out of a buffer descriptor they pick from the view heap at a computed index. Without this they stop at "a descriptor read only as data". The host keeps, per view heap, a table of each slot's view address (`SLOT_VIEW_ADDRESSES`, a root SRV beside the strides), built with `main`'s `view_address`, and such a load reads it. ### Diagnostics (diagnostics builds) - `VICTORY_BVH_TRACE=<file>`, written unbuffered so that a crashing run keeps it. One line per: - dispatch of the builder and of programs that reach title memory by address; - read of upload memory; - range put back into title memory; - page mapping, copy and read-back. - `VICTORY_BVH_DRY=1` binds the builder's dispatches without running them. - `VICTORY_BVH_CHECK=<hash>[,<hash>]` walks the structures that the header stage, and the in-place rebuild's header stage, start, once their headers are put back. It reports bad nodes: bounds not finite, inverted or outside the parent's, nodes outside the structure or reached twice. - `VICTORY_CRASH_MEMORY=1` adds to a crash report the title memory around each register that holds a title address, and one pointer further. ### Tests - With `VICTORY_TEST_BVH_DLL` pointing at the title's builder DLL (skipped when unset), the builder's wave64 programs run in their picked and paired forms on the same inputs, and agree (`main`'s paired form now). - HyperEndgame's: a structure's view at a fixed place of a table gives the structure's address, and an empty slot 0 (no adapter needed). - The shader tests keep one device per adapter for the whole test process. Two card test sessions had died in the driver (an access violation in the display driver on a driver thread, reading freed memory) after a test made and dropped its device. ## Switches | Switch | Default | Effect | |---|---|---| | `VICTORY_CARD_TITLE_COPIES` | on | `=0`: the title's buffer copies all on the CPU, as before | | `VICTORY_REMAP_LAND` | on | `=0`: remaps do not wait for flights | | `VICTORY_BVH_TRACE`, `VICTORY_BVH_DRY`, `VICTORY_BVH_CHECK`, `VICTORY_CRASH_MEMORY` | off | diagnostics, above | ## Tested The branch was checked as it is (on #993 on `9a9091d1`), on the software adapter (no card): - `cargo test -p victory-shader -- --test-threads=1` with `VICTORY_WARP=1`: 294 passed, 6 failed, 18 ignored. These are the same six as on #854 and #993. The tests that need the title's builder DLL skip. - `cargo test -p victory-gpu --features diagnostics -- --test-threads=1 --skip stacks_that_mean_nothing_are_walked_without_a_fault` with `VICTORY_D3D12_WARP=1`: 264 passed, none failed. - `cargo clippy -p victory-shader -p victory-gpu -p victory -p victory-loader --locked -- -D warnings`: clean. - The same with `--all-targets --all-features` for `victory-gpu` and `victory-loader`: clean. - `cargo build --profile diag -p victory --features diagnostics` passes. Earlier, before the rebuild, in runs of our tree on an RTX 5090 with this PR's own thread-count form and these changes: 420 s of save gameplay with the builder on, no fault and no card loss. The census of the shader pack for this rebuild follows. ## Overlaps with open pull requests - **#916** is the same change as "copies by address declared written only for address stores" (`stores_by_address` in `pipeline.rs`). - **#738** and **#749** keep a table of view addresses by heap slot as well. #738 uses the same slot (`SLOT_VIEW_ADDRESSES`, 252) and also widens complement masks, which makes the fifth shadow-mask program translate. #749 keeps addresses, lengths and strides. - **#814** and **#905** (live ray tracing) carry view addresses and title-memory write-back changes of their own. - **#911** caps constant buffer views at 64 KiB. With the builder on, `main` needed it (or an equivalent cap) when we last ran it: without it a 1.3 MB view removed the device on an RTX 4070 about 36 s after the builder's pipelines were ready (rafaconvaitis on this PR). ## Not tested - A run of this exact branch in the title. - Pictures against the console's: whether the traced passes light right with the builder on. - GPUs with 64-lane waves (AMD); Intel; Linux/Proton. ## Where this also lives These changes are also in PiloteBox (https://github.com/PiloteCode/PiloteBox), a tree kept up to date for NVIDIA cards. Its 0.13.1 runs the Series X profile at about 21 frames a second on an RTX 5090 (46.6 and 48.8 ms a frame in one scene; its changelog says how that was measured).
rafaconvaitis commented 2026-11-25 16:12:53 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by rafaconvaitis on 2026-11-25T15:55:47Z.


I tested c9ca6b2 with a lean native build and a test-only keyboard input shim on another RTX 4070 12 GB (driver 616.64, Windows 11 build 26300). The run used Series X, a cold pipeline cache, and VICTORY_BVH_BUILDER=1 with the remaining branch defaults.

  • All 53 builder pipelines were ready 421.4 s after account selection.
  • 35.72 s later the device was removed with DXGI_ERROR_INVALID_CALL (0x887A0001) while the host was mirroring heap buffer views.
  • The sampled views at removal included Constant(…, 1267456), compared with the D3D12 CBV limit of 65,536 bytes. The check sampled a batch of views, so the exact failing call remains unconfirmed.

This matches the symptom addressed by #911. I am testing its size cap in isolation on this head, using the same checkpoint and console profile.

<!-- greyfinch-sync:fxceless/victory-fork:comment:7167438479 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/994#issuecomment-7167438479). Originally posted by [rafaconvaitis](https://github.com/rafaconvaitis) on 2026-11-25T15:55:47Z. --- I tested `c9ca6b2` with a lean native build and a test-only keyboard input shim on another RTX 4070 12 GB (driver 616.64, Windows 11 build 26300). The run used Series X, a cold pipeline cache, and `VICTORY_BVH_BUILDER=1` with the remaining branch defaults. - All 53 builder pipelines were ready 421.4 s after account selection. - 35.72 s later the device was removed with `DXGI_ERROR_INVALID_CALL` (`0x887A0001`) while the host was mirroring heap buffer views. - The sampled views at removal included `Constant(…, 1267456)`, compared with the D3D12 CBV limit of 65,536 bytes. The check sampled a batch of views, so the exact failing call remains unconfirmed. This matches the symptom addressed by #911. I am testing its size cap in isolation on this head, using the same checkpoint and console profile.
PiloteCode commented 2026-11-25 16:12:53 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by PiloteCode on 2026-11-25T15:55:51Z.


Thanks for running it in the title — that was the check we could not make.

It matches what we saw: with dispatches by thread counts run as thread counts, the builder runs and nothing crashes. The 3–12 s crashes you had on #935 fit the overrun: in the first frame of a crashing run, the box stages wrote about 2.2 GiB of empty nodes past their levels, over pages the title's own objects share at another CPU view.

On the cost: the 1.2–4 s frames on entering the world look like the usual arrival (texture uploads and the heap pass), which is slow with or without the builder, and the trace's writes come on top. Without the trace, in our runs on an RTX 5090, the builder cost about 88 ms of card time a frame in the window scene (160 ms against 72), which is why this PR keeps it opt-in. If you have the time, a run with VICTORY_BVH_BUILDER=1 and no VICTORY_BVH_TRACE, against the same save without the builder, would give its price on a 4070.

And yes, please keep the quarantine (HostList::quarantine) as a small PR of its own: it is independent of the overrun. If #935 drops bvhtrace.rs and the crash-memory dump in favour of this one, the two will not conflict there, and we will look at the quarantine for our tree too.

<!-- greyfinch-sync:fxceless/victory-fork:comment:7167439593 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/994#issuecomment-7167439593). Originally posted by [PiloteCode](https://github.com/PiloteCode) on 2026-11-25T15:55:51Z. --- Thanks for running it in the title — that was the check we could not make. It matches what we saw: with dispatches by thread counts run as thread counts, the builder runs and nothing crashes. The 3–12 s crashes you had on #935 fit the overrun: in the first frame of a crashing run, the box stages wrote about 2.2 GiB of empty nodes past their levels, over pages the title's own objects share at another CPU view. On the cost: the 1.2–4 s frames on entering the world look like the usual arrival (texture uploads and the heap pass), which is slow with or without the builder, and the trace's writes come on top. Without the trace, in our runs on an RTX 5090, the builder cost about 88 ms of card time a frame in the window scene (160 ms against 72), which is why this PR keeps it opt-in. If you have the time, a run with `VICTORY_BVH_BUILDER=1` and no `VICTORY_BVH_TRACE`, against the same save without the builder, would give its price on a 4070. And yes, please keep the quarantine (`HostList::quarantine`) as a small PR of its own: it is independent of the overrun. If #935 drops `bvhtrace.rs` and the crash-memory dump in favour of this one, the two will not conflict there, and we will look at the quarantine for our tree too.
TheoGegout commented 2026-11-25 16:12:54 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by TheoGegout on 2026-11-25T15:47:19Z.


Ran this exact branch in the title, since you could not: no crash with the builder on.

Setup. Head c9ca6b2, cargo build --profile diag -p victory --features diagnostics, AMD Radeon RX 6800 XT (host wave lanes 32 to 64), Windows 11. That is the case your "Not tested" lists: a GPU with 64-lane waves, where the builder's wave64 programs run without the paired form, and the thread-count form ran there. VICTORY_BVH_BUILDER=1, VICTORY_BVH_TRACE=<file>, VICTORY_CRASH_MEMORY=1, VICTORY_RELAY=2. Save gameplay.

Result.

  • The builder ran from its first frame: "all of its programs have host pipelines" (53 pipelines).
  • More than 5 minutes in the world with it on (frames 2,371 to 2,959 in the trace, still running when I stopped looking): no exception, no device loss, no crash. On #935 (main plus the quarantine fix) the same save crashed 3 to 12 s after the builder's first frame, so the thread-count overrun fits what I saw there.
  • 265,628 builder dispatches in the trace. The rehydrate call's four programs all ran, none dropped: caa78b8ca62bc3d6 16,153, 28918b7150a7aad5 8,128, 5e68767498c57eb6 2,744, 4ddd6f9702fab2a7 2,744.
  • No ERROR line. 50 warnings of "shaders touched pages that had no copy", each followed by the copies being made.

Cost, with the trace on (it wrote 115 MB in the first 90 s):

  • On entering the world, frames of 1.2 to 4 s, all on the CPU (texture uploads at 2.5 s a frame with 21,887 waiting, the heap pass up to 1.4 s). The card was idle 80 to 90 % of the time.
  • Once textures settled, a median of 343 ms a frame (303 to 379), the card mostly idle. I have no run of this branch without the builder to compare against yet.

So my #935 diagnosis (the rehydrate stages' lost reads through pointers) was describing the overrun's effects, not its cause. Happy to drop the overlapping parts of #935 (bvhtrace.rs, crash.rs) in favour of yours. The quarantine fix (HostList::quarantine) still stands on its own if you want it.

<!-- greyfinch-sync:fxceless/victory-fork:comment:7167316005 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/994#issuecomment-7167316005). Originally posted by [TheoGegout](https://github.com/TheoGegout) on 2026-11-25T15:47:19Z. --- Ran this exact branch in the title, since you could not: no crash with the builder on. **Setup.** Head `c9ca6b2`, `cargo build --profile diag -p victory --features diagnostics`, AMD Radeon RX 6800 XT (host wave lanes 32 to 64), Windows 11. That is the case your "Not tested" lists: a GPU with 64-lane waves, where the builder's wave64 programs run without the paired form, and the thread-count form ran there. `VICTORY_BVH_BUILDER=1`, `VICTORY_BVH_TRACE=<file>`, `VICTORY_CRASH_MEMORY=1`, `VICTORY_RELAY=2`. Save gameplay. **Result.** - The builder ran from its first frame: "all of its programs have host pipelines" (53 pipelines). - More than 5 minutes in the world with it on (frames 2,371 to 2,959 in the trace, still running when I stopped looking): no exception, no device loss, no crash. On #935 (`main` plus the quarantine fix) the same save crashed 3 to 12 s after the builder's first frame, so the thread-count overrun fits what I saw there. - 265,628 builder dispatches in the trace. The rehydrate call's four programs all ran, none dropped: `caa78b8ca62bc3d6` 16,153, `28918b7150a7aad5` 8,128, `5e68767498c57eb6` 2,744, `4ddd6f9702fab2a7` 2,744. - No ERROR line. 50 warnings of "shaders touched pages that had no copy", each followed by the copies being made. **Cost**, with the trace on (it wrote 115 MB in the first 90 s): - On entering the world, frames of 1.2 to 4 s, all on the CPU (texture uploads at 2.5 s a frame with 21,887 waiting, the heap pass up to 1.4 s). The card was idle 80 to 90 % of the time. - Once textures settled, a median of 343 ms a frame (303 to 379), the card mostly idle. I have no run of this branch without the builder to compare against yet. So my #935 diagnosis (the rehydrate stages' lost reads through pointers) was describing the overrun's effects, not its cause. Happy to drop the overlapping parts of #935 (`bvhtrace.rs`, `crash.rs`) in favour of yours. The quarantine fix (`HostList::quarantine`) still stands on its own if you want it.
PiloteCode commented 2026-11-25 16:12:54 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by PiloteCode on 2026-11-25T16:02:10Z.


@rafaconvaitis thanks — that fits a gap between this branch and the tree it came from, not the builder itself.

main (and so this branch) makes a constant buffer view of whatever size the title gives, and D3D12 allows at most 65,536 bytes (4,096 × 16). In our tree the size is clamped first: constant_bytes in descriptor/host.rs takes size.min(64 KiB) rounded up to 256, the same cap as #911. With it, the builder ran 420 s of save gameplay without a removal on our RTX 5090. This PR does not carry that cap, because it is #911's change.

So with #911 on top (or merged first), the Constant(…, 1267456) view should no longer remove the device. Your isolated test of #911 on this head will tell; if anything else shows up after it, please post it here.

<!-- greyfinch-sync:fxceless/victory-fork:comment:7167535073 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/994#issuecomment-7167535073). Originally posted by [PiloteCode](https://github.com/PiloteCode) on 2026-11-25T16:02:10Z. --- @rafaconvaitis thanks — that fits a gap between this branch and the tree it came from, not the builder itself. `main` (and so this branch) makes a constant buffer view of whatever size the title gives, and D3D12 allows at most 65,536 bytes (4,096 × 16). In our tree the size is clamped first: `constant_bytes` in `descriptor/host.rs` takes `size.min(64 KiB)` rounded up to 256, the same cap as #911. With it, the builder ran 420 s of save gameplay without a removal on our RTX 5090. This PR does not carry that cap, because it is #911's change. So with #911 on top (or merged first), the `Constant(…, 1267456)` view should no longer remove the device. Your isolated test of #911 on this head will tell; if anything else shows up after it, please post it here.
HLVM04 commented 2026-11-25 17:08:02 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by HLVM04 on 2026-11-25T16:28:34Z.


An NVIDIA 32-lane data point (RTX 5070 Ti, driver 616.64, Windows 11, Series S profile). This PR was merged into our local tree: main 0b0074e + #798 #783 #799 #770 #827 #845 #896 #807 #987, plus local changes. That tree carries #799's CBV size clamp.

  • With VICTORY_BVH_BUILDER=1, it ran 240 s with no crash and no device loss.
  • Before, with only our own local fix for the 0x20 thread-count flag, the builder crashed about 70 s in on an earlier version of that tree, with or without VICTORY_BVH_QUARANTINE=1.
  • Cost: about 589 ms a frame with the builder on. The same stack without it has a median of 78 ms in the first gameplay scene. That is one run each, not a matched A/B, so take it only as an order of magnitude. Pictures were not compared.

Not having the 0x887A0001 removal reported above fits PiloteCode's reading that a CBV size cap (#911, or #799's clamp here) is what that run was missing. We did not test that directly.

<!-- greyfinch-sync:fxceless/victory-fork:comment:7168040914 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/994#issuecomment-7168040914). Originally posted by [HLVM04](https://github.com/HLVM04) on 2026-11-25T16:28:34Z. --- An NVIDIA 32-lane data point (RTX 5070 Ti, driver 616.64, Windows 11, Series S profile). This PR was merged into our local tree: main 0b0074e + #798 #783 #799 #770 #827 #845 #896 #807 #987, plus local changes. That tree carries #799's CBV size clamp. - With `VICTORY_BVH_BUILDER=1`, it ran 240 s with no crash and no device loss. - Before, with only our own local fix for the 0x20 thread-count flag, the builder crashed about 70 s in on an earlier version of that tree, with or without `VICTORY_BVH_QUARANTINE=1`. - Cost: about 589 ms a frame with the builder on. The same stack without it has a median of 78 ms in the first gameplay scene. That is one run each, not a matched A/B, so take it only as an order of magnitude. Pictures were not compared. Not having the 0x887A0001 removal reported above fits PiloteCode's reading that a CBV size cap (#911, or #799's clamp here) is what that run was missing. We did not test that directly.
PiloteCode commented 2026-11-25 17:08:03 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by PiloteCode on 2026-11-25T16:36:21Z.


@HLVM04 Thanks for the run. It confirms on a 32-lane NVIDIA card that the builder runs with this PR in your tree: 240 s with no crash and no device loss. It also fits the reading above: in a tree with a constant buffer size cap (#799's clamp here, #911 otherwise), the 0x887A0001 removal did not come, though as you say that is not a direct test.

On the cost, our runs point the same way. On our RTX 5090 the builder added 88 ms of card time a frame in the window scene (160 ms against 72). The opening cutscene's frame median went from 385 ms to 752 ms between two successive builds of our tree, the second with the builder on by default (it had other changes too). That is why this PR keeps the builder opt-in (VICTORY_BVH_BUILDER=1).

<!-- greyfinch-sync:fxceless/victory-fork:comment:7168247364 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/994#issuecomment-7168247364). Originally posted by [PiloteCode](https://github.com/PiloteCode) on 2026-11-25T16:36:21Z. --- @HLVM04 Thanks for the run. It confirms on a 32-lane NVIDIA card that the builder runs with this PR in your tree: 240 s with no crash and no device loss. It also fits the reading above: in a tree with a constant buffer size cap (#799's clamp here, #911 otherwise), the `0x887A0001` removal did not come, though as you say that is not a direct test. On the cost, our runs point the same way. On our RTX 5090 the builder added 88 ms of card time a frame in the window scene (160 ms against 72). The opening cutscene's frame median went from 385 ms to 752 ms between two successive builds of our tree, the second with the builder on by default (it had other changes too). That is why this PR keeps the builder opt-in (`VICTORY_BVH_BUILDER=1`).
TheoGegout commented 2026-11-25 17:08:04 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by TheoGegout on 2026-11-25T16:56:40Z.


The two runs you asked for, without the trace, on the same Radeon RX 6800 XT (same head c9ca6b2, diag build, VICTORY_RELAY=2, same save, standing still at the same spot):

Frame median once settled Builder
VICTORY_BVH_BUILDER unset 230 to 241 ms (12 windows of 5 s) off
VICTORY_BVH_BUILDER=1 246 to 284 ms, still falling (last 7 windows) on

So about 30 ms a frame on this card (233 against 266 on average), less than the 88 ms you measured, though the second run had not quite settled.

But the second run lost the device 3 min 8 s after "the ray-tracing structure builder runs":

ERROR victory_gpu::host: host GPU device removed after 21 submissions sent ahead (VICTORY_RELAY=1) of 87 lists; no breadcrumbs (0x887A0004); device removed: 0x887A0006

0x887A0006 is DXGI_ERROR_DEVICE_HUNG, not the 0x887A0001 invalid call reported above on the RTX 4070. No exception before it. The run with the trace on (my first report) went more than 5 minutes with the builder and did not hang, so it may depend on timing. One run each so far; I can repeat it, or run with VICTORY_D3D12_DEBUG=1 if that would help.

(A first attempt at the run without the builder crashed inside the AMD driver's shader compiler when the system ran out of commit, unrelated to this PR; the runs above are after enlarging the page file.)

<!-- greyfinch-sync:fxceless/victory-fork:comment:7168766029 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/994#issuecomment-7168766029). Originally posted by [TheoGegout](https://github.com/TheoGegout) on 2026-11-25T16:56:40Z. --- The two runs you asked for, without the trace, on the same Radeon RX 6800 XT (same head `c9ca6b2`, diag build, `VICTORY_RELAY=2`, same save, standing still at the same spot): | | Frame median once settled | Builder | |---|---|---| | `VICTORY_BVH_BUILDER` unset | 230 to 241 ms (12 windows of 5 s) | off | | `VICTORY_BVH_BUILDER=1` | 246 to 284 ms, still falling (last 7 windows) | on | So about 30 ms a frame on this card (233 against 266 on average), less than the 88 ms you measured, though the second run had not quite settled. **But the second run lost the device** 3 min 8 s after "the ray-tracing structure builder runs": ``` ERROR victory_gpu::host: host GPU device removed after 21 submissions sent ahead (VICTORY_RELAY=1) of 87 lists; no breadcrumbs (0x887A0004); device removed: 0x887A0006 ``` `0x887A0006` is `DXGI_ERROR_DEVICE_HUNG`, not the `0x887A0001` invalid call reported above on the RTX 4070. No exception before it. The run with the trace on (my first report) went more than 5 minutes with the builder and did not hang, so it may depend on timing. One run each so far; I can repeat it, or run with `VICTORY_D3D12_DEBUG=1` if that would help. (A first attempt at the run without the builder crashed inside the AMD driver's shader compiler when the system ran out of commit, unrelated to this PR; the runs above are after enlarging the page file.)
PiloteCode commented 2026-11-25 17:08:05 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by PiloteCode on 2026-11-25T17:01:19Z.


@rafaconvaitis thanks, that settles it: the same head and checkpoint, with only #911's cap added, went from a removal 35.72 s after the builder's pipelines were ready to 240 s without one, and the log shows the 1,320,192-byte view cut to 65,536. So running the builder on main needs #911 (or an equivalent cap); I have added that to this PR's description.

<!-- greyfinch-sync:fxceless/victory-fork:comment:7168881984 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/994#issuecomment-7168881984). Originally posted by [PiloteCode](https://github.com/PiloteCode) on 2026-11-25T17:01:19Z. --- @rafaconvaitis thanks, that settles it: the same head and checkpoint, with only #911's cap added, went from a removal 35.72 s after the builder's pipelines were ready to 240 s without one, and the log shows the 1,320,192-byte view cut to 65,536. So running the builder on `main` needs #911 (or an equivalent cap); I have added that to this PR's description.
PiloteCode commented 2026-11-25 17:08:05 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by PiloteCode on 2026-11-25T17:01:21Z.


@TheoGegout thanks, both numbers are useful. About 30 ms a frame on an RX 6800 XT, against our 88 ms of card time on an RTX 5090, fits the builder's programs running in their own wave64 form on AMD rather than in the paired form a 32-lane GPU needs.

The hang matters more. As the description says under "Not tested", the thread-count form (threads past the counts leave at entry, USER_THREAD_LIMIT) has not been run by us on a 64-lane GPU: on AMD the builder's wave64 programs take that form natively, so this is the first run of it there. 0x887A0006 with nothing before it fits a dispatch that never finishes.

If you can repeat it, a diagnostics build with VICTORY_D3D12_DRED=1 would say which command the card was on when it hung (breadcrumbs and page-fault data in the removal report), at much less cost than the debug layer, which may hide a timing-dependent hang. Running the same save once more with the trace on would also tell whether the trace's extra time is what kept your first run alive.

<!-- greyfinch-sync:fxceless/victory-fork:comment:7168882444 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/994#issuecomment-7168882444). Originally posted by [PiloteCode](https://github.com/PiloteCode) on 2026-11-25T17:01:21Z. --- @TheoGegout thanks, both numbers are useful. About 30 ms a frame on an RX 6800 XT, against our 88 ms of card time on an RTX 5090, fits the builder's programs running in their own wave64 form on AMD rather than in the paired form a 32-lane GPU needs. The hang matters more. As the description says under "Not tested", the thread-count form (threads past the counts leave at entry, `USER_THREAD_LIMIT`) has not been run by us on a 64-lane GPU: on AMD the builder's wave64 programs take that form natively, so this is the first run of it there. `0x887A0006` with nothing before it fits a dispatch that never finishes. If you can repeat it, a diagnostics build with `VICTORY_D3D12_DRED=1` would say which command the card was on when it hung (breadcrumbs and page-fault data in the removal report), at much less cost than the debug layer, which may hide a timing-dependent hang. Running the same save once more with the trace on would also tell whether the trace's extra time is what kept your first run alive.
rafaconvaitis commented 2026-11-25 17:08:05 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by rafaconvaitis on 2026-11-25T16:45:44Z.


I ran the direct #911 comparison on the same RTX 4070 12 GB (616.64). Both runs used the same Series X checkpoint, c9ca6b2 with the same input-only shim, cold pipeline caches, and VICTORY_BVH_BUILDER=1. The second run added only the 1087538 CBV cap.

  • Reference lost the host device with 0x887A0001 35.72 s after the 53 builder pipelines were ready.
  • With the cap, the log recorded a request for 1,320,192 bytes reduced to 65,536. Rendering continued for 240.81 s after that message and the window closed normally, 254.75 s after the builder pipelines were ready. The log contained no device removal or title exception in that interval.

A separate warm-cache run reached the cell, responded to camera and movement, and reached the prompt to talk to the companion. It closed at 735.78 s after builder readiness with no device removal. Median was 2.0 fps across 67 samples with at least 4,500 draws and no pending pipelines. Strong window glare and dark room surfaces were still visible.

For anyone using Codex to test the renderer, its UI showed the “This content can’t be shown” Daybreak safety banner during this graphics session. I left a report in openai/codex#63232. If you have seen the same banner during graphics work, adding the client version and context there may help the Codex team investigate.

<!-- greyfinch-sync:fxceless/victory-fork:comment:7168491594 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/994#issuecomment-7168491594). Originally posted by [rafaconvaitis](https://github.com/rafaconvaitis) on 2026-11-25T16:45:44Z. --- I ran the direct #911 comparison on the same RTX 4070 12 GB (616.64). Both runs used the same Series X checkpoint, `c9ca6b2` with the same input-only shim, cold pipeline caches, and `VICTORY_BVH_BUILDER=1`. The second run added only the `1087538` CBV cap. - Reference lost the host device with `0x887A0001` 35.72 s after the 53 builder pipelines were ready. - With the cap, the log recorded a request for 1,320,192 bytes reduced to 65,536. Rendering continued for 240.81 s after that message and the window closed normally, 254.75 s after the builder pipelines were ready. The log contained no device removal or title exception in that interval. A separate warm-cache run reached the cell, responded to camera and movement, and reached the prompt to talk to the companion. It closed at 735.78 s after builder readiness with no device removal. Median was 2.0 fps across 67 samples with at least 4,500 draws and no pending pipelines. Strong window glare and dark room surfaces were still visible. For anyone using Codex to test the renderer, its UI showed the “This content can’t be shown” Daybreak safety banner during this graphics session. I left a report in openai/codex#63232. If you have seen the same banner during graphics work, adding the client version and context there may help the Codex team investigate.
oz-stanislav-zhukov commented 2026-11-25 18:05:11 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by oz-stanislav-zhukov on 2026-11-25T17:20:29Z.


Another 32-lane NVIDIA data point, this time on Windows 10 (Agility SDK): RTX 5060 Ti 16 GB, i7-14700KF, Series X profile. This PR was merged into our tree: a253706 + 0b0074e + #854 #959 + Belobug's ambient pass. That tree has no CBV size cap (#911 / #799).

  • With VICTORY_BVH_BUILDER=1: "the ray-tracing structure builder runs ... pipelines=53", ~11 min including world entry and the cell, no crash and no device removal. Before this PR the same tree crashed at world entry, reading 0xffffffffffffffff in the title. I don't know why the missing CBV cap didn't bite here. It may just not have hit a large view in that stretch.
  • Cost, builder on vs off (the off run adds only Zettrox/ztrx#148 and a log counter): 3.3-3.7 fps → 2.4-3.0 fps. On the GPU ~172 → ~272 ms a frame, copying back ~174 → ~281 ms.
  • The picture got much darker with the builder on: the cell and the bunks are mostly in shade, where with it off they are lit. Our ambient constant (written after CS_ScreenProbes_TemporalResolve, as in #917) still ran (shaded=true in the log), so the traced passes seem to darken what it adds. Is that expected while the structures are only partly right, or does it point at something the traced passes read?

We keep the builder off for now. The PR is still worth taking for the crash fix alone.

AI-assisted (Claude Code, Claude Opus 5.5); no game data.

<!-- greyfinch-sync:fxceless/victory-fork:comment:7169362576 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/994#issuecomment-7169362576). Originally posted by [oz-stanislav-zhukov](https://github.com/oz-stanislav-zhukov) on 2026-11-25T17:20:29Z. --- Another 32-lane NVIDIA data point, this time on Windows 10 (Agility SDK): RTX 5060 Ti 16 GB, i7-14700KF, Series X profile. This PR was merged into our tree: `a253706` + `0b0074e` + #854 #959 + Belobug's ambient pass. That tree has no CBV size cap (#911 / #799). - With `VICTORY_BVH_BUILDER=1`: "the ray-tracing structure builder runs ... pipelines=53", ~11 min including world entry and the cell, no crash and no device removal. Before this PR the same tree crashed at world entry, reading `0xffffffffffffffff` in the title. I don't know why the missing CBV cap didn't bite here. It may just not have hit a large view in that stretch. - Cost, builder on vs off (the off run adds only Zettrox/ztrx#148 and a log counter): 3.3-3.7 fps → 2.4-3.0 fps. On the GPU ~172 → ~272 ms a frame, copying back ~174 → ~281 ms. - The picture got much darker with the builder on: the cell and the bunks are mostly in shade, where with it off they are lit. Our ambient constant (written after `CS_ScreenProbes_TemporalResolve`, as in #917) still ran (`shaded=true` in the log), so the traced passes seem to darken what it adds. Is that expected while the structures are only partly right, or does it point at something the traced passes read? We keep the builder off for now. The PR is still worth taking for the crash fix alone. AI-assisted (Claude Code, Claude Opus 5.5); no game data.
Zayfway commented 2026-11-25 18:05:11 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by Zayfway on 2026-11-25T17:25:11Z.


Ran this branch as published (c9ca6b2) on a mid-range card with little RAM. AI-assisted (Claude Code); every number below is from these runs.

Machine: RTX 3060 12 GB (driver 610.88, 32-lane), Ryzen 7 5700X, 16 GB RAM with a 32 GB pagefile, Windows 11 26300, Series X profile, diag build.

Translation. translate --warm all over the shader pack: 25,950 of 25,985 translate (35 do not). On main (0b0074e) and on #980 it is 25,707 (278 do not).

In the game. Opening cutscene, two runs back to back with the same switches (ASYNC_SUBMIT QUEUE2 TEXTURE_NO_WAIT COPY_PLAIN LEVELS_ON_DEMAND), measured from world +60 s:

VICTORY_BVH_BUILDER=1 (and VICTORY_BVH_TRACE) builder off
builder runs ... pipelines=53 off
frame 1,972 ms median, p90 3,995 (0.59 fps) 669 ms median, p90 1,603 (1.84 fps)
GPU / preparing / copy-back per frame 444 / 816 / 446 ms 119 / 283 / 80 ms
private memory, max 24.0 GB 25.9 GB
how the run ended after ~7 min in the world: no device loss, no access violation; the title stopped on a breakpoint (0x80000003) ran the full 10 min, killed by the harness

For comparison, on the same machine #980 with the builder on died at world +95–146 s: shaders touched pages from 0x10000, then E_OUTOFMEMORY. Here the builder ran about 4 times longer and none of those messages appeared. That matches your diagnosis of the thread-count dispatches.

Not tested:

  • The picture. The cutscene at 0.6 fps skips most of its 3D shots (the captures are title cards), so I cannot compare lighting with and without the builder yet. I am getting a gameplay save for that.
  • The cause of the breakpoint. Only one run with the builder on; VICTORY_BVH_TRACE was on (a 250 MB file), which also costs time.
  • The ms per frame with the trace off.
<!-- greyfinch-sync:fxceless/victory-fork:comment:7169475983 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/994#issuecomment-7169475983). Originally posted by [Zayfway](https://github.com/Zayfway) on 2026-11-25T17:25:11Z. --- Ran this branch as published (`c9ca6b2`) on a mid-range card with little RAM. *AI-assisted (Claude Code); every number below is from these runs.* **Machine:** RTX 3060 12 GB (driver 610.88, 32-lane), Ryzen 7 5700X, 16 GB RAM with a 32 GB pagefile, Windows 11 26300, Series X profile, diag build. **Translation.** `translate --warm all` over the shader pack: **25,950 of 25,985** translate (35 do not). On `main` (`0b0074e`) and on #980 it is 25,707 (278 do not). **In the game.** Opening cutscene, two runs back to back with the same switches (`ASYNC_SUBMIT QUEUE2 TEXTURE_NO_WAIT COPY_PLAIN LEVELS_ON_DEMAND`), measured from world +60 s: | | `VICTORY_BVH_BUILDER=1` (and `VICTORY_BVH_TRACE`) | builder off | |---|---|---| | builder | `runs ... pipelines=53` | off | | frame | 1,972 ms median, p90 3,995 (**0.59 fps**) | 669 ms median, p90 1,603 (**1.84 fps**) | | GPU / preparing / copy-back per frame | 444 / 816 / 446 ms | 119 / 283 / 80 ms | | private memory, max | 24.0 GB | 25.9 GB | | how the run ended | after **~7 min in the world**: no device loss, no access violation; the title stopped on a breakpoint (`0x80000003`) | ran the full 10 min, killed by the harness | For comparison, on the same machine #980 with the builder on died at world +95–146 s: shaders touched pages from 0x10000, then `E_OUTOFMEMORY`. Here the builder ran about 4 times longer and none of those messages appeared. That matches your diagnosis of the thread-count dispatches. **Not tested:** - The picture. The cutscene at 0.6 fps skips most of its 3D shots (the captures are title cards), so I cannot compare lighting with and without the builder yet. I am getting a gameplay save for that. - The cause of the breakpoint. Only one run with the builder on; `VICTORY_BVH_TRACE` was on (a 250 MB file), which also costs time. - The ms per frame with the trace off.
PiloteCode commented 2026-11-25 18:05:12 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by PiloteCode on 2026-11-25T17:29:50Z.


@oz-stanislav-zhukov thanks — a third 32-lane card where the crash at world entry is gone, and an 11-minute run.

On the darker picture: we have not compared the lit passes against the console's yet (the description says so), so we cannot say which of your two pictures is right. Two things to keep apart:

  • With the builder off, this PR makes every node test answer no hit, so traced shadow and occlusion rays find nothing and the cell is lit as if open. With it on, they find the walls and bunks. Some darkening is what a working builder should give.
  • An ambient constant added after the screen-probe resolve is a stand-in for the light the traced passes are missing when the builder is off. With the builder on it may no longer be needed, or may count twice. A run with the builder on and the ambient pass off would show what the traced passes give on their own.

If parts look wrong rather than just darker (whole surfaces black, tiles, light leaking through walls), VICTORY_BVH_CHECK=<hash> in a diagnostics build walks the structures the header stage starts and reports bad nodes; that would tell a structure fault from a lighting difference.

<!-- greyfinch-sync:fxceless/victory-fork:comment:7169587156 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/994#issuecomment-7169587156). Originally posted by [PiloteCode](https://github.com/PiloteCode) on 2026-11-25T17:29:50Z. --- @oz-stanislav-zhukov thanks — a third 32-lane card where the crash at world entry is gone, and an 11-minute run. On the darker picture: we have not compared the lit passes against the console's yet (the description says so), so we cannot say which of your two pictures is right. Two things to keep apart: - With the builder off, this PR makes every node test answer no hit, so traced shadow and occlusion rays find nothing and the cell is lit as if open. With it on, they find the walls and bunks. Some darkening is what a working builder should give. - An ambient constant added after the screen-probe resolve is a stand-in for the light the traced passes are missing when the builder is off. With the builder on it may no longer be needed, or may count twice. A run with the builder on and the ambient pass off would show what the traced passes give on their own. If parts look wrong rather than just darker (whole surfaces black, tiles, light leaking through walls), `VICTORY_BVH_CHECK=<hash>` in a diagnostics build walks the structures the header stage starts and reports bad nodes; that would tell a structure fault from a lighting difference.
PiloteCode commented 2026-11-25 18:05:12 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by PiloteCode on 2026-11-25T17:29:51Z.


@Zayfway thanks — useful on a 12 GB card with 16 GB of RAM. The translation count is in line with our CPU census of this head (all but one shadow-mask trace program in the shader pack), and the builder outliving #980's run by a long way fits the thread-count overrun being the cause there.

The frame cost here is mostly the trace and the card: with VICTORY_BVH_TRACE on, every builder dispatch and every range put back is written out (your 250 MB file), and at 0.6 fps the cutscene skips its shots, so a run without the trace is the one to compare.

0x80000003 is a breakpoint instruction in the title, not a fault of ours; the title reaches one when one of its own checks fails. The lines just before it in the log (and the crash report's title address, if one was written) would say where. If it shows up again without the trace, please post those lines.

<!-- greyfinch-sync:fxceless/victory-fork:comment:7169587521 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/994#issuecomment-7169587521). Originally posted by [PiloteCode](https://github.com/PiloteCode) on 2026-11-25T17:29:51Z. --- @Zayfway thanks — useful on a 12 GB card with 16 GB of RAM. The translation count is in line with our CPU census of this head (all but one shadow-mask trace program in the shader pack), and the builder outliving #980's run by a long way fits the thread-count overrun being the cause there. The frame cost here is mostly the trace and the card: with `VICTORY_BVH_TRACE` on, every builder dispatch and every range put back is written out (your 250 MB file), and at 0.6 fps the cutscene skips its shots, so a run without the trace is the one to compare. `0x80000003` is a breakpoint instruction in the title, not a fault of ours; the title reaches one when one of its own checks fails. The lines just before it in the log (and the crash report's title address, if one was written) would say where. If it shows up again without the trace, please post those lines.
Zayfway commented 2026-11-25 19:09:45 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by Zayfway on 2026-11-25T18:25:43Z.


Follow-up: what ends builder-on runs on a 16 GB machine is the card's shared (system) memory budget, not commit and not VRAM. AI-assisted (Claude Code); numbers from these runs.

Same machine as above (RTX 3060 12 GB, 16 GB RAM, 32 GB pagefile), this branch (c9ca6b2), loading the prison save.

builder off builder on builder on, VICTORY_WINDOW_KB=256 VICTORY_WINDOW_TAILS=1
gameplay frame (world +120 s to +360 s) 371 ms median (2.67 fps) – –
how the run ended ran 8 min, killed by the harness a host state prelude did not record (0x8007000E) before the gameplay window access violation in nvwgf2umx.dll before the gameplay window
"the PC's shared with the card" – 7,178 of 7,488 MB 7,361 of 7,488 MB
commit left / card in use – 7.8 GB / 9.4 of 11.3 GB 9.4 GB / –

DXGI gives the card a non-local budget of about half the RAM. On a 16 GB machine that is 7.5 GB, and a larger pagefile does not move it.

What fills it, from the last memory lines of the 256 KiB run:

  • Windows outside buffers: 5,267 copies, 5,103 MB, lying over only 3,008 MB of title memory. That is 2.1 GB of overlap, each copied once per window. 1,275 of them (3,775 MB) were asked for without a length, so they run to the end of their 4 MiB cell even on the 256 KiB grid. With the builder off, windows are about 2.6 GB.
  • About 3 GB in 32 MB write-combined allocations (114 of them in the memory map), with 907 host lists alive. My guess is command allocators grown by builder-sized lists. I did not trace them.

So on 16 GB the builder needs its by-address reads to cost less shared memory. One option is windows sized to what the shaders read rather than to the cell's end. Another is copies for builder-only memory kept on the card (it is written by shaders, not the CPU). I have not tried either. This is also what ended my #980 runs: no shared buffer ... 0x8007000E.

<!-- greyfinch-sync:fxceless/victory-fork:comment:7170893850 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/994#issuecomment-7170893850). Originally posted by [Zayfway](https://github.com/Zayfway) on 2026-11-25T18:25:43Z. --- **Follow-up: what ends builder-on runs on a 16 GB machine is the card's *shared* (system) memory budget,** not commit and not VRAM. *AI-assisted (Claude Code); numbers from these runs.* Same machine as above (RTX 3060 12 GB, 16 GB RAM, 32 GB pagefile), this branch (`c9ca6b2`), loading the prison save. | | builder off | builder on | builder on, `VICTORY_WINDOW_KB=256 VICTORY_WINDOW_TAILS=1` | |---|---|---|---| | gameplay frame (world +120 s to +360 s) | **371 ms** median (2.67 fps) | – | – | | how the run ended | ran 8 min, killed by the harness | `a host state prelude did not record (0x8007000E)` before the gameplay window | access violation in `nvwgf2umx.dll` before the gameplay window | | "the PC's shared with the card" | – | **7,178 of 7,488 MB** | **7,361 of 7,488 MB** | | commit left / card in use | – | 7.8 GB / 9.4 of 11.3 GB | 9.4 GB / – | DXGI gives the card a non-local budget of about half the RAM. On a 16 GB machine that is 7.5 GB, and a larger pagefile does not move it. What fills it, from the last memory lines of the 256 KiB run: - **Windows outside buffers: 5,267 copies, 5,103 MB, lying over only 3,008 MB of title memory.** That is 2.1 GB of overlap, each copied once per window. **1,275 of them (3,775 MB) were asked for without a length**, so they run to the end of their 4 MiB cell even on the 256 KiB grid. With the builder off, windows are about 2.6 GB. - **About 3 GB in 32 MB write-combined allocations** (114 of them in the memory map), with 907 host lists alive. My guess is command allocators grown by builder-sized lists. I did not trace them. So on 16 GB the builder needs its by-address reads to cost less shared memory. One option is windows sized to what the shaders read rather than to the cell's end. Another is copies for builder-only memory kept on the card (it is written by shaders, not the CPU). I have not tried either. This is also what ended my #980 runs: `no shared buffer ... 0x8007000E`.
PiloteCode commented 2026-11-25 19:09:45 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by PiloteCode on 2026-11-25T18:29:42Z.


@Zayfway thanks, that is a clear account, and it is a real limit of this PR on 16 GB: we only ran the builder on a machine with 64 GB, where the shared budget is 32 GB, so we never met it.

Your reading matches the code. A window asked for without a length runs to the end of its 4 MiB cell, and windows over the same title memory are separate copies in the PC's memory shared with the card; the builder names far more windows than the passes without it. Both of your options are sound; the second (copies of memory only shaders write kept in the card's own memory) removes the most, and the first (windows sized to what the shaders read) is the smaller change. Neither is in this PR, which only makes the builder run without the overrun; it stays opt-in.

Until then, on 16 GB the builder is likely to stay out of reach; with it off this PR should cost no shared memory beyond main's (your 8-minute run fits that).

<!-- greyfinch-sync:fxceless/victory-fork:comment:7170984643 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/994#issuecomment-7170984643). Originally posted by [PiloteCode](https://github.com/PiloteCode) on 2026-11-25T18:29:42Z. --- @Zayfway thanks, that is a clear account, and it is a real limit of this PR on 16 GB: we only ran the builder on a machine with 64 GB, where the shared budget is 32 GB, so we never met it. Your reading matches the code. A window asked for without a length runs to the end of its 4 MiB cell, and windows over the same title memory are separate copies in the PC's memory shared with the card; the builder names far more windows than the passes without it. Both of your options are sound; the second (copies of memory only shaders write kept in the card's own memory) removes the most, and the first (windows sized to what the shaders read) is the smaller change. Neither is in this PR, which only makes the builder run without the overrun; it stays opt-in. Until then, on 16 GB the builder is likely to stay out of reach; with it off this PR should cost no shared memory beyond `main`'s (your 8-minute run fits that).
Zayfway commented 2026-11-25 20:09:24 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by Zayfway on 2026-11-25T19:14:18Z.


Correction to my last comment: the 32 MB write-combined blocks are not command allocators. Builder-off runs on the same machine show it.

run (same save) 32 MB write-combined blocks shared with the card, in use
main 465b94f 279 blocks, 5,751 MB 5,753 MB
this branch, builder off 277 blocks, 5,949 MB 5,807 MB
this branch, builder on, 256 KiB windows 114 blocks, 3,053 MB, plus 5.1 GB of windows 7,361 of 7,488 MB

So the shared memory is the host copies of title memory themselves, and the builder's by-address windows come on top of a base of about 5.7 GB. The 2.1 GB of overlap between windows (5,103 MB of windows over 3,008 MB of title memory) is what an address-keyed layout would remove: windows as views into one reserved buffer per title range, mapped a tile at a time, as XCL's sparse windows do. I have not tried that here.

On a 16 GB machine that is the difference between staying under the ~7.5 GB budget and not.

<!-- greyfinch-sync:fxceless/victory-fork:comment:7172012106 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/994#issuecomment-7172012106). Originally posted by [Zayfway](https://github.com/Zayfway) on 2026-11-25T19:14:18Z. --- Correction to my last comment: the 32 MB write-combined blocks are **not** command allocators. Builder-off runs on the same machine show it. | run (same save) | 32 MB write-combined blocks | shared with the card, in use | |---|---|---| | `main` `465b94f` | 279 blocks, 5,751 MB | 5,753 MB | | this branch, builder off | 277 blocks, 5,949 MB | 5,807 MB | | this branch, builder on, 256 KiB windows | 114 blocks, 3,053 MB, plus 5.1 GB of windows | 7,361 of 7,488 MB | So the shared memory is the host copies of title memory themselves, and the builder's by-address windows come on top of a base of about 5.7 GB. The 2.1 GB of overlap between windows (5,103 MB of windows over 3,008 MB of title memory) is what an address-keyed layout would remove: windows as views into one reserved buffer per title range, mapped a tile at a time, as XCL's sparse windows do. I have not tried that here. On a 16 GB machine that is the difference between staying under the ~7.5 GB budget and not.
deadkid14 commented 2026-11-25 20:09:25 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by deadkid14 on 2026-11-25T19:22:49Z.


Linux/Proton report: with this stack, the game crashes in vkd3d-proton during pipeline creation at world entry, 3 runs out of 3. #854 on its own is fine on the same machine.

Setup: RTX 5070 Ti, driver 620.73.04, GE-Proton11-14 (its own vkd3d-proton), main d510ee4 plus our two Linux patches (DXC fallback from #20, the watchdog switch from upstream #454). Merged on top of that: #854, then this PR including #993. There was one conflict, in draw.rs (may_store from main next to trace_dispatch from here), resolved by keeping both. The structure builder was off (default) in every run.

Crash: 0xc0000005 at d3d12core.dll+0x28c726 (read 0x130: nothing mapped there) on a pipeline worker. It happens about a minute into the world (frames 1092 to 1784), while the first gameplay pipelines are being made:

#10 d3d12core.dll+0x43e3a8
#11 d3d12core.dll+0x42a8f2
#12 victory_gpu::pipeline::library::pipeline::<HostPipeline::new::{closure#5}, ...>
#13 victory_gpu::pipeline::host::HostPipeline::new
#16 victory_gpu::pipeline::make::workers::{closure#0}::{closure#1}

Xid 0, no device loss. The title's crash handler then runs (its upload is blocked by the layer).

Ruled out:

  • VICTORY_LIBRARY_LOCK=1: same crash, same address, so it is not two library calls at once.
  • Reverting 26cc0a3 (host pipelines for geometry stages): same crash.

Control: the same tree with #854 only (no #993/#994) ran twice without a crash. All five programs that were dropped before now bind (f133e35efed2a48a, 02384a60fda6f2d0, 2cc4c197ee29e291, 2da4beb386509b77, 369cbe906ea72764), at about 5 fps, the same as without it. The skin-coloured blocks on characters are unchanged there, which is why I wanted to try the no-hit node tests from this PR.

So the crash comes from something in #993/#994 other than 26cc0a3. Candidates by commit title: d70b069 (UAVs declared at every stage) and 82a0374 (mesh programs without a pixel program). I haven't bisected further.

AI-assisted: Claude Code ran the builds and tests on my machine, read the logs and wrote this comment; posted at my request.

<!-- greyfinch-sync:fxceless/victory-fork:comment:7172212498 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/994#issuecomment-7172212498). Originally posted by [deadkid14](https://github.com/deadkid14) on 2026-11-25T19:22:49Z. --- Linux/Proton report: with this stack, the game crashes in vkd3d-proton during pipeline creation at world entry, 3 runs out of 3. #854 on its own is fine on the same machine. **Setup:** RTX 5070 Ti, driver 620.73.04, GE-Proton11-14 (its own vkd3d-proton), main `d510ee4` plus our two Linux patches (DXC fallback from #20, the watchdog switch from upstream #454). Merged on top of that: #854, then this PR including #993. There was one conflict, in `draw.rs` (`may_store` from main next to `trace_dispatch` from here), resolved by keeping both. The structure builder was off (default) in every run. **Crash:** `0xc0000005 at d3d12core.dll+0x28c726 (read 0x130: nothing mapped there)` on a pipeline worker. It happens about a minute into the world (frames 1092 to 1784), while the first gameplay pipelines are being made: ``` #10 d3d12core.dll+0x43e3a8 #11 d3d12core.dll+0x42a8f2 #12 victory_gpu::pipeline::library::pipeline::<HostPipeline::new::{closure#5}, ...> #13 victory_gpu::pipeline::host::HostPipeline::new #16 victory_gpu::pipeline::make::workers::{closure#0}::{closure#1} ``` Xid 0, no device loss. The title's crash handler then runs (its upload is blocked by the layer). **Ruled out:** - `VICTORY_LIBRARY_LOCK=1`: same crash, same address, so it is not two library calls at once. - Reverting `26cc0a3` (host pipelines for geometry stages): same crash. **Control:** the same tree with #854 only (no #993/#994) ran twice without a crash. All five programs that were dropped before now bind (`f133e35efed2a48a`, `02384a60fda6f2d0`, `2cc4c197ee29e291`, `2da4beb386509b77`, `369cbe906ea72764`), at about 5 fps, the same as without it. The skin-coloured blocks on characters are unchanged there, which is why I wanted to try the no-hit node tests from this PR. So the crash comes from something in #993/#994 other than `26cc0a3`. Candidates by commit title: `d70b069` (UAVs declared at every stage) and `82a0374` (mesh programs without a pixel program). I haven't bisected further. *AI-assisted: Claude Code ran the builds and tests on my machine, read the logs and wrote this comment; posted at my request.*
Exopus-0x65f7ad0 commented 2026-11-25 20:09:29 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by Exopus-0x65f7ad0 on 2026-11-25T19:43:32Z.


Data point on 16 GB of RAM (RTX 5060 Ti 8 GB, Windows 11), PR head c9ca6b2 as is, with VICTORY_BVH_BUILDER=1. The builder starts (53/53 programs) and the game runs at 0.2-0.6 fps. Run 1 (cold cache): access violation in nvwgf2umx.dll before the cutscene. Run 2 (warm): ends without a message 67 s after the builder starts. Run 3: E_OUTOFMEMORY ("host copies in the card's memory could not be brought up to date") 2 min 20 after the builder starts, then device removed. That matches Zayfway's analysis of the shared-memory budget (about half the RAM). On 16 GB the builder is out of reach for now, as you said.

🤖 Generated with Claude Code

<!-- greyfinch-sync:fxceless/victory-fork:comment:7172684116 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/994#issuecomment-7172684116). Originally posted by [Exopus-0x65f7ad0](https://github.com/Exopus-0x65f7ad0) on 2026-11-25T19:43:32Z. --- Data point on 16 GB of RAM (RTX 5060 Ti 8 GB, Windows 11), PR head c9ca6b2 as is, with `VICTORY_BVH_BUILDER=1`. The builder starts (53/53 programs) and the game runs at 0.2-0.6 fps. Run 1 (cold cache): access violation in `nvwgf2umx.dll` before the cutscene. Run 2 (warm): ends without a message 67 s after the builder starts. Run 3: `E_OUTOFMEMORY` ("host copies in the card's memory could not be brought up to date") 2 min 20 after the builder starts, then device removed. That matches Zayfway's analysis of the shared-memory budget (about half the RAM). On 16 GB the builder is out of reach for now, as you said. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Zayfway commented 2026-11-25 20:09:29 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by Zayfway on 2026-11-25T19:52:00Z.


Picture check on the same 32-lane card, builder off. This branch merged onto main 465b94f with #1002 (tree: Zayfway/victory-fork@integ/rtx3060, conflicts described in #1002) gives the following in the prison scene:

  • The 16 px steps of sunlight along the characters' silhouettes are gone. They remain on main, and on main + #1002 alone.
  • The window's dirty-glass and haze effect is drawn.
  • No compute program is refused by the driver; only the builder's stages are dropped, since it is off.

The cost on this card is 264–274 → 338 ms a frame (GPU 150–167 → 210 ms), as the four formerly refused programs now run in their exact 64-lane forms. Details and numbers: https://github.com/fxceless/victory-fork/pull/1002#issuecomment-7172865868. AI-assisted (Claude Code).

<!-- greyfinch-sync:fxceless/victory-fork:comment:7172869137 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/994#issuecomment-7172869137). Originally posted by [Zayfway](https://github.com/Zayfway) on 2026-11-25T19:52:00Z. --- Picture check on the same 32-lane card, builder **off**. This branch merged onto `main` `465b94f` with #1002 (tree: [`Zayfway/victory-fork@integ/rtx3060`](https://github.com/Zayfway/victory-fork/tree/integ/rtx3060), conflicts described in #1002) gives the following in the prison scene: - The 16 px steps of sunlight along the characters' silhouettes are gone. They remain on `main`, and on `main` + #1002 alone. - The window's dirty-glass and haze effect is drawn. - No compute program is refused by the driver; only the builder's stages are dropped, since it is off. The cost on this card is 264–274 → 338 ms a frame (GPU 150–167 → 210 ms), as the four formerly refused programs now run in their exact 64-lane forms. Details and numbers: https://github.com/fxceless/victory-fork/pull/1002#issuecomment-7172865868. *AI-assisted (Claude Code).*
Yorivel commented 2026-11-25 22:07:25 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by Yorivel on 2026-11-25T21:53:16Z.


AI-assisted (Claude Code). Numbers and log lines only, no game data.

RTX 4090 with this stack and the builder on: no crash, no device loss, 4.5 fps in the barracks, and the picture is clean.

Setup. RTX 4090 (32-lane waves), driver 621.40, i9-14900K, 64 GB, Windows 11, Series X profile, diagnostics build. Tree: fork main 085ee7c + this PR (c9ca6b2) + #500 + #501. Merging this PR into 085ee7c had one conflict, in draw.rs: may_store from main and trace_dispatch from here sit at the same spot, and both were kept. Switches: VICTORY_BVH_BUILDER=1, RELAY=2, SHADER_OPT=0, LDS_EXACT=1, SHADER_LOOP_LIMIT=256, plus the README's speed set (ASYNC_SUBMIT, QUEUE2, INDIRECT_WINDOW, INDIRECT_GATHER, CARD_REHASH_RUNS, TEXTURE_NO_WAIT).

Stability. Six launches today on this tree, 3 to 10 minutes each (four of them cold-cache starts). Every one had 0 first-chance exceptions and no device removal. Each launch logged the ray-tracing structure builder runs: all of its programs have host pipelines pipelines=53.

Frame time in the barracks, once loading settled:

tree, builder on fps ms/frame on the GPU
085ee7c + #646 + #346 + #156 + #36 (no #854/#993) 4.1-4.4 227-245 50-60 ms
this stack 4.5-4.6 216-221 91 ms

Windows outside buffers compared on the CPU came to 544-600 MB a frame, in 136-150 ranges. Before #346 or this PR's raw-store rule it was 16.1 GB in 4,028 ranges, at 0.3 fps.

What changed in the picture against the tree without #854/#993. Same save, same spots:

  • The stair-stepped block edges on sunlit hair and shoulders are gone. The tree without #854 dropped f133e35efed2a48a every frame and had 02384a60fda6f2d0, 2cc4c197ee29e291 and 2da4beb386509b77 refused. This stack builds all four.
  • The band of blocks along the bottom edge is gone, as #993's split of the >65,535-group final gather predicts.
  • The window glass refracts the yard behind it.
  • VICTORY_WAVE_PAIRS=0 on this tree brings the edges back. It also turns the builder off: dropped 332.0/frame without a host pipeline: a stage of the ray-tracing structure builder, which is off. So the three builder programs that need the paired form are needed on this card too.

The indirect diffuse chain runs whole. The run bound 81 programs of indirect_diffuse_lighting and indirect_light_probes: screen probes, ray binning, CS_ScreenProbes_TraceRays_RayBinning_BVH_Mixed_ShaderBinning_WithFar, the irradiance cache and both CS_FinalGather variants. None was dropped. Their forms with VICTORY_WAVE_WHY=1:

  • 75 are plain;
  • 3 are paired: CS_IrradianceCache_Shade, _ShadeSecondary, _IntegrateIrradianceSH;
  • 3 use the allocation idiom: the two RegisterAllocationRequests and CS_GenerateRayBinOffsets;
  • none is approximate.

In two VICTORY_SHOT frames, the final image (R10G10B10A2, 2560x1440) has smooth shading on hair and skin, and bounce light on the walls and floor away from the window. No console reference has been compared yet.

A pitfall for anyone judging pictures by screenshot. A plain desktop capture (GDI CopyFromScreen) of this window showed heavy posterization: flat colour bands on faces and clothes. Neither the screen nor the VICTORY_SHOT final image showed it. Use the frame shot for pictures, not a desktop grab.

<!-- greyfinch-sync:fxceless/victory-fork:comment:7175665767 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/994#issuecomment-7175665767). Originally posted by [Yorivel](https://github.com/Yorivel) on 2026-11-25T21:53:16Z. --- *AI-assisted (Claude Code). Numbers and log lines only, no game data.* **RTX 4090 with this stack and the builder on: no crash, no device loss, 4.5 fps in the barracks, and the picture is clean.** **Setup.** RTX 4090 (32-lane waves), driver 621.40, i9-14900K, 64 GB, Windows 11, Series X profile, diagnostics build. Tree: fork `main` `085ee7c` + this PR (`c9ca6b2`) + #500 + #501. Merging this PR into `085ee7c` had one conflict, in `draw.rs`: `may_store` from main and `trace_dispatch` from here sit at the same spot, and both were kept. Switches: `VICTORY_BVH_BUILDER=1`, `RELAY=2`, `SHADER_OPT=0`, `LDS_EXACT=1`, `SHADER_LOOP_LIMIT=256`, plus the README's speed set (`ASYNC_SUBMIT`, `QUEUE2`, `INDIRECT_WINDOW`, `INDIRECT_GATHER`, `CARD_REHASH_RUNS`, `TEXTURE_NO_WAIT`). **Stability.** Six launches today on this tree, 3 to 10 minutes each (four of them cold-cache starts). Every one had 0 first-chance exceptions and no device removal. Each launch logged `the ray-tracing structure builder runs: all of its programs have host pipelines pipelines=53`. **Frame time in the barracks, once loading settled:** | tree, builder on | fps | ms/frame | on the GPU | |---|---|---|---| | `085ee7c` + #646 + #346 + #156 + #36 (no #854/#993) | 4.1-4.4 | 227-245 | 50-60 ms | | this stack | 4.5-4.6 | 216-221 | 91 ms | Windows outside buffers compared on the CPU came to 544-600 MB a frame, in 136-150 ranges. Before #346 or this PR's raw-store rule it was 16.1 GB in 4,028 ranges, at 0.3 fps. **What changed in the picture against the tree without #854/#993.** Same save, same spots: - The stair-stepped block edges on sunlit hair and shoulders are gone. The tree without #854 dropped `f133e35efed2a48a` every frame and had `02384a60fda6f2d0`, `2cc4c197ee29e291` and `2da4beb386509b77` refused. This stack builds all four. - The band of blocks along the bottom edge is gone, as #993's split of the >65,535-group final gather predicts. - The window glass refracts the yard behind it. - `VICTORY_WAVE_PAIRS=0` on this tree brings the edges back. It also turns the builder off: `dropped 332.0/frame without a host pipeline: a stage of the ray-tracing structure builder, which is off`. So the three builder programs that need the paired form are needed on this card too. **The indirect diffuse chain runs whole.** The run bound 81 programs of `indirect_diffuse_lighting` and `indirect_light_probes`: screen probes, ray binning, `CS_ScreenProbes_TraceRays_RayBinning_BVH_Mixed_ShaderBinning_WithFar`, the irradiance cache and both `CS_FinalGather` variants. None was dropped. Their forms with `VICTORY_WAVE_WHY=1`: - 75 are plain; - 3 are paired: `CS_IrradianceCache_Shade`, `_ShadeSecondary`, `_IntegrateIrradianceSH`; - 3 use the allocation idiom: the two `RegisterAllocationRequests` and `CS_GenerateRayBinOffsets`; - none is approximate. In two `VICTORY_SHOT` frames, the final image (R10G10B10A2, 2560x1440) has smooth shading on hair and skin, and bounce light on the walls and floor away from the window. No console reference has been compared yet. **A pitfall for anyone judging pictures by screenshot.** A plain desktop capture (GDI `CopyFromScreen`) of this window showed heavy posterization: flat colour bands on faces and clothes. Neither the screen nor the `VICTORY_SHOT` final image showed it. Use the frame shot for pictures, not a desktop grab.
BradRoland commented 2026-11-25 22:21:08 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by BradRoland on 2026-11-25T22:21:08Z.

Review: COMMENTED


I checked the builder-off path on the updated head and found one title-memory access that still runs on a disabled traversal. The returned no-hit values themselves were correct.

<!-- greyfinch-sync:fxceless/victory-fork:review:6065797203 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/994#pullrequestreview-6065797203). Originally posted by [BradRoland](https://github.com/BradRoland) on 2026-11-25T22:21:08Z. **Review:** COMMENTED --- I checked the builder-off path on the updated head and found one title-memory access that still runs on a disabled traversal. The returned no-hit values themselves were correct.
PiloteCode commented 2026-11-25 23:09:54 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by PiloteCode on 2026-11-25T22:11:41Z.


Merged main (c36971b) into the branch: a merge commit on top of the commits already here (6248570), then one lint commit. The branch merges into main without a conflict again. It still holds #993's and #854's heads as they were.

Conflicts. Four places in three files, each one where both sides had added lines. Both sides are kept in all of them:

  • draw.rs: a method each after State::list_dropped_roots (trace_dispatch here, may_store on main).
  • host.rs, twice: a diagnostics statement each under one attribute line, in run_deferred's title copy and at the top of write_mapped (the builder's trace line here, main's backreads calls). Each has its own attribute now, and main's statement stays next to the copy or the write it marks.
  • lib.rs: a diagnostics module each under one attribute line (bvhtrace here, backreads on main).

Merged without a conflict, and read through where both sides changed the same code:

  • indirect.rs: the clamp's shader now has main's gathered records (a record's place read from a table) and #993's split dispatch (kind 3). Only a windowed draw's record is gathered, never a dispatch's, so the two do not meet. The tests of both pass.
  • draw.rs: execute_indirect ends the list's gathering for a dispatch before the split clamp, and a dispatch by thread counts goes through dispatch, which ends it too. A title copy run on the card (copy_on_card) follows a draw or dispatch of its list that stores by address, so the list no longer gathers by then.
  • The translator: main's loads of four dwords a call (VICTORY_SHADER_OPT bit 64, not in the default) sit beside this stack's forms. main's test of them passes here both ways, and the shader tests give the same result with VICTORY_SHADER_OPT=127. emit/lower.rs is 519,626 bytes of the policy's 524,288.

Not run together: this branch with main's newer switches on (VICTORY_INDIRECT_GATHER, VICTORY_JOIN_PARTS, VICTORY_WINDOW_UPLOAD, VICTORY_COPY_CHANGED, VICTORY_CARD_BUFFERS_MIN_KB, VICTORY_TEXTURE_BACK). Two things from reading the code:

  • VICTORY_WINDOW_UPLOAD=1 rests on no shader writing a window outside buffers. With VICTORY_BVH_BUILDER=1 the builder's programs store by address into such windows.
  • A remap waits for the flights that may write its range (VICTORY_REMAP_LAND, on by default). main's notes now count some 850 remaps in a frame that streams; the wait has not been timed there.

Added after the merge: one lint commit for main's newer code, the same as on our other open branches: map_entry in fpsbox.rs, collapsible_if in pipeline/library.rs, manual_is_multiple_of in queue.rs, shadow.rs, draw.rs and watch.rs. Without it cargo clippy --workspace --all-targets --locked -- -D warnings fails on c36971b, with or without --all-features.

Checked, the branch as it is (1ffff57), every test on the software adapter:

  • cargo clippy --workspace --all-targets --locked -- -D warnings, and the same with --all-features: clean.
  • cargo xtask policy, cargo build --release -p victory and cargo build --profile diag -p victory --features diagnostics: pass.
  • cargo test -p victory-shader -- --test-threads=1 with VICTORY_WARP=1: 265 passed, 5 failed, 2 ignored. The five are the ones the description names; four of them fail on main alone on the software adapter (212 passed, 4 failed, 3 ignored), the fifth is #854's LDS subtraction test. The one test more than before is main's new one.
  • cargo test -p victory-gpu --features diagnostics -- --test-threads=1 with VICTORY_D3D12_WARP=1: 203 passed, 1 failed, 6 ignored. The failure is depth_bounds_pipeline_loads_and_filters_draws, as on main (200 passed, 1 failed, 6 ignored).
  • cargo test -p victory-hle -- --test-threads=1: 100 + 1 passed, as on main.
  • cargo test -p victory -p victory-loader: passed.
  • The offline census of the description, on the merged release build (victory translate --validate --list, VICTORY_HOST_MAX_WAVE=32, CPU only, no pipelines): 25,952 of 25,953 programs translate and validate. Its list is the same, line for line, as the one taken before the merge.
<!-- greyfinch-sync:fxceless/victory-fork:comment:7176055758 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/994#issuecomment-7176055758). Originally posted by [PiloteCode](https://github.com/PiloteCode) on 2026-11-25T22:11:41Z. --- Merged `main` (`c36971b`) into the branch: a merge commit on top of the commits already here (`6248570`), then one lint commit. The branch merges into `main` without a conflict again. It still holds #993's and #854's heads as they were. **Conflicts.** Four places in three files, each one where both sides had added lines. Both sides are kept in all of them: - `draw.rs`: a method each after `State::list_dropped_roots` (`trace_dispatch` here, `may_store` on `main`). - `host.rs`, twice: a diagnostics statement each under one attribute line, in `run_deferred`'s title copy and at the top of `write_mapped` (the builder's trace line here, `main`'s `backreads` calls). Each has its own attribute now, and `main`'s statement stays next to the copy or the write it marks. - `lib.rs`: a diagnostics module each under one attribute line (`bvhtrace` here, `backreads` on `main`). **Merged without a conflict, and read through** where both sides changed the same code: - `indirect.rs`: the clamp's shader now has `main`'s gathered records (a record's place read from a table) and #993's split dispatch (kind 3). Only a windowed draw's record is gathered, never a dispatch's, so the two do not meet. The tests of both pass. - `draw.rs`: `execute_indirect` ends the list's gathering for a dispatch before the split clamp, and a dispatch by thread counts goes through `dispatch`, which ends it too. A title copy run on the card (`copy_on_card`) follows a draw or dispatch of its list that stores by address, so the list no longer gathers by then. - The translator: `main`'s loads of four dwords a call (`VICTORY_SHADER_OPT` bit 64, not in the default) sit beside this stack's forms. `main`'s test of them passes here both ways, and the shader tests give the same result with `VICTORY_SHADER_OPT=127`. `emit/lower.rs` is 519,626 bytes of the policy's 524,288. **Not run together:** this branch with `main`'s newer switches on (`VICTORY_INDIRECT_GATHER`, `VICTORY_JOIN_PARTS`, `VICTORY_WINDOW_UPLOAD`, `VICTORY_COPY_CHANGED`, `VICTORY_CARD_BUFFERS_MIN_KB`, `VICTORY_TEXTURE_BACK`). Two things from reading the code: - `VICTORY_WINDOW_UPLOAD=1` rests on no shader writing a window outside buffers. With `VICTORY_BVH_BUILDER=1` the builder's programs store by address into such windows. - A remap waits for the flights that may write its range (`VICTORY_REMAP_LAND`, on by default). `main`'s notes now count some 850 remaps in a frame that streams; the wait has not been timed there. **Added after the merge:** one lint commit for `main`'s newer code, the same as on our other open branches: `map_entry` in `fpsbox.rs`, `collapsible_if` in `pipeline/library.rs`, `manual_is_multiple_of` in `queue.rs`, `shadow.rs`, `draw.rs` and `watch.rs`. Without it `cargo clippy --workspace --all-targets --locked -- -D warnings` fails on `c36971b`, with or without `--all-features`. **Checked**, the branch as it is (`1ffff57`), every test on the software adapter: - `cargo clippy --workspace --all-targets --locked -- -D warnings`, and the same with `--all-features`: clean. - `cargo xtask policy`, `cargo build --release -p victory` and `cargo build --profile diag -p victory --features diagnostics`: pass. - `cargo test -p victory-shader -- --test-threads=1` with `VICTORY_WARP=1`: 265 passed, 5 failed, 2 ignored. The five are the ones the description names; four of them fail on `main` alone on the software adapter (212 passed, 4 failed, 3 ignored), the fifth is #854's LDS subtraction test. The one test more than before is `main`'s new one. - `cargo test -p victory-gpu --features diagnostics -- --test-threads=1` with `VICTORY_D3D12_WARP=1`: 203 passed, 1 failed, 6 ignored. The failure is `depth_bounds_pipeline_loads_and_filters_draws`, as on `main` (200 passed, 1 failed, 6 ignored). - `cargo test -p victory-hle -- --test-threads=1`: 100 + 1 passed, as on `main`. - `cargo test -p victory -p victory-loader`: passed. - The offline census of the description, on the merged release build (`victory translate --validate --list`, `VICTORY_HOST_MAX_WAVE=32`, CPU only, no pipelines): 25,952 of 25,953 programs translate and validate. Its list is the same, line for line, as the one taken before the merge.
PiloteCode commented 2026-11-25 23:09:59 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by PiloteCode on 2026-11-25T22:55:23Z.


@BradRoland thanks, that is a real defect and your fix is the right one. With the structures off, the first look in the directory was still emitted, with a false predicate, before the branch on built; its fault-buffer store then went to the sink word. Inside the block that tests nodes the lane's guard and built both hold by control flow, so the look needs no predicate there, and it still comes once, before the branches on the node's kind.

Your commit 55f0043 is on the branch as you wrote it. Checked here at that commit:

  • cargo test -p victory-shader intersect: 8 passed on the software adapter and 8 passed on an RTX 5090, your disabled_structures_leave_the_page_fault_buffer_untouched among them;
  • cargo clippy --workspace --all-targets --locked -- -D warnings, the same with --all-features, and cargo xtask policy: clean;
  • the CPU census (victory translate --validate --list, 32-lane host): 25,952 of 25,953 programs translate and validate, as before.

The missing-page fix you adapted from #1165 is not taken here: it belongs with #1165, and this PR stays what it was plus your correction.

<!-- greyfinch-sync:fxceless/victory-fork:comment:7176942020 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/994#issuecomment-7176942020). Originally posted by [PiloteCode](https://github.com/PiloteCode) on 2026-11-25T22:55:23Z. --- @BradRoland thanks, that is a real defect and your fix is the right one. With the structures off, the first look in the directory was still emitted, with a false predicate, before the branch on `built`; its fault-buffer store then went to the sink word. Inside the block that tests nodes the lane's guard and `built` both hold by control flow, so the look needs no predicate there, and it still comes once, before the branches on the node's kind. Your commit `55f0043` is on the branch as you wrote it. Checked here at that commit: - `cargo test -p victory-shader intersect`: 8 passed on the software adapter and 8 passed on an RTX 5090, your `disabled_structures_leave_the_page_fault_buffer_untouched` among them; - `cargo clippy --workspace --all-targets --locked -- -D warnings`, the same with `--all-features`, and `cargo xtask policy`: clean; - the CPU census (`victory translate --validate --list`, 32-lane host): 25,952 of 25,953 programs translate and validate, as before. The missing-page fix you adapted from #1165 is not taken here: it belongs with #1165, and this PR stays what it was plus your correction.
PiloteCode commented 2026-11-25 23:09:59 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by PiloteCode on 2026-11-25T22:55:24Z.


@deadkid14 thanks for the report and for what you ruled out. A read of 0x130 with nothing mapped looks like a field read through a null object inside vkd3d-proton, while one pipeline is made. Of the two commits you name, the likelier one is 82a0374: it makes pipelines of a mesh program with no pixel program (the title's depth passes; before it those pipelines were refused, so nothing reached the driver). On Windows such a pipeline is valid and is made; a null pixel stage is the kind of thing a translation layer may not expect.

Two runs would tell:

  • VICTORY_MESH_LINK=0: turns that form off (those pipelines are refused again, as with #854 alone). If the crash goes, it is the mesh pipeline without a pixel shader.
  • d70b069 only changes vertex and mesh programs that have a root UAV, which without VICTORY_LOOP_NOTES=1 are few; if the first run still crashes, the log's last "first bind"/pipeline lines before the fault would name the program.

If it is the first, a stub pixel shader for those pipelines under Proton would be the way round it (the offline census already builds them that way); say so and we will add it behind a switch.

<!-- greyfinch-sync:fxceless/victory-fork:comment:7176942488 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/994#issuecomment-7176942488). Originally posted by [PiloteCode](https://github.com/PiloteCode) on 2026-11-25T22:55:24Z. --- @deadkid14 thanks for the report and for what you ruled out. A read of `0x130` with nothing mapped looks like a field read through a null object inside vkd3d-proton, while one pipeline is made. Of the two commits you name, the likelier one is `82a0374`: it makes pipelines of a mesh program **with no pixel program** (the title's depth passes; before it those pipelines were refused, so nothing reached the driver). On Windows such a pipeline is valid and is made; a null pixel stage is the kind of thing a translation layer may not expect. Two runs would tell: - `VICTORY_MESH_LINK=0`: turns that form off (those pipelines are refused again, as with #854 alone). If the crash goes, it is the mesh pipeline without a pixel shader. - `d70b069` only changes vertex and mesh programs that have a root UAV, which without `VICTORY_LOOP_NOTES=1` are few; if the first run still crashes, the log's last "first bind"/pipeline lines before the fault would name the program. If it is the first, a stub pixel shader for those pipelines under Proton would be the way round it (the offline census already builds them that way); say so and we will add it behind a switch.
PiloteCode commented 2026-11-25 23:09:59 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by PiloteCode on 2026-11-25T22:55:25Z.


@Zayfway @Exopus-0x65f7ad0 @Yorivel thanks for the three reports.

  • 16 GB machines (Zayfway, Exopus): agreed. The shared memory is the host copies of title memory themselves, and with the builder on its by-address windows come on top (5.1 GB over 3.0 GB of title memory in your run). This PR does not change that; the builder stays opt-in, and on 16 GB it is out of reach until the windows become views of one buffer per title range, as you describe. That is a change of the layer's copies, not of this PR.
  • Picture with the builder off (Zayfway): the 16 px steps of sunlight gone from the silhouettes and the window's haze drawn is what the no-hit node tests and the four formerly refused programs were meant to give. The cost you measured (264–274 → 338 ms a frame on that card) is theirs.
  • RTX 4090 with the builder on (Yorivel): six launches of 3 to 10 minutes with no exception and no device removal, 53 of 53 builder pipelines, and windows compared on the CPU down to 544–600 MB a frame from 16.1 GB: that is the first card other than ours where the builder ran this long.
<!-- greyfinch-sync:fxceless/victory-fork:comment:7176942821 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/994#issuecomment-7176942821). Originally posted by [PiloteCode](https://github.com/PiloteCode) on 2026-11-25T22:55:25Z. --- @Zayfway @Exopus-0x65f7ad0 @Yorivel thanks for the three reports. - **16 GB machines** (Zayfway, Exopus): agreed. The shared memory is the host copies of title memory themselves, and with the builder on its by-address windows come on top (5.1 GB over 3.0 GB of title memory in your run). This PR does not change that; the builder stays opt-in, and on 16 GB it is out of reach until the windows become views of one buffer per title range, as you describe. That is a change of the layer's copies, not of this PR. - **Picture with the builder off** (Zayfway): the 16 px steps of sunlight gone from the silhouettes and the window's haze drawn is what the no-hit node tests and the four formerly refused programs were meant to give. The cost you measured (264–274 → 338 ms a frame on that card) is theirs. - **RTX 4090 with the builder on** (Yorivel): six launches of 3 to 10 minutes with no exception and no device removal, 53 of 53 builder pipelines, and windows compared on the CPU down to 544–600 MB a frame from 16.1 GB: that is the first card other than ours where the builder ran this long.
BradRoland commented 2026-11-25 23:10:01 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by BradRoland on 2026-11-25T22:21:08Z.

Code review location: crates/victory-shader/src/emit/intersect.rs; line 179

@@ -163,7 +176,7 @@ impl<'a> Lower<'a> {
                 // One look for the node's copy, before the branches: a
                 // node is 64 bytes on 64, so its first half lies in one
                 // 64 KiB page whatever its kind.
-                let (handle, byte) = self.bvh_memory(low, high, guard);
+                let (handle, byte) = self.bvh_memory(low, high, reads);

The first directory lookup is emitted before branching on built. Passing a false reads predicate sends the fault-buffer store to the sink at word 0. With USER_STRUCTURES=0 on 1ffff57, a synthetic WARP dispatch of 32 lanes targeting missing page 11 changed that word from 0xabcdef01 to 11. The page-request slot stayed zero and the box returned four misses. The extra UAV write is measurable independently of any effect on frame time.

I moved the directory lookup into the existing enabled block. The test keeps the entire fault buffer intact with traversal disabled, then enables traversal and checks that page 11 is requested. It passed on WARP and the RTX 4080. Correction and regression based on this head

For testing this alongside #1165, I also adapted the missing-page fix to this branch. All nine intersection tests passed on the combined tree, including disabled traversal, fully missing boxes and boxes split across pages. Gameplay remains unverified here. Combined branch

<!-- greyfinch-sync:fxceless/victory-fork:review-comment:4701557365 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/994#discussion_r4701557365). Originally posted by [BradRoland](https://github.com/BradRoland) on 2026-11-25T22:21:08Z. **Code review location:** `crates/victory-shader/src/emit/intersect.rs`; line 179 ~~~~diff @@ -163,7 +176,7 @@ impl<'a> Lower<'a> { // One look for the node's copy, before the branches: a // node is 64 bytes on 64, so its first half lies in one // 64 KiB page whatever its kind. - let (handle, byte) = self.bvh_memory(low, high, guard); + let (handle, byte) = self.bvh_memory(low, high, reads); ~~~~ --- The first directory lookup is emitted before branching on `built`. Passing a false `reads` predicate sends the fault-buffer store to the sink at word 0. With `USER_STRUCTURES=0` on `1ffff57`, a synthetic WARP dispatch of 32 lanes targeting missing page 11 changed that word from `0xabcdef01` to `11`. The page-request slot stayed zero and the box returned four misses. The extra UAV write is measurable independently of any effect on frame time. I moved the directory lookup into the existing enabled block. The test keeps the entire fault buffer intact with traversal disabled, then enables traversal and checks that page 11 is requested. It passed on WARP and the RTX 4080. [Correction and regression based on this head](https://github.com/BradRoland/victory-fork/commit/55f00433ac5c4b8fbac19b0fdde12bc900865a8e) For testing this alongside #1165, I also adapted the missing-page fix to this branch. All nine intersection tests passed on the combined tree, including disabled traversal, fully missing boxes and boxes split across pages. Gameplay remains unverified here. [Combined branch](https://github.com/BradRoland/victory-fork/tree/codex/bvh-994-integration)
deadkid14 commented 2026-11-26 03:06:50 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by deadkid14 on 2026-11-26T02:14:27Z.


@PiloteCode thanks. Results of the two checks you asked for, same tree as my report (main d510ee4 + Linux patches + #854 + this PR):

VICTORY_MESH_LINK=0 does not help. Same crash, same address (d3d12core.dll+0x28c726, read 0x130). With pipelines remembered from the earlier runs it now comes during loading (frame 32 to 43), or about a minute into the world.

The program: I added a log line before each library load and make, with the thread, and compared what was in flight at three crashes. Each time, the crash follows the start of the make of [compute e4a9f58e3acfcf7b]:

Run e4a9f58e3acfcf7b make starts Last log line before the fault
1 02:05:58.336 02:05:58.336 (that line)
2 02:11:50.149 02:11:50.149 (that line)
3 02:13:40.498 02:13:40.607

The same program builds fine in the same tree without #993/#994 (host pipeline shaders=[compute e4a9f58e3acfcf7b], first bind at frame 1187). So the crash comes from what this stack changes in its translation, not from mesh pipelines without a pixel program.

Something else turned up while looking, in both builds: four compute pipelines start and never finish on this stack (fdd56d97a806bcca, a1b20bc47e3c9597, e8c962358d862e3f, 559d9f0184e15fe3). One was still being made 95 s after it started. They are likely the ~5 draws a frame we see dropped as "being made" for a whole run. It is a separate issue, but worth knowing for anyone tuning VICTORY_PIPELINE_WAIT_MS on Linux.

I can run a build that leaves e4a9f58e3acfcf7b on its old translation, if there is a switch for the forms #993 adds.

AI-assisted: Claude Code ran the builds and tests on my machine, read the logs and wrote this comment; posted at my request.

<!-- greyfinch-sync:fxceless/victory-fork:comment:7180600810 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/994#issuecomment-7180600810). Originally posted by [deadkid14](https://github.com/deadkid14) on 2026-11-26T02:14:27Z. --- @PiloteCode thanks. Results of the two checks you asked for, same tree as my report (main `d510ee4` + Linux patches + #854 + this PR): **`VICTORY_MESH_LINK=0` does not help.** Same crash, same address (`d3d12core.dll+0x28c726`, read `0x130`). With pipelines remembered from the earlier runs it now comes during loading (frame 32 to 43), or about a minute into the world. **The program:** I added a log line before each library load and make, with the thread, and compared what was in flight at three crashes. Each time, the crash follows the **start of the make of `[compute e4a9f58e3acfcf7b]`**: | Run | `e4a9f58e3acfcf7b` make starts | Last log line before the fault | |---|---|---| | 1 | 02:05:58.336 | 02:05:58.336 (that line) | | 2 | 02:11:50.149 | 02:11:50.149 (that line) | | 3 | 02:13:40.498 | 02:13:40.607 | The same program builds fine in the same tree without #993/#994 (`host pipeline shaders=[compute e4a9f58e3acfcf7b]`, first bind at frame 1187). So the crash comes from what this stack changes in its translation, not from mesh pipelines without a pixel program. Something else turned up while looking, in both builds: four compute pipelines start and never finish on this stack (`fdd56d97a806bcca`, `a1b20bc47e3c9597`, `e8c962358d862e3f`, `559d9f0184e15fe3`). One was still being made 95 s after it started. They are likely the ~5 draws a frame we see dropped as "being made" for a whole run. It is a separate issue, but worth knowing for anyone tuning `VICTORY_PIPELINE_WAIT_MS` on Linux. I can run a build that leaves `e4a9f58e3acfcf7b` on its old translation, if there is a switch for the forms #993 adds. *AI-assisted: Claude Code ran the builds and tests on my machine, read the logs and wrote this comment; posted at my request.*
drchef420 commented 2026-11-26 06:07:02 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by drchef420 on 2026-11-26T05:06:02Z.


AI-assisted (Claude Code). Numbers and log lines only, no game data.

RTX 5070 12 GB, 32 GB RAM, builder on, no quarantine: no crash, no device loss, 6 min 17 s with the builder, and the picture looked right to the player. On main without this PR the same start crashed 8 s after the builder came up.

Setup. RTX 5070 12 GB (32-lane waves, driver 610.88; an RTX 3060 in the same PC, the game on the 5070 by Windows' per-app GPU preference), Core Ultra 7 270K Plus, 32 GB with a 32 GB paging file, Windows 11 26300, Series X profile, release build (no diagnostics). Tree: fork main 988aa41 + this PR at 7af465b. Switches: VICTORY_BVH_BUILDER=1 VICTORY_FIRSTLANE_OWN=1, nothing else. A new start with no save, through the opening cutscene into the first room.

Merging. Since the last merge of main (c36971b) there are ten conflicting hunks in nine files. Two are more than both-sides-added:

  • emit/intersect.rs: main now has 96ff135 ("node tests can answer no hit", VICTORY_BVH_NO_HIT=1, credited to this PR's idea, as a translation-time switch). I kept its early return before this PR's built word test.
  • emit/mod.rs: main's VICTORY_WAVE_WIDE=last block returns again.map(|(shader, _)| shader); with this PR's return type it is return again;.
    The rest I kept both sides of (draw.rs, host.rs, pipeline.rs), or took this PR's side where only formatting differed (fpsbox.rs, pipeline/library.rs) and main's comment and cfg (indirect.rs, resource.rs). With that: cargo test -p victory-shader --locked 272 passed, 2 ignored; cargo test -p victory-gpu --locked -- --test-threads=1 207 passed, 6 ignored.

The run. 10 min 51 s; the builder came up at 3 min 30 s ("all of its programs have host pipelines", 53). From then on:

  • 0 unhandled exceptions, 0 device removals, 0 ERROR lines; the title ended normally when the window was closed (crashes.log untouched).
  • no number left for another copy never logged, with main's 1023 numbers.
  • Video memory: before the builder card 2.1 GB / shared 0.6 GB; 20 s after it, card 9.0 / shared 5.4; at the end card 9.4 GB of an 11.0 GB budget, shared 10.2 GB, still creeping (9.1 to 10.2 GB over the last 3 minutes).
  • Frames: about 1,080 in those 6 min 17 s; the last minute 560-770 ms a frame at 4,300-6,900 draws. We have no builder-off run of this tree; on main a183ea2 the same room ran at 3-4 fps with the builder off.

For comparison, without this PR. main a183ea2, same machine, same start, VICTORY_BVH_BUILDER=1 VICTORY_FIRSTLANE_OWN=1 VICTORY_BVH_QUARANTINE=1: the title crashed about 8 s after the builder started, in the opening cutscene (a read reported at 0xffffffffffffffff at +0x52eca06, rdx all ones). From a save, on earlier trees of this fork, it crashed within seconds in five more runs, with and without the quarantine.

On 32 GB the builder fits for these six minutes; with shared memory still growing at the end, a longer run would tell whether it stops.

<!-- greyfinch-sync:fxceless/victory-fork:comment:7183179753 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/994#issuecomment-7183179753). Originally posted by [drchef420](https://github.com/drchef420) on 2026-11-26T05:06:02Z. --- *AI-assisted (Claude Code). Numbers and log lines only, no game data.* **RTX 5070 12 GB, 32 GB RAM, builder on, no quarantine: no crash, no device loss, 6 min 17 s with the builder, and the picture looked right to the player. On `main` without this PR the same start crashed 8 s after the builder came up.** **Setup.** RTX 5070 12 GB (32-lane waves, driver 610.88; an RTX 3060 in the same PC, the game on the 5070 by Windows' per-app GPU preference), Core Ultra 7 270K Plus, 32 GB with a 32 GB paging file, Windows 11 26300, Series X profile, release build (no diagnostics). Tree: fork `main` `988aa41` + this PR at `7af465b`. Switches: `VICTORY_BVH_BUILDER=1 VICTORY_FIRSTLANE_OWN=1`, nothing else. A new start with no save, through the opening cutscene into the first room. **Merging.** Since the last merge of `main` (`c36971b`) there are ten conflicting hunks in nine files. Two are more than both-sides-added: - `emit/intersect.rs`: `main` now has `96ff135` ("node tests can answer no hit", `VICTORY_BVH_NO_HIT=1`, credited to this PR's idea, as a translation-time switch). I kept its early return before this PR's `built` word test. - `emit/mod.rs`: `main`'s `VICTORY_WAVE_WIDE=last` block returns `again.map(|(shader, _)| shader)`; with this PR's return type it is `return again;`. The rest I kept both sides of (`draw.rs`, `host.rs`, `pipeline.rs`), or took this PR's side where only formatting differed (`fpsbox.rs`, `pipeline/library.rs`) and `main`'s comment and `cfg` (`indirect.rs`, `resource.rs`). With that: `cargo test -p victory-shader --locked` 272 passed, 2 ignored; `cargo test -p victory-gpu --locked -- --test-threads=1` 207 passed, 6 ignored. **The run.** 10 min 51 s; the builder came up at 3 min 30 s ("all of its programs have host pipelines", 53). From then on: - 0 unhandled exceptions, 0 device removals, 0 `ERROR` lines; the title ended normally when the window was closed (`crashes.log` untouched). - `no number left for another copy` never logged, with `main`'s 1023 numbers. - Video memory: before the builder card 2.1 GB / shared 0.6 GB; 20 s after it, card 9.0 / shared 5.4; at the end card 9.4 GB of an 11.0 GB budget, shared 10.2 GB, still creeping (9.1 to 10.2 GB over the last 3 minutes). - Frames: about 1,080 in those 6 min 17 s; the last minute 560-770 ms a frame at 4,300-6,900 draws. We have no builder-off run of this tree; on `main` `a183ea2` the same room ran at 3-4 fps with the builder off. **For comparison, without this PR.** `main` `a183ea2`, same machine, same start, `VICTORY_BVH_BUILDER=1 VICTORY_FIRSTLANE_OWN=1 VICTORY_BVH_QUARANTINE=1`: the title crashed about 8 s after the builder started, in the opening cutscene (a read reported at `0xffffffffffffffff` at `+0x52eca06`, `rdx` all ones). From a save, on earlier trees of this fork, it crashed within seconds in five more runs, with and without the quarantine. On 32 GB the builder fits for these six minutes; with shared memory still growing at the end, a longer run would tell whether it stops.
deadkid14 commented 2026-11-26 06:07:03 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by deadkid14 on 2026-11-26T05:26:18Z.


Follow-up on Linux with this PR's current head (7af465b, which includes main c36971b), using the switches from the RTX 5070 report above: VICTORY_BVH_BUILDER=1 VICTORY_FIRSTLANE_OWN=1. On top: the watchdog switch from upstream #454, and the layer's own HLSL compiled with DXC (Wine's d3dcompiler refuses some of it).

The result is the same crash as before, so VICTORY_FIRSTLANE_OWN=1 does not avoid it under vkd3d-proton (GE-Proton11-14's build, RTX 5070 Ti, driver 620.73.04):

shader translated stage="compute" hash=e4a9f58e3acfcf7b user_data=3 samplers=1
... 35 log lines later:
0xc0000005 at d3d12core.dll+0x28c726 (read 0x130: nothing mapped there)
#12 victory_gpu::pipeline::library::pipeline::<HostPipeline::new::{closure}>
#13 victory_gpu::pipeline::host::HostPipeline::new

This was at frame 1268. A cached form of the same program had bound earlier at that frame, and the crash comes right after this new translation of it. No Xid and no device loss.

So on Windows the driver takes this pipeline, and under Wine vkd3d-proton fails on it with a null read. I haven't tried a newer vkd3d-proton than GE-Proton11-14's. If someone on Linux has one built from master, this program would be the one to check.

AI-assisted: Claude Code ran the builds and tests on my machine, read the logs and wrote this comment; posted at my request.

<!-- greyfinch-sync:fxceless/victory-fork:comment:7183485174 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/994#issuecomment-7183485174). Originally posted by [deadkid14](https://github.com/deadkid14) on 2026-11-26T05:26:18Z. --- Follow-up on Linux with this PR's current head (`7af465b`, which includes main `c36971b`), using the switches from the RTX 5070 report above: `VICTORY_BVH_BUILDER=1 VICTORY_FIRSTLANE_OWN=1`. On top: the watchdog switch from upstream #454, and the layer's own HLSL compiled with DXC (Wine's d3dcompiler refuses some of it). The result is the same crash as before, so `VICTORY_FIRSTLANE_OWN=1` does not avoid it under vkd3d-proton (GE-Proton11-14's build, RTX 5070 Ti, driver 620.73.04): ``` shader translated stage="compute" hash=e4a9f58e3acfcf7b user_data=3 samplers=1 ... 35 log lines later: 0xc0000005 at d3d12core.dll+0x28c726 (read 0x130: nothing mapped there) #12 victory_gpu::pipeline::library::pipeline::<HostPipeline::new::{closure}> #13 victory_gpu::pipeline::host::HostPipeline::new ``` This was at frame 1268. A cached form of the same program had bound earlier at that frame, and the crash comes right after this new translation of it. No Xid and no device loss. So on Windows the driver takes this pipeline, and under Wine vkd3d-proton fails on it with a null read. I haven't tried a newer vkd3d-proton than GE-Proton11-14's. If someone on Linux has one built from master, this program would be the one to check. *AI-assisted: Claude Code ran the builds and tests on my machine, read the logs and wrote this comment; posted at my request.*
drchef420 commented 2026-11-26 07:03:53 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by drchef420 on 2026-11-26T06:10:42Z.


AI-assisted (Claude Code). Numbers and log lines only, no game data.

Correction to my comment above: the tree I tested had this PR's COPIES = 2047, not main's 1023. I misread the merge; the numbers there are right, the limit was not.

A longer run of the same build (988aa41 + 7af465b, same machine and switches, from a save): 58 min 30 s, the builder up at 3 min 40 s. No exceptions, no device removal, no ERROR, no 0x8007000E; the title ended normally when the window was closed (host pipeline library saved).

  • Shared memory levels off. Card / shared: 9.3 / 8.9 GB at 8 min, 9.9 / 12.0 GB at 30 min, then 9.4-9.9 / 11.3-12.4 GB for the remaining half hour (11.9 GB at the end, budget 15.5 GB).
  • The copy numbers run out. no number left for another copy; its pages read zeros COPIES=2047 at 26 min 27 s (22 min 47 s after the builder came up), after the player had moved through several areas. Shortly before, at 20 min 32 s: no free dynamic descriptor slots: a table is not made n=182 and a draw whose descriptor table found no free slots is dropped (each logged once, so we can't tell how often).
  • What the player saw later: lit surfaces went black in a later area, and a boat's engine was destroyed right away. We can't tell from the log whether either comes from pages that read zeros. A game-logic result is a guess, but the timing (after the run-out, not in the 10-minute run) fits.
  • Frame cost doesn't grow. 400-650 ms a frame throughout, at 2,000-8,000 draws. About half of each frame is copying back: 220-440 ms and 50-140 MB a frame. The other half is 200-500 ms on the GPU. That matches the shortcut in memory.rs, where every such dispatch declares all numbered copies written and they are compared on the CPU.

So with this PR the builder runs for an hour on 32 GB without crashing, and memory holds. The limit we hit is the copy numbers, which #1082 addresses. It conflicts with this PR only in memory.rs; we'll report back if we run the two together.

<!-- greyfinch-sync:fxceless/victory-fork:comment:7184168094 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/994#issuecomment-7184168094). Originally posted by [drchef420](https://github.com/drchef420) on 2026-11-26T06:10:42Z. --- *AI-assisted (Claude Code). Numbers and log lines only, no game data.* **Correction to my comment above:** the tree I tested had this PR's `COPIES = 2047`, not `main`'s 1023. I misread the merge; the numbers there are right, the limit was not. **A longer run of the same build** (`988aa41` + `7af465b`, same machine and switches, from a save): 58 min 30 s, the builder up at 3 min 40 s. No exceptions, no device removal, no `ERROR`, no `0x8007000E`; the title ended normally when the window was closed (`host pipeline library saved`). - **Shared memory levels off.** Card / shared: 9.3 / 8.9 GB at 8 min, 9.9 / 12.0 GB at 30 min, then 9.4-9.9 / 11.3-12.4 GB for the remaining half hour (11.9 GB at the end, budget 15.5 GB). - **The copy numbers run out.** `no number left for another copy; its pages read zeros COPIES=2047` at 26 min 27 s (22 min 47 s after the builder came up), after the player had moved through several areas. Shortly before, at 20 min 32 s: `no free dynamic descriptor slots: a table is not made n=182` and `a draw whose descriptor table found no free slots is dropped` (each logged once, so we can't tell how often). - **What the player saw later:** lit surfaces went black in a later area, and a boat's engine was destroyed right away. We can't tell from the log whether either comes from pages that read zeros. A game-logic result is a guess, but the timing (after the run-out, not in the 10-minute run) fits. - **Frame cost doesn't grow.** 400-650 ms a frame throughout, at 2,000-8,000 draws. About half of each frame is `copying back`: 220-440 ms and 50-140 MB a frame. The other half is 200-500 ms `on the GPU`. That matches the shortcut in `memory.rs`, where every such dispatch declares all numbered copies written and they are compared on the CPU. So with this PR the builder runs for an hour on 32 GB without crashing, and memory holds. The limit we hit is the copy numbers, which #1082 addresses. It conflicts with this PR only in `memory.rs`; we'll report back if we run the two together.
deadkid14 commented 2026-11-26 07:03:54 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by deadkid14 on 2026-11-26T06:44:52Z.


Linux follow-up: with a newer vkd3d-proton the structure builder now starts here. The game then hangs about 50 s into the world.

Tree: this PR at 7af465b, plus the watchdog switch from upstream #454, the layer's HLSL compiled with DXC, and one local change: pipelines whose shaders are on VICTORY_SKIP_PIPELINES are refused when they would be made (a draw-time skip alone still makes them). VICTORY_SKIP_PIPELINES=e4a9f58e3acfcf7b (the program from my earlier reports). Switches: VICTORY_BVH_BUILDER=1 VICTORY_FIRSTLANE_OWN=1. RTX 5070 Ti, driver 620.73.04, GE-Proton11-14's Wine with a rebuilt wineserver (CachyOS/wine-cachyos#50).

vkd3d-proton Result
GE-Proton11-14's (cae8353ed) Still crashed in d3d12core.dll (+0x28c726, read 0x130) at frame 1464, making mesh and pixel pipelines (36a9c81f635373e5, 47848d52f85892d8, 257fb752e6b64ce4 were the last translated). No "structure builder runs" line before that.
master 71cae091b (the project's CI package) No crash. The log says the ray-tracing structure builder runs: all of its programs have host pipelines pipelines=53.

The hang with master: the last log line is long frame 1315 at 51.7 s: 1834 ms, then nothing for 3+ minutes. Meanwhile the process uses exactly one core at 100%, the GPU is at about 6%, and there is no Xid and no device loss. So one thread spins waiting for something while the card idles. I can't tell from outside what it waits on. It looks like the builder's first results never arrive, but that is a guess. A run with VICTORY_HELPER_OWN=0 on GE's vkd3d-proton hung the same way (silent log, around frame 925), before any crash.

So with vkd3d-proton master the builder's own pipelines all get made, which GE-Proton11-14's build never got to. I can't say the mesh/pixel crash is gone: this run hung at frame 1315, before the frame (1464) where the earlier run crashed. The next blocker is this spin after the builder starts. If there's a trace switch that would show what the spinning thread waits for, I can run it.

AI-assisted: Claude Code ran the builds and tests on my machine, read the logs and wrote this comment; posted at my request.

<!-- greyfinch-sync:fxceless/victory-fork:comment:7184740861 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/994#issuecomment-7184740861). Originally posted by [deadkid14](https://github.com/deadkid14) on 2026-11-26T06:44:52Z. --- Linux follow-up: with a newer vkd3d-proton the structure builder now starts here. The game then hangs about 50 s into the world. **Tree:** this PR at `7af465b`, plus the watchdog switch from upstream #454, the layer's HLSL compiled with DXC, and one local change: pipelines whose shaders are on `VICTORY_SKIP_PIPELINES` are refused when they would be made (a draw-time skip alone still makes them). `VICTORY_SKIP_PIPELINES=e4a9f58e3acfcf7b` (the program from my earlier reports). Switches: `VICTORY_BVH_BUILDER=1 VICTORY_FIRSTLANE_OWN=1`. RTX 5070 Ti, driver 620.73.04, GE-Proton11-14's Wine with a rebuilt wineserver (CachyOS/wine-cachyos#50). | vkd3d-proton | Result | |---|---| | GE-Proton11-14's (`cae8353ed`) | Still crashed in `d3d12core.dll` (+0x28c726, read 0x130) at frame 1464, making mesh and pixel pipelines (`36a9c81f635373e5`, `47848d52f85892d8`, `257fb752e6b64ce4` were the last translated). No "structure builder runs" line before that. | | master `71cae091b` (the project's CI package) | No crash. The log says `the ray-tracing structure builder runs: all of its programs have host pipelines pipelines=53`. | **The hang with master:** the last log line is `long frame 1315 at 51.7 s: 1834 ms`, then nothing for 3+ minutes. Meanwhile the process uses exactly one core at 100%, the GPU is at about 6%, and there is no Xid and no device loss. So one thread spins waiting for something while the card idles. I can't tell from outside what it waits on. It looks like the builder's first results never arrive, but that is a guess. A run with `VICTORY_HELPER_OWN=0` on GE's vkd3d-proton hung the same way (silent log, around frame 925), before any crash. So with vkd3d-proton master the builder's own pipelines all get made, which GE-Proton11-14's build never got to. I can't say the mesh/pixel crash is gone: this run hung at frame 1315, before the frame (1464) where the earlier run crashed. The next blocker is this spin after the builder starts. If there's a trace switch that would show what the spinning thread waits for, I can run it. *AI-assisted: Claude Code ran the builds and tests on my machine, read the logs and wrote this comment; posted at my request.*
drchef420 commented 2026-11-26 08:04:57 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by drchef420 on 2026-11-26T08:04:09Z.


AI-assisted (Claude Code). Numbers and log lines only, no game data.

@deadkid14 for the spin there's a switch already in this tree: VICTORY_STACKS=<seconds>[,<seconds>...] (crates/victory-loader/src/stacks.rs, started from apps/victory/src/run.rs). At each time listed, counted from the start, it suspends every thread in turn and prints its unwound stack as module+rva to stderr (not the tracing log), under VIctory: stacks of N threads. With your hang at about 52 s, VICTORY_STACKS=70,100,130 should catch the spinning thread three times; the frames that stay the same across the three dumps are what it waits in. It uses GetThreadContext and the same unwinder as the crash report, so I'd expect it to work under Wine, but we've only run it on Windows.

The log may already narrow it. The console CPU instructions, exceptions a second: ... line is printed only from the handler of an emulated console instruction (monitorx, mwaitx, clzero; console_insn.rs, line()), at most every 5 s. On Windows with the builder on, our 58-minute run shows a median of about 74,500 monitorx a second (631 such lines after the builder came up), so that line keeps coming even when frames take seconds. If it stops in your log along with everything else, no thread is in the title's monitorx/mwaitx wait during the hang. Then the core at 100% is a plain loop, the title's or ours, and the stacks will say which. If those lines do keep coming while frame lines stop, it is the title waiting on a value in memory that never arrives.

For comparison, on Windows (RTX 5070, this PR + main 988aa41) the builder's first frames were slow but they came: 0.7 fps, 1427.6 ms/frame at its start, frames of 950 to 1,450 ms for the next minute, then 450 to 650 ms. The longest gap between any two log lines in that run was 5.3 s.

<!-- greyfinch-sync:fxceless/victory-fork:comment:7186148254 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/994#issuecomment-7186148254). Originally posted by [drchef420](https://github.com/drchef420) on 2026-11-26T08:04:09Z. --- *AI-assisted (Claude Code). Numbers and log lines only, no game data.* @deadkid14 for the spin there's a switch already in this tree: `VICTORY_STACKS=<seconds>[,<seconds>...]` (`crates/victory-loader/src/stacks.rs`, started from `apps/victory/src/run.rs`). At each time listed, counted from the start, it suspends every thread in turn and prints its unwound stack as `module+rva` to **stderr** (not the tracing log), under `VIctory: stacks of N threads`. With your hang at about 52 s, `VICTORY_STACKS=70,100,130` should catch the spinning thread three times; the frames that stay the same across the three dumps are what it waits in. It uses `GetThreadContext` and the same unwinder as the crash report, so I'd expect it to work under Wine, but we've only run it on Windows. The log may already narrow it. The `console CPU instructions, exceptions a second: ...` line is printed only from the handler of an emulated console instruction (`monitorx`, `mwaitx`, `clzero`; `console_insn.rs`, `line()`), at most every 5 s. On Windows with the builder on, our 58-minute run shows a median of about 74,500 `monitorx` a second (631 such lines after the builder came up), so that line keeps coming even when frames take seconds. If it stops in your log along with everything else, no thread is in the title's `monitorx`/`mwaitx` wait during the hang. Then the core at 100% is a plain loop, the title's or ours, and the stacks will say which. If those lines do keep coming while frame lines stop, it is the title waiting on a value in memory that never arrives. For comparison, on Windows (RTX 5070, this PR + `main` `988aa41`) the builder's first frames were slow but they came: `0.7 fps, 1427.6 ms/frame` at its start, frames of 950 to 1,450 ms for the next minute, then 450 to 650 ms. The longest gap between any two log lines in that run was 5.3 s.
HLVM04 commented 2026-11-26 09:08:04 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by HLVM04 on 2026-11-26T08:06:29Z.


An update to my 589 ms figure above, on the same RTX 5070 Ti (Series S profile, Windows 11). Our main stack now carries #993 and this PR at c9ca6b2, plus 55f0043 and 51700c6.

  • VICTORY_BVH_BUILDER=1: a steady 70–77 ms a frame in the window scene (about 13–14 fps), against the 589 ms I reported on the older base. There was no crash or device loss in 2 runs of 380 s, and interiors are much better lit. Free RAM went down to 0.5–0.8 GB of 31 GB during those runs.
  • One possible regression: with the builder on, the main character's skin draw (pixel shader b36c288fccc767b0) was missing from the G-buffer in 2 of 2 runs. It is also missing with the builder off while VICTORY_REMAP_LAND, VICTORY_HELPER_OWN and VICTORY_CARD_TITLE_COPIES are on (their defaults), and it is present with those three set to 0. That is one run per setting, and we haven't yet narrowed it to one switch or found the cause.
  • VICTORY_DISPATCH_THREADS=0 together with the builder crashed at 60 s.

Correction (2026-11-26): with the builder on, the skin draw was missing in both builder-on runs, including the one with VICTORY_REMAP_LAND, VICTORY_HELPER_OWN and VICTORY_CARD_TITLE_COPIES set to 0. The "present with those three set to 0" result above was with the builder off only.

AI-assisted (Claude Code).

<!-- greyfinch-sync:fxceless/victory-fork:comment:7186195096 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/994#issuecomment-7186195096). Originally posted by [HLVM04](https://github.com/HLVM04) on 2026-11-26T08:06:29Z. --- An update to my 589 ms figure above, on the same RTX 5070 Ti (Series S profile, Windows 11). Our main stack now carries #993 and this PR at `c9ca6b2`, plus `55f0043` and `51700c6`. - `VICTORY_BVH_BUILDER=1`: a steady 70–77 ms a frame in the window scene (about 13–14 fps), against the 589 ms I reported on the older base. There was no crash or device loss in 2 runs of 380 s, and interiors are much better lit. Free RAM went down to 0.5–0.8 GB of 31 GB during those runs. - One possible regression: with the builder on, the main character's skin draw (pixel shader `b36c288fccc767b0`) was missing from the G-buffer in 2 of 2 runs. It is also missing with the builder off while `VICTORY_REMAP_LAND`, `VICTORY_HELPER_OWN` and `VICTORY_CARD_TITLE_COPIES` are on (their defaults), and it is present with those three set to 0. That is one run per setting, and we haven't yet narrowed it to one switch or found the cause. - `VICTORY_DISPATCH_THREADS=0` together with the builder crashed at 60 s. **Correction (2026-11-26):** with the builder on, the skin draw was missing in both builder-on runs, including the one with `VICTORY_REMAP_LAND`, `VICTORY_HELPER_OWN` and `VICTORY_CARD_TITLE_COPIES` set to 0. The "present with those three set to 0" result above was with the builder off only. *AI-assisted (Claude Code).*
drchef420 commented 2026-11-26 11:05:32 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by drchef420 on 2026-11-26T10:41:15Z.


AI-assisted (Claude Code). Numbers and log lines only, no game data.

Follow-up to the boat and the black surfaces in my earlier comments here and on #1082. Neither one comes from this PR.

The boat was the water copy-back being off. I suggested the boat's engine might break because pages read zeros after the copy numbers ran out. That was wrong. I ran the same part of the game four ways on main + #994 + #1082 (da19199):

builder VICTORY_TEXTURE_BACK boat
on unset sinks at once, engine destroyed
off unset sinks at once, Cal falls off
off 1 floats, chase plays through to the camp (64 min run)
on (VICTORY_BVH_BUILDER=1 VICTORY_FIRSTLANE_OWN=1) 1 floats, chase plays through to the camp (57 min run)

This is the known water bug (#863, #1034): the boat floats on wave heights the GPU writes, and without the copy-back the CPU reads nothing there. With the copy-back on, the builder doesn't change anything at the boat. The four water textures were copied back 646 times in the builder run. There was one a texture copied back could not be tiled e=Unsupported warning in each run; we saw no effect from it.

The black surfaces aren't from the builder either. Surfaces in shade (house walls, a wheelbarrow, parts of the dock, the building at the camp) come out flat black. They look the same with the builder on or off, so it's something else.

Still open: one indoor scene at the camp (the "Press X to fight" prompt) came out washed white with smeared streaks. That was with the builder on; I don't have the same moment with it off yet, so I can't say whether the builder is involved.

Cost of the builder in the same place: with it, frames took about 340–770 ms; without it, about 290–450 ms (RTX 5070, 32 GB PC). #1082's reclaim kept the run going after the copy numbers ran out at +28 min (7 give-backs, no crash).

<!-- greyfinch-sync:fxceless/victory-fork:comment:7189697859 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/994#issuecomment-7189697859). Originally posted by [drchef420](https://github.com/drchef420) on 2026-11-26T10:41:15Z. --- *AI-assisted (Claude Code). Numbers and log lines only, no game data.* Follow-up to the boat and the black surfaces in my earlier comments here and on #1082. Neither one comes from this PR. **The boat was the water copy-back being off.** I suggested the boat's engine might break because pages read zeros after the copy numbers ran out. That was wrong. I ran the same part of the game four ways on main + #994 + #1082 (da19199): | builder | `VICTORY_TEXTURE_BACK` | boat | |---|---|---| | on | unset | sinks at once, engine destroyed | | off | unset | sinks at once, Cal falls off | | off | `1` | floats, chase plays through to the camp (64 min run) | | on (`VICTORY_BVH_BUILDER=1 VICTORY_FIRSTLANE_OWN=1`) | `1` | floats, chase plays through to the camp (57 min run) | This is the known water bug (#863, #1034): the boat floats on wave heights the GPU writes, and without the copy-back the CPU reads nothing there. With the copy-back on, the builder doesn't change anything at the boat. The four water textures were copied back 646 times in the builder run. There was one `a texture copied back could not be tiled e=Unsupported` warning in each run; we saw no effect from it. **The black surfaces aren't from the builder either.** Surfaces in shade (house walls, a wheelbarrow, parts of the dock, the building at the camp) come out flat black. They look the same with the builder on or off, so it's something else. **Still open:** one indoor scene at the camp (the "Press X to fight" prompt) came out washed white with smeared streaks. That was with the builder on; I don't have the same moment with it off yet, so I can't say whether the builder is involved. **Cost of the builder in the same place:** with it, frames took about 340–770 ms; without it, about 290–450 ms (RTX 5070, 32 GB PC). #1082's reclaim kept the run going after the copy numbers ran out at +28 min (7 give-backs, no crash).
HyperEndgame commented 2026-11-26 17:18:46 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by HyperEndgame on 2026-11-26T17:18:46Z.


With the builder on (VICTORY_BVH_BUILDER=1), no trace program ever reaches a node test on our card. The cause is the user-data view-address path. The 3-line fix below makes the walk run.

Setup

  • GPU: RTX 4070 SUPER 12 GB (32-lane waves). CPU: Ryzen 7 7700X. RAM: 32 GB. OS: Windows 11.
  • Base: main 085ee7c + #854 + #993 + this PR + #213 + #1147 + #1084. Diag build.
  • Switches: README run-253 set, plus VICTORY_BVH_BUILDER=1 VICTORY_RAY_PROBE=1. Scripted input, 7–9 min runs.

What we saw

  • #1084's probe stayed at 0 in every run. We added diag counters to it:
    • wave entries at program start: 9k–32k waves a frame across the 13 walkers, all Memory nodes;
    • lanes arriving at a walk site: 0;
    • lanes on this PR's "not built" path: 0.
  • So the walkers run, but every lane leaves before image_bvh.
  • The static read of the largest walker: the only gate before the walk is the root dword at structure base + 0x30. Root <= 0 pops an empty stack, exec goes empty, and the walk is never issued.
  • The base comes from a structure SRV in a descriptor table (slot 1, dword 8). Every run logs, once: a shader takes the address of a buffer view that is not there: it reads 0 slot=1 dword=8.
  • BVH_CHECK shows the builder does produce structures: hundreds a frame, tens of thousands of box nodes, about 3–6% bad nodes. So the walkers were reading base 0, not an unbuilt structure.

Cause
host_word, USER_VIEW_ADDRESS path (draw.rs), decodes the table entry with buffer_range only. A View::Shader with dimension RAYTRACING_ACCELERATION_STRUCTURE gives None, so the result is 0. The heap-index path (SLOT_VIEW_ADDRESSES) already goes through view_address, which handles structure views.

Fix

-            Some(&Root::Table(table)) => crate::descriptor::view(table + u64::from(dword) * 4)
-                .and_then(|view| crate::descriptor::host::buffer_range(&view))
-                .map_or(0, |range| range.0),
+            Some(&Root::Table(table)) => crate::descriptor::view(table + u64::from(dword) * 4)
+                .map_or(0, |view| crate::descriptor::host::view_address(&view)),

After the fix (same switches)

  • The warning is gone.
  • Probe: up to 14.3M node tests a frame; about 50% box hits; 5k–170k triangle hits; missing 0–9k.
  • Visual, opening cutscene: room walls lit and sun shadows on the character. With the builder off, the room is black and the character is flat-lit. Not the exact same moment.
  • No crash in two runs (7 and 9 min).
  • Cost: 0.1–0.6 fps (1.6–7 s a frame, about 95% GPU), against 2.5–3.4 fps with the builder on before the fix. The walk is now the frame cost.

Not tested

  • This PR alone, without the other PRs above.
  • Correctness of individual shadows against the console.
  • 64-lane GPUs.
<!-- greyfinch-sync:fxceless/victory-fork:comment:7198811035 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/994#issuecomment-7198811035). Originally posted by [HyperEndgame](https://github.com/HyperEndgame) on 2026-11-26T17:18:46Z. --- With the builder on (`VICTORY_BVH_BUILDER=1`), no trace program ever reaches a node test on our card. The cause is the user-data view-address path. The 3-line fix below makes the walk run. **Setup** - GPU: RTX 4070 SUPER 12 GB (32-lane waves). CPU: Ryzen 7 7700X. RAM: 32 GB. OS: Windows 11. - Base: main `085ee7c` + #854 + #993 + this PR + #213 + #1147 + #1084. Diag build. - Switches: README run-253 set, plus `VICTORY_BVH_BUILDER=1 VICTORY_RAY_PROBE=1`. Scripted input, 7–9 min runs. **What we saw** - #1084's probe stayed at 0 in every run. We added diag counters to it: - wave entries at program start: 9k–32k waves a frame across the 13 walkers, all `Memory` nodes; - lanes arriving at a walk site: 0; - lanes on this PR's "not built" path: 0. - So the walkers run, but every lane leaves before `image_bvh`. - The static read of the largest walker: the only gate before the walk is the root dword at structure base + 0x30. Root <= 0 pops an empty stack, exec goes empty, and the walk is never issued. - The base comes from a structure SRV in a descriptor table (slot 1, dword 8). Every run logs, once: `a shader takes the address of a buffer view that is not there: it reads 0 slot=1 dword=8`. - `BVH_CHECK` shows the builder does produce structures: hundreds a frame, tens of thousands of box nodes, about 3–6% bad nodes. So the walkers were reading base 0, not an unbuilt structure. **Cause** `host_word`, `USER_VIEW_ADDRESS` path (draw.rs), decodes the table entry with `buffer_range` only. A `View::Shader` with dimension `RAYTRACING_ACCELERATION_STRUCTURE` gives `None`, so the result is 0. The heap-index path (`SLOT_VIEW_ADDRESSES`) already goes through `view_address`, which handles structure views. **Fix** ```diff - Some(&Root::Table(table)) => crate::descriptor::view(table + u64::from(dword) * 4) - .and_then(|view| crate::descriptor::host::buffer_range(&view)) - .map_or(0, |range| range.0), + Some(&Root::Table(table)) => crate::descriptor::view(table + u64::from(dword) * 4) + .map_or(0, |view| crate::descriptor::host::view_address(&view)), ``` **After the fix (same switches)** - The warning is gone. - Probe: up to 14.3M node tests a frame; about 50% box hits; 5k–170k triangle hits; `missing` 0–9k. - Visual, opening cutscene: room walls lit and sun shadows on the character. With the builder off, the room is black and the character is flat-lit. Not the exact same moment. - No crash in two runs (7 and 9 min). - Cost: 0.1–0.6 fps (1.6–7 s a frame, about 95% GPU), against 2.5–3.4 fps with the builder on before the fix. The walk is now the frame cost. **Not tested** - This PR alone, without the other PRs above. - Correctness of individual shadows against the console. - 64-lane GPUs.
HyperEndgame commented 2026-11-26 17:55:02 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by HyperEndgame on 2026-11-26T17:55:02Z.


Correction to the cost numbers above: the 0.1–0.6 fps was measured with VICTORY_RAY_PROBE=1. The probe's per-node atomics, all to the same few dwords, were nearly all of it.

With the probe off, same build and switches (VICTORY_CARD_METER_PIPELINES=1, one 8-min run):

  • 2.4–3.0 fps (333–425 ms a frame), with the walk running and the room lit.
  • Card time per binding of the largest walkers: 11.4 ms, 4.9 ms, 3.2 ms, 1.9 ms, 1.3 ms (it was 181 ms for the largest with the probe on).
  • With VICTORY_SHADER_LOOP_LIMIT=trace:128 the frame rate stays the same, and VICTORY_LOOP_NOTES=1 shows only 3–13 lanes reaching the limit. So there is no long tail of runaway walks.
<!-- greyfinch-sync:fxceless/victory-fork:comment:7199842506 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/994#issuecomment-7199842506). Originally posted by [HyperEndgame](https://github.com/HyperEndgame) on 2026-11-26T17:55:02Z. --- Correction to the cost numbers above: the 0.1–0.6 fps was measured with `VICTORY_RAY_PROBE=1`. The probe's per-node atomics, all to the same few dwords, were nearly all of it. With the probe off, same build and switches (`VICTORY_CARD_METER_PIPELINES=1`, one 8-min run): - 2.4–3.0 fps (333–425 ms a frame), with the walk running and the room lit. - Card time per binding of the largest walkers: 11.4 ms, 4.9 ms, 3.2 ms, 1.9 ms, 1.3 ms (it was 181 ms for the largest with the probe on). - With `VICTORY_SHADER_LOOP_LIMIT=trace:128` the frame rate stays the same, and `VICTORY_LOOP_NOTES=1` shows only 3–13 lanes reaching the limit. So there is no long tail of runaway walks.
KyleS98 commented 2026-11-26 18:09:57 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by KyleS98 on 2026-11-26T18:09:57Z.


An RTX 3090 Ti data point (32-lane, 24 GB; 62 GB RAM, Windows 11), this PR at 7af465b with only #911's cap (1087538) on top. Diagnostics build, release profile, a new start through the opening into the prologue cell, 6-minute runs, one per row.

As published, Series X profile (VICTORY_FIRSTLANE_OWN=1, otherwise defaults):

builder off VICTORY_BVH_BUILDER=1
frame once settled in the cell about 285 ms about 345 ms
process working set, peak / settled 39.0 / 31.6 GB 40.8 / 35-36 GB
title exceptions, device removals 0, 0 0, 0

The builder came up with all 53 pipelines and ran 4 min 38 s to the run's limit. On main before the thread-count fix, every builder run of mine ended within seconds.

With the README's speed switches (INDIRECT_WINDOW JOIN_PARTS BACK_OWN_VIEW INDIRECT_GATHER CARD_REHASH_RUNS LEVELS_ON_DEMAND ASYNC_SUBMIT QUEUE2 TEXTURE_NO_WAIT COPY_PLAIN, MERGE_GAP=64 MERGE_RUNS=4096 STAGING_POOL=0, CARD_BUFFERS_MIN_KB=64 CARD_BUFFERS_MB=1280), Series X: about 152 ms with the builder off and about 280 ms with it on, again with no exception and no removal. So here the builder costs about 60 ms a frame at the defaults and about 130 ms with the speed set.

Picture with the builder off (the no-hit node tests), same shot of the cell from behind, against main e4245f3 with #798 (Series S profile) on the same card; the Series S tree below shows the same three things as Series X:

  • the character's hair has its dark colour; on main it comes out pale blond;
  • the window's dirty glass and haze are drawn; on main the pane is clear;
  • the wall beside the bunk is dark and even; on main it is lit in bands.

With the builder on, the top of the head and the shoulders are darker, with a rim of light from the window. I have not compared either against the console.

Series S needs #798 on this base to show the world, so those runs are of a tree of mine (this PR + #911 + #798 + #1081 + our speed commits): about 81 ms a frame in the same shot, hair and window as above. One difference from Series X on the same build: the print on the back of the character's shirt is missing on Series S in 4 of 4 runs and there in 2 of 2 on Series X. VICTORY_REMAP_LAND=0 VICTORY_HELPER_OWN=0 VICTORY_CARD_TITLE_COPIES=0 (HLVM04's three, above) did not bring it back in one run. I do not know yet whether that comes from this PR.

Memory, for others with background apps open: the working set's peak comes at world entry with or without the builder (39 GB against 40.8 GB); the builder adds about 4 GB once settled.

AI-assisted (Claude Code, Claude Fable 5.2). Numbers and descriptions only, no game data.

<!-- greyfinch-sync:fxceless/victory-fork:comment:7200128717 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/994#issuecomment-7200128717). Originally posted by [KyleS98](https://github.com/KyleS98) on 2026-11-26T18:09:57Z. --- An RTX 3090 Ti data point (32-lane, 24 GB; 62 GB RAM, Windows 11), this PR at `7af465b` with only #911's cap (`1087538`) on top. Diagnostics build, release profile, a new start through the opening into the prologue cell, 6-minute runs, one per row. **As published, Series X profile** (`VICTORY_FIRSTLANE_OWN=1`, otherwise defaults): | | builder off | `VICTORY_BVH_BUILDER=1` | |---|---|---| | frame once settled in the cell | about 285 ms | about 345 ms | | process working set, peak / settled | 39.0 / 31.6 GB | 40.8 / 35-36 GB | | title exceptions, device removals | 0, 0 | 0, 0 | The builder came up with all 53 pipelines and ran 4 min 38 s to the run's limit. On `main` before the thread-count fix, every builder run of mine ended within seconds. **With the README's speed switches** (`INDIRECT_WINDOW JOIN_PARTS BACK_OWN_VIEW INDIRECT_GATHER CARD_REHASH_RUNS LEVELS_ON_DEMAND ASYNC_SUBMIT QUEUE2 TEXTURE_NO_WAIT COPY_PLAIN`, `MERGE_GAP=64 MERGE_RUNS=4096 STAGING_POOL=0`, `CARD_BUFFERS_MIN_KB=64 CARD_BUFFERS_MB=1280`), Series X: about 152 ms with the builder off and about 280 ms with it on, again with no exception and no removal. So here the builder costs about 60 ms a frame at the defaults and about 130 ms with the speed set. **Picture with the builder off** (the no-hit node tests), same shot of the cell from behind, against `main` `e4245f3` with #798 (Series S profile) on the same card; the Series S tree below shows the same three things as Series X: - the character's hair has its dark colour; on `main` it comes out pale blond; - the window's dirty glass and haze are drawn; on `main` the pane is clear; - the wall beside the bunk is dark and even; on `main` it is lit in bands. With the builder on, the top of the head and the shoulders are darker, with a rim of light from the window. I have not compared either against the console. **Series S** needs #798 on this base to show the world, so those runs are of a tree of mine (this PR + #911 + #798 + #1081 + our speed commits): about 81 ms a frame in the same shot, hair and window as above. One difference from Series X on the same build: the print on the back of the character's shirt is missing on Series S in 4 of 4 runs and there in 2 of 2 on Series X. `VICTORY_REMAP_LAND=0 VICTORY_HELPER_OWN=0 VICTORY_CARD_TITLE_COPIES=0` (HLVM04's three, above) did not bring it back in one run. I do not know yet whether that comes from this PR. Memory, for others with background apps open: the working set's peak comes at world entry with or without the builder (39 GB against 40.8 GB); the builder adds about 4 GB once settled. AI-assisted (Claude Code, Claude Fable 5.2). Numbers and descriptions only, no game data.
Swagi-REDACTED commented 2026-11-26 20:09:51 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by Swagi-REDACTED on 2026-11-26T20:09:51Z.


Local integration test of #994 at 72e50a10aaa32adfa4e8d8f948c1ecdd037f6f59 in my fork (includes #1002, the small #1112 translator fixes, #1205 and live input). This is an integration result, not an isolated comparison of this PR.

Hardware: Ryzen 7 9800X3D, 16 GB system RAM, RTX 3060 12 GB, NVIDIA 621.14, Windows 11. A newer retail game remained on an HDD; cache/profile were on SSD. Series X profile, builder enabled, D3D12 debug layer and input/BVH tracing enabled; no ambient substitute, shader skips, quarantine or dry builder mode.

Runtime, 2026-11-26 19:40–20:05 UTC:

  • All 53 builder host pipelines became ready. The private trace recorded actual builder dispatches over hundreds of frames and GPU writebacks; this went beyond pipeline creation.
  • The opening rendered, but lighting, geometry and texture defects remained substantial. Observed frame rates varied approximately 0.5–7 FPS during world rendering/loading; scenes and diagnostics differed, so this is not a controlled performance comparison.
  • Peak sampled process private commit was 27,022 MB; minimum free system commit 359 MB, minimum available physical RAM 136 MB. This 16 GB host was heavily memory constrained.
  • Debug-layer warnings included id 538: a buffer in COPY_DEST was bound as a compute root SRV. No device-removal failure was observed in this run. I ended it intentionally with a normal window close, process exit 0.
  • Live menu input advanced into loading, and the corrected pause input was actually read, but interactive movement, a checkpoint and completion of the prologue were not verified.

Validation of the tested integration: cargo test --locked --workspace -- --test-threads=4 --nocapture: 690 passed, 0 failed, 12 ignored, with 10 explicit skipped/not-run cases (two queue2 adapter checks, two unset local builder DLL tests, four compiler checks and two WARP limitations). Separate local builder-DLL tests: 4 passed, 0 failed, 0 ignored. Diagnostics build passed. Offline builder validation/pipeline creation: 52/52 on NVIDIA; runtime then reported 53 ready pipelines. A previous parallel GPU test attempt crashed in d3d10warp.dll; serial and repeated parallel GPU tests and the final workspace run passed, but that crash has no proven root cause.

AI use: Codex, GPT-6 (exact serving variant not exposed), integrated the existing changes, ran the tests and local runtime checks, and wrote this report. No game data or raw traces are attached.

<!-- greyfinch-sync:fxceless/victory-fork:comment:7202369216 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/994#issuecomment-7202369216). Originally posted by [Swagi-REDACTED](https://github.com/Swagi-REDACTED) on 2026-11-26T20:09:51Z. --- Local integration test of #994 at `72e50a10aaa32adfa4e8d8f948c1ecdd037f6f59` in my fork (includes #1002, the small #1112 translator fixes, #1205 and live input). This is an integration result, not an isolated comparison of this PR. Hardware: Ryzen 7 9800X3D, 16 GB system RAM, RTX 3060 12 GB, NVIDIA 621.14, Windows 11. **A newer retail game** remained on an HDD; cache/profile were on SSD. Series X profile, builder enabled, D3D12 debug layer and input/BVH tracing enabled; no ambient substitute, shader skips, quarantine or dry builder mode. Runtime, 2026-11-26 19:40–20:05 UTC: - All 53 builder host pipelines became ready. The private trace recorded actual builder dispatches over hundreds of frames and GPU writebacks; this went beyond pipeline creation. - The opening rendered, but lighting, geometry and texture defects remained substantial. Observed frame rates varied approximately 0.5–7 FPS during world rendering/loading; scenes and diagnostics differed, so this is not a controlled performance comparison. - Peak sampled process private commit was 27,022 MB; minimum free system commit 359 MB, minimum available physical RAM 136 MB. This 16 GB host was heavily memory constrained. - Debug-layer warnings included id 538: a buffer in COPY_DEST was bound as a compute root SRV. No device-removal failure was observed in this run. I ended it intentionally with a normal window close, process exit 0. - Live menu input advanced into loading, and the corrected pause input was actually read, but interactive movement, a checkpoint and completion of the prologue were not verified. Validation of the tested integration: `cargo test --locked --workspace -- --test-threads=4 --nocapture`: 690 passed, 0 failed, 12 ignored, with 10 explicit skipped/not-run cases (two queue2 adapter checks, two unset local builder DLL tests, four compiler checks and two WARP limitations). Separate local builder-DLL tests: 4 passed, 0 failed, 0 ignored. Diagnostics build passed. Offline builder validation/pipeline creation: 52/52 on NVIDIA; runtime then reported 53 ready pipelines. A previous parallel GPU test attempt crashed in d3d10warp.dll; serial and repeated parallel GPU tests and the final workspace run passed, but that crash has no proven root cause. AI use: Codex, GPT-6 (exact serving variant not exposed), integrated the existing changes, ran the tests and local runtime checks, and wrote this report. No game data or raw traces are attached.
KyleS98 commented 2026-11-26 23:58:26 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by KyleS98 on 2026-11-26T23:58:26Z.


A follow-up to the Series S observation in my results comment above (the print on the back of the shirt missing in the prologue's cell on this branch): I found what decides it here, and it is VICTORY_JOIN_PARTS=1, not anything in this PR's own changes.

  • On this branch's head (+ #911, #868), Series S profile, RTX 3090 Ti: with parts joined the print is missing in every run; with VICTORY_JOIN_MOST=1 (same build, parts not joined) it is there.
  • Joined parts are prepared together, so a later part's texture refresh reads title memory before an earlier part's texture read-back has landed; apart, the later part waits for that flight.
  • A rule in the joiner brings the print back and keeps the joining: a part whose CPU-side steps (title buffer copy, fill of upload memory, texture refresh) read a range the parts already taken declare written by shaders, or a range their texture read-backs land in, starts a submission of its own. One more submission a frame here (9 → 10), 53 → 55 ms. With the declared buffer ranges alone the print stayed missing; the read-back ranges are what it needs. Commit: f420f2a (VICTORY_JOIN_READS=1).

On current main (4c60466 + #798) I do not see the fault: the print is there with JOIN_PARTS=1, and the same rule ported there changed nothing I could measure (84–88 ms with it, 84–96 without, one more submission a frame). So I am not sending it to main; it may matter to anyone running this branch or a stack on it with parts joined.

Numbers and text only. AI-assisted (Claude Code, Claude Fable 5.2).

<!-- greyfinch-sync:fxceless/victory-fork:comment:7206049649 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/994#issuecomment-7206049649). Originally posted by [KyleS98](https://github.com/KyleS98) on 2026-11-26T23:58:26Z. --- A follow-up to the Series S observation in my results comment above (the print on the back of the shirt missing in the prologue's cell on this branch): I found what decides it here, and it is `VICTORY_JOIN_PARTS=1`, not anything in this PR's own changes. - On this branch's head (+ #911, #868), Series S profile, RTX 3090 Ti: with parts joined the print is missing in every run; with `VICTORY_JOIN_MOST=1` (same build, parts not joined) it is there. - Joined parts are prepared together, so a later part's texture refresh reads title memory before an earlier part's texture read-back has landed; apart, the later part waits for that flight. - A rule in the joiner brings the print back and keeps the joining: a part whose CPU-side steps (title buffer copy, fill of upload memory, texture refresh) read a range the parts already taken declare written by shaders, or a range their texture read-backs land in, starts a submission of its own. One more submission a frame here (9 → 10), 53 → 55 ms. With the declared buffer ranges alone the print stayed missing; the read-back ranges are what it needs. Commit: [f420f2a](https://github.com/KyleS98/VIctory-Neo/commit/f420f2a) (`VICTORY_JOIN_READS=1`). On current `main` (`4c60466` + #798) I do not see the fault: the print is there with `JOIN_PARTS=1`, and the same rule ported there changed nothing I could measure (84–88 ms with it, 84–96 without, one more submission a frame). So I am not sending it to `main`; it may matter to anyone running this branch or a stack on it with parts joined. Numbers and text only. AI-assisted (Claude Code, Claude Fable 5.2).
PiloteCode commented 2026-11-27 00:22:50 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by PiloteCode on 2026-11-27T00:22:50Z.


@HyperEndgame thanks, that is the cause, and your fix is the right one.

Checked on the branch: for a descriptor at a fixed place of a table (USER_VIEW_ADDRESS), host_word took the address with buffer_range only. A structure's view is made with no resource, so that gave nothing and the walk got address 0. The views a program picks from the heap (SLOT_VIEW_ADDRESSES) already went through view_address, which reads the location out of the view's description. Your three lines send the table path through it too. The only other change it needs here is view_address made pub(crate).

What we did with it:

  • Your fix, credited to you in the commit message, is on the branch as e7d47af, with a test (draw::tests::a_structure_view_in_a_table_gives_the_structure_address). The test gives host_word a structure's view at dword 8 of a table and fails without the change (0 in place of the structure's address). It needs no adapter.
  • Software adapter: cargo test -p victory-gpu --features diagnostics -- --test-threads=1 gives 204 passed, 1 failed, 6 ignored. The failure is depth_bounds_pipeline_loads_and_filters_draws, which fails on WARP on main too. cargo clippy -p victory-gpu --all-targets -- -D warnings and cargo xtask policy are clean. Not run on a card or in the game.
  • The layer our own tree now runs on (avatarmanz's) already had the same change. It also names the structure's address among the pages made ready before the walk's dispatch. We added the same test there.

So in the builder-on runs reported on this PR so far, the walkers that take their structure from a table ended before their first node test, as yours did. The cost people measured with the builder on is the builder's own stages and its copies, not the walk.

Thanks for the corrected numbers. Before your fix: 2.5-3.4 fps with the builder on. With the walk running and the probe off: 333-425 ms a frame, and 11.4 ms of card time for one binding of the largest walker. These are the first measurements of the walk itself that we have. The probe's own cost (its atomics, all on the same few dwords) is worth knowing for anyone who uses it to time things.

<!-- greyfinch-sync:fxceless/victory-fork:comment:7206411723 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/994#issuecomment-7206411723). Originally posted by [PiloteCode](https://github.com/PiloteCode) on 2026-11-27T00:22:50Z. --- @HyperEndgame thanks, that is the cause, and your fix is the right one. Checked on the branch: for a descriptor at a fixed place of a table (`USER_VIEW_ADDRESS`), `host_word` took the address with `buffer_range` only. A structure's view is made with no resource, so that gave nothing and the walk got address 0. The views a program picks from the heap (`SLOT_VIEW_ADDRESSES`) already went through `view_address`, which reads the location out of the view's description. Your three lines send the table path through it too. The only other change it needs here is `view_address` made `pub(crate)`. What we did with it: - Your fix, credited to you in the commit message, is on the branch as `e7d47af`, with a test (`draw::tests::a_structure_view_in_a_table_gives_the_structure_address`). The test gives `host_word` a structure's view at dword 8 of a table and fails without the change (0 in place of the structure's address). It needs no adapter. - Software adapter: `cargo test -p victory-gpu --features diagnostics -- --test-threads=1` gives 204 passed, 1 failed, 6 ignored. The failure is `depth_bounds_pipeline_loads_and_filters_draws`, which fails on WARP on `main` too. `cargo clippy -p victory-gpu --all-targets -- -D warnings` and `cargo xtask policy` are clean. Not run on a card or in the game. - The layer our own tree now runs on (avatarmanz's) already had the same change. It also names the structure's address among the pages made ready before the walk's dispatch. We added the same test there. So in the builder-on runs reported on this PR so far, the walkers that take their structure from a table ended before their first node test, as yours did. The cost people measured with the builder on is the builder's own stages and its copies, not the walk. Thanks for the corrected numbers. Before your fix: 2.5-3.4 fps with the builder on. With the walk running and the probe off: 333-425 ms a frame, and 11.4 ms of card time for one binding of the largest walker. These are the first measurements of the walk itself that we have. The probe's own cost (its atomics, all on the same few dwords) is worth knowing for anyone who uses it to time things.
PiloteCode commented 2026-11-27 00:22:54 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by PiloteCode on 2026-11-27T00:22:54Z.


@deadkid14 thanks. Naming the program settles it: the mesh pipelines without a pixel program were the wrong suspect.

We checked offline what this stack changes in e4a9f58e3acfcf7b, with our CLI on #854's head and on this PR's (VICTORY_TRANSLATE_ONLY=e4a9f58e3acfcf7b VICTORY_HOST_MAX_WAVE=32 victory translate --validate --list). It is a console wave64 compute program, run on a 32-lane card in #854's paired form. Two things differ, both from #993:

  • The paired form no longer selects each guarded write where only lanes inside the guard read it (VICTORY_WAVE_RAW, on by default): 14,589 host instructions in #854's form, 10,681 here.
  • Its group id in x adds a dword the host sets: the group base, for dispatches of more than 65,535 groups. That is the third user-data entry in your log line (user_data=3; under #854 the same program has two), and its root constants go from 8 to 12 dwords. This one has no switch.

With VICTORY_WAVE_RAW=0 the program's DXIL is #854's plus that dword, nothing else. The form for dispatches by thread counts (#994's, made on the recording thread) is refused for a program in the paired form, so the crash does not come from that form.

So one run would tell the two apart: VICTORY_WAVE_RAW=0 on GE-Proton11-14's vkd3d-proton, without the skip. If the crash goes, vkd3d-proton fails on the paired form without selects. If it stays, the group base is the one difference left, and we can give it a switch so you can try without it.

Two more things would help:

  • In your vkd3d-proton master run the program was skipped, so whether master makes this pipeline is still open. The same run without the skip would tell.
  • VICTORY_SHADER_SAVE=<dir> writes each shader as translated (<hash>.compute.dxil). With it you can check locally that the DXIL your run made is the one described above.

The four compute pipelines that never finish: three are ray-traced shadow programs that walk structures (11,800 to 14,100 host instructions, 44 to 55 loops each), and the fourth is a culling program in the local wave64 form. Their translation differs by less than 0.5 % between #854 and this stack, which fits your seeing them in both builds. We cannot tell from here why vkd3d-proton takes so long over them.

For the spin with vkd3d-proton master, drchef420's VICTORY_STACKS is what we would use too. One report on #854 (gustavowalkersgroup) had the stack collector itself fault at one of its sample times, on Windows. So a crash exactly at one of the listed seconds would come from the collector, not from the hang.

<!-- greyfinch-sync:fxceless/victory-fork:comment:7206412580 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/994#issuecomment-7206412580). Originally posted by [PiloteCode](https://github.com/PiloteCode) on 2026-11-27T00:22:54Z. --- @deadkid14 thanks. Naming the program settles it: the mesh pipelines without a pixel program were the wrong suspect. We checked offline what this stack changes in `e4a9f58e3acfcf7b`, with our CLI on #854's head and on this PR's (`VICTORY_TRANSLATE_ONLY=e4a9f58e3acfcf7b VICTORY_HOST_MAX_WAVE=32 victory translate --validate --list`). It is a console wave64 compute program, run on a 32-lane card in #854's paired form. Two things differ, both from #993: - The paired form no longer selects each guarded write where only lanes inside the guard read it (`VICTORY_WAVE_RAW`, on by default): 14,589 host instructions in #854's form, 10,681 here. - Its group id in x adds a dword the host sets: the group base, for dispatches of more than 65,535 groups. That is the third user-data entry in your log line (`user_data=3`; under #854 the same program has two), and its root constants go from 8 to 12 dwords. This one has no switch. With `VICTORY_WAVE_RAW=0` the program's DXIL is #854's plus that dword, nothing else. The form for dispatches by thread counts (#994's, made on the recording thread) is refused for a program in the paired form, so the crash does not come from that form. So one run would tell the two apart: `VICTORY_WAVE_RAW=0` on GE-Proton11-14's vkd3d-proton, without the skip. If the crash goes, vkd3d-proton fails on the paired form without selects. If it stays, the group base is the one difference left, and we can give it a switch so you can try without it. Two more things would help: - In your vkd3d-proton master run the program was skipped, so whether master makes this pipeline is still open. The same run without the skip would tell. - `VICTORY_SHADER_SAVE=<dir>` writes each shader as translated (`<hash>.compute.dxil`). With it you can check locally that the DXIL your run made is the one described above. The four compute pipelines that never finish: three are ray-traced shadow programs that walk structures (11,800 to 14,100 host instructions, 44 to 55 loops each), and the fourth is a culling program in the local wave64 form. Their translation differs by less than 0.5 % between #854 and this stack, which fits your seeing them in both builds. We cannot tell from here why vkd3d-proton takes so long over them. For the spin with vkd3d-proton master, drchef420's `VICTORY_STACKS` is what we would use too. One report on #854 (gustavowalkersgroup) had the stack collector itself fault at one of its sample times, on Windows. So a crash exactly at one of the listed seconds would come from the collector, not from the hang.
PiloteCode commented 2026-11-27 00:22:58 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by PiloteCode on 2026-11-27T00:22:58Z.


@drchef420 thanks for these runs; they are the longest with the builder that anyone has reported here.

  • 6 min 17 s, then 58 min 30 s, with the builder on an RTX 5070 with 32 GB: no exception and no device removal, where main crashed 8 s after the builder came up. That is what this PR is for. Shared memory levelling off at 11.3-12.4 GB over the last half hour is the first long-run figure we have for it.
  • COPIES = 2047: noted, thanks for the correction. Running out of copy numbers after about 22 minutes of the builder is this PR's limit as written: a copy that is numbered is kept for the rest of the run. #1082's reclaim addresses that; this PR does not.
  • The copying back half of each frame is the shortcut the module notes of memory.rs describe. Every dispatch that can store through an address declares all numbered copies written, and they are compared on the CPU afterwards. A dirty-page mask written by the shaders would bound that; it is not in this PR.
  • The boat and the black surfaces: thank you for running the four combinations. That puts both outside this PR.
  • Thank you also for answering deadkid14 about VICTORY_STACKS and the console-instruction line.

One thing to keep in mind when reading your runs: HyperEndgame found (above) that with the builder on, the walkers that take their structure from a table got address 0 and ended before their first node test. So what your runs measured is the builder's stages and its copies, not the walk: 340-770 ms a frame against 290-450 ms without the builder, at the boat. With his fix the walk will add its own cost.

<!-- greyfinch-sync:fxceless/victory-fork:comment:7206413543 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/994#issuecomment-7206413543). Originally posted by [PiloteCode](https://github.com/PiloteCode) on 2026-11-27T00:22:58Z. --- @drchef420 thanks for these runs; they are the longest with the builder that anyone has reported here. - 6 min 17 s, then 58 min 30 s, with the builder on an RTX 5070 with 32 GB: no exception and no device removal, where `main` crashed 8 s after the builder came up. That is what this PR is for. Shared memory levelling off at 11.3-12.4 GB over the last half hour is the first long-run figure we have for it. - `COPIES = 2047`: noted, thanks for the correction. Running out of copy numbers after about 22 minutes of the builder is this PR's limit as written: a copy that is numbered is kept for the rest of the run. #1082's reclaim addresses that; this PR does not. - The `copying back` half of each frame is the shortcut the module notes of `memory.rs` describe. Every dispatch that can store through an address declares all numbered copies written, and they are compared on the CPU afterwards. A dirty-page mask written by the shaders would bound that; it is not in this PR. - The boat and the black surfaces: thank you for running the four combinations. That puts both outside this PR. - Thank you also for answering deadkid14 about `VICTORY_STACKS` and the console-instruction line. One thing to keep in mind when reading your runs: HyperEndgame found (above) that with the builder on, the walkers that take their structure from a table got address 0 and ended before their first node test. So what your runs measured is the builder's stages and its copies, not the walk: 340-770 ms a frame against 290-450 ms without the builder, at the boat. With his fix the walk will add its own cost.
PiloteCode commented 2026-11-27 00:23:03 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by PiloteCode on 2026-11-27T00:23:03Z.


@HLVM04 thanks for the update. 70-77 ms a frame with the builder on (589 ms on your older base) is the fastest builder-on figure reported here.

  • VICTORY_DISPATCH_THREADS: nothing in this PR's code reads that name, and dispatches by thread counts have no off switch here. So that run had the builder as in your other two. To say more about its crash at 60 s, we would need its log lines.
  • The skin draw missing with the builder on: look in those two logs for a draw whose descriptor table found no free slots is dropped or no free dynamic descriptor slots. drchef420's hour-long builder run logged both. If they are there, the skin's draw may be one of the draws dropped that way.
  • As HyperEndgame found (above), in builder-on runs on this PR the walkers that take their structure from a table ended before their first node test. So the better-lit interiors do not come from traced shadows yet.
<!-- greyfinch-sync:fxceless/victory-fork:comment:7206414561 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/994#issuecomment-7206414561). Originally posted by [PiloteCode](https://github.com/PiloteCode) on 2026-11-27T00:23:03Z. --- @HLVM04 thanks for the update. 70-77 ms a frame with the builder on (589 ms on your older base) is the fastest builder-on figure reported here. - `VICTORY_DISPATCH_THREADS`: nothing in this PR's code reads that name, and dispatches by thread counts have no off switch here. So that run had the builder as in your other two. To say more about its crash at 60 s, we would need its log lines. - The skin draw missing with the builder on: look in those two logs for `a draw whose descriptor table found no free slots is dropped` or `no free dynamic descriptor slots`. drchef420's hour-long builder run logged both. If they are there, the skin's draw may be one of the draws dropped that way. - As HyperEndgame found (above), in builder-on runs on this PR the walkers that take their structure from a table ended before their first node test. So the better-lit interiors do not come from traced shadows yet.
PiloteCode commented 2026-11-27 00:23:07 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by PiloteCode on 2026-11-27T00:23:07Z.


@KyleS98 thanks for the table. A 24 GB card with the builder on and off, under both switch sets, is what we were missing.

  • The builder costs you about 60 ms a frame at the defaults (285 to 345 ms) and about 130 ms with the README's speed switches (152 to 280 ms), plus about 4 GB of working set once settled. It ran 4 min 38 s with all 53 pipelines and no exception or removal, where main ended within seconds.
  • As HyperEndgame found (above), in these runs the walkers that take their structure from a table got address 0 and ended before their first node test. So that cost is the builder's stages and its copies, not the walk, and the darker head with the builder on does not come from traced shadows.
  • The shirt print on Series S: we have no Series S run of this branch, so we cannot add anything yet. Thanks for trying HLVM04's three switches.
<!-- greyfinch-sync:fxceless/victory-fork:comment:7206415581 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/994#issuecomment-7206415581). Originally posted by [PiloteCode](https://github.com/PiloteCode) on 2026-11-27T00:23:07Z. --- @KyleS98 thanks for the table. A 24 GB card with the builder on and off, under both switch sets, is what we were missing. - The builder costs you about 60 ms a frame at the defaults (285 to 345 ms) and about 130 ms with the README's speed switches (152 to 280 ms), plus about 4 GB of working set once settled. It ran 4 min 38 s with all 53 pipelines and no exception or removal, where `main` ended within seconds. - As HyperEndgame found (above), in these runs the walkers that take their structure from a table got address 0 and ended before their first node test. So that cost is the builder's stages and its copies, not the walk, and the darker head with the builder on does not come from traced shadows. - The shirt print on Series S: we have no Series S run of this branch, so we cannot add anything yet. Thanks for trying HLVM04's three switches.
PiloteCode commented 2026-11-27 00:23:11 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by PiloteCode on 2026-11-27T00:23:11Z.


@Swagi-REDACTED thanks for the integration report and for keeping it apart from an isolated result.

  • All 53 builder pipelines ready, with builder dispatches and write-backs over hundreds of frames, on a 16 GB machine: that matches the other 32-lane runs here. The memory figures (27 GB private commit peak, 136 MB of physical memory left at the lowest) fit what Zayfway and Exopus reported for 16 GB.
  • Debug layer id 538 (a buffer in COPY_DEST bound as a compute root SRV): in a diagnostics build with VICTORY_D3D12_DRED=1, our host buffers carry names (title buffer ..., title memory ..., title memory by address: ...), and the debug layer's message then names the buffer. With that name we could tell which of our bindings misses its transition. Without it we cannot say from here whether it is this PR's.
<!-- greyfinch-sync:fxceless/victory-fork:comment:7206416532 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/994#issuecomment-7206416532). Originally posted by [PiloteCode](https://github.com/PiloteCode) on 2026-11-27T00:23:11Z. --- @Swagi-REDACTED thanks for the integration report and for keeping it apart from an isolated result. - All 53 builder pipelines ready, with builder dispatches and write-backs over hundreds of frames, on a 16 GB machine: that matches the other 32-lane runs here. The memory figures (27 GB private commit peak, 136 MB of physical memory left at the lowest) fit what Zayfway and Exopus reported for 16 GB. - Debug layer id 538 (a buffer in `COPY_DEST` bound as a compute root SRV): in a diagnostics build with `VICTORY_D3D12_DRED=1`, our host buffers carry names (`title buffer ...`, `title memory ...`, `title memory by address: ...`), and the debug layer's message then names the buffer. With that name we could tell which of our bindings misses its transition. Without it we cannot say from here whether it is this PR's.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/994:upstream-pr/994'
git switch 'upstream-pr/994'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/994'
git switch 'upstream-pr/994'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/994'
git switch 'upstream-pr/994'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/994'
git switch 'main'
git merge --squash 'upstream-pr/994'
git switch 'main'
git merge --ff-only 'upstream-pr/994'
git switch 'main'
git merge 'upstream-pr/994'
git push origin 'main'
Sign in to join this conversation.
No reviewers
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
fxceless/victory-fork!992
No description provided.