Hot title memory in VRAM (#772) with live ray tracing (#814): a third less copying #978

Open
gangg111 wants to merge 25 commits from upstream-pr/980 into main
gangg111 commented 2026-11-25 14:36:37 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by gangg111 on 2026-11-25T14:36:37Z.


What

Pull request #772 by @sirrus98 (title memory in place, hot memory kept in VRAM) merged on top of #905 (#814 live ray tracing on current main). With ray tracing on, the processor-side copy of title memory was most of the frame; with VICTORY_INPLACE=4 it drops by about a third.

This branch contains #905's merge commit, so it should go in after #905 (or instead of both). All credit for the in-place and resident work is @sirrus98's, for the ray tracing @staronthehorizon's; this resolves the merge and measures it with ray tracing.

How the conflicts were resolved

  • shadow.rs loose(): #814's version (writable windows, read-only windows in place) is kept. With VICTORY_INPLACE>=3 a window goes to its arena run first, as in #772, and writable asks take it too (the card writes the title's own bytes). Hot windows become residents (hot_window). retarget_tables runs before both tables are read.
  • memory.rs (SLOT_MEMORY directory): copies are Option, with #772's retarget to residents; renumbering also moves #814's dirty-page records to the new number. Directory offsets use entry_offset (the bias of memory in place), including the pages a new copy fills in.
  • inplace.rs place_for: the arena path (level 3 and up) comes before #814's late() guard, which stays for the older levels. place keeps #814's writable argument; #772's callers pass true.
  • xmem.rs: #814's lazy SEC_COMMIT chunks are kept. They are already committed sections, so VICTORY_INPLACE_POOL is not needed here. The section-gone hooks of both sides run (arena::title_memory_section_gone calls the in-place census one).
  • host.rs: flights carry both #814's memory_dirty and #772's in_place; the early-signal landing passes #814's new relay_card_back arguments.
  • pipeline.rs / draw.rs: threads and the store widths both kept; typed-store write-back by width plus mark_uav_dirty.
  • One test is now ignored: warp_committed_section_places_read_only_and_writable_and_promotes opens a section by its handle, which #772 refuses on purpose (commit kept until restart on NVIDIA). VICTORY_ALLOW_SECTION_HEAPS=1 still allows it.

Testing

Hardware: RTX 3080 10 GB, driver 621.01, no Resizable BAR, i9-12900K, 32 GB RAM, Windows 11.

  • cargo build --release: clean (2 dead-code warnings, as before).
  • cargo test --release --workspace -- --test-threads=1: everything passes except xtask repository_passes_policy, which flags emit/lower.rs over 512 KiB (from #814) and a local build directory, nothing from this merge.
  • In the game, --console series-s, VICTORY_BVH_BUILDER=1 VICTORY_BVH_QUARANTINE=0 VICTORY_CARD_FETCH_INFLIGHT=1 VICTORY_TEXTURE_DROP_MIPS=1 VICTORY_TEXTURE_ROOM_PERCENT=82, same scene (the first cell):
processor copies frame
#905 200 to 235 ms 278 to 307 ms
this branch, VICTORY_INPLACE=4 135 to 155 ms 238 to 292 ms
  • The cell is lit as with #905; no device loss, no panic.
  • Residents: about 95 alive, 470 MB in video memory; per frame about 100 MB uploaded from arenas, 283 MB compared, 10 MB merged back.
  • Title memory in place without residents (windows and pool sections read over the bus, tried separately) was slower on this card: card time 30 to 55 ms became 145 ms, frame 368 ms. The VRAM copies are what makes it pay.

Known

  • One full run with the switch (a second one ended in the settings menu and is not counted); #772 notes that identical runs vary by up to 15%.
  • The card still waits about 140 ms a frame between submissions (VICTORY_CARD_TIME).

🤖 Generated with Claude Code

<!-- greyfinch-sync:fxceless/victory-fork:issue:6606944288 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/980). Originally posted by [gangg111](https://github.com/gangg111) on 2026-11-25T14:36:37Z. --- ## What Pull request #772 by @sirrus98 (title memory in place, hot memory kept in VRAM) merged on top of #905 (#814 live ray tracing on current `main`). With ray tracing on, the processor-side copy of title memory was most of the frame; with `VICTORY_INPLACE=4` it drops by about a third. This branch contains #905's merge commit, so it should go in after #905 (or instead of both). All credit for the in-place and resident work is @sirrus98's, for the ray tracing @staronthehorizon's; this resolves the merge and measures it with ray tracing. ## How the conflicts were resolved - **`shadow.rs` `loose()`**: #814's version (writable windows, read-only windows in place) is kept. With `VICTORY_INPLACE>=3` a window goes to its arena run first, as in #772, and writable asks take it too (the card writes the title's own bytes). Hot windows become residents (`hot_window`). `retarget_tables` runs before both tables are read. - **`memory.rs` (`SLOT_MEMORY` directory)**: copies are `Option`, with #772's `retarget` to residents; renumbering also moves #814's dirty-page records to the new number. Directory offsets use `entry_offset` (the bias of memory in place), including the pages a new copy fills in. - **`inplace.rs` `place_for`**: the arena path (level 3 and up) comes before #814's `late()` guard, which stays for the older levels. `place` keeps #814's `writable` argument; #772's callers pass `true`. - **`xmem.rs`**: #814's lazy `SEC_COMMIT` chunks are kept. They are already committed sections, so `VICTORY_INPLACE_POOL` is not needed here. The section-gone hooks of both sides run (`arena::title_memory_section_gone` calls the in-place census one). - **`host.rs`**: flights carry both #814's `memory_dirty` and #772's `in_place`; the early-signal landing passes #814's new `relay_card_back` arguments. - **`pipeline.rs` / `draw.rs`**: `threads` and the store widths both kept; typed-store write-back by width plus `mark_uav_dirty`. - One test is now ignored: `warp_committed_section_places_read_only_and_writable_and_promotes` opens a section by its handle, which #772 refuses on purpose (commit kept until restart on NVIDIA). `VICTORY_ALLOW_SECTION_HEAPS=1` still allows it. ## Testing Hardware: RTX 3080 10 GB, driver 621.01, no Resizable BAR, i9-12900K, 32 GB RAM, Windows 11. - `cargo build --release`: clean (2 dead-code warnings, as before). - `cargo test --release --workspace -- --test-threads=1`: everything passes except `xtask` `repository_passes_policy`, which flags `emit/lower.rs` over 512 KiB (from #814) and a local build directory, nothing from this merge. - In the game, `--console series-s`, `VICTORY_BVH_BUILDER=1 VICTORY_BVH_QUARANTINE=0 VICTORY_CARD_FETCH_INFLIGHT=1 VICTORY_TEXTURE_DROP_MIPS=1 VICTORY_TEXTURE_ROOM_PERCENT=82`, same scene (the first cell): | | processor copies | frame | |---|---|---| | #905 | 200 to 235 ms | 278 to 307 ms | | this branch, `VICTORY_INPLACE=4` | 135 to 155 ms | 238 to 292 ms | - The cell is lit as with #905; no device loss, no panic. - Residents: about 95 alive, 470 MB in video memory; per frame about 100 MB uploaded from arenas, 283 MB compared, 10 MB merged back. - Title memory in place without residents (windows and pool sections read over the bus, tried separately) was slower on this card: card time 30 to 55 ms became 145 ms, frame 368 ms. The VRAM copies are what makes it pay. ## Known - One full run with the switch (a second one ended in the settings menu and is not counted); #772 notes that identical runs vary by up to 15%. - The card still waits about 140 ms a frame between submissions (`VICTORY_CARD_TIME`). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
gangg111 commented 2026-11-25 16:12:50 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by gangg111 on 2026-11-25T15:10:38Z.


Merged current main (a253706, 0b0074e) into the branch; conflicts in copystat, watch, lib and host resolved (main's VICTORY_CARD_REHASH_RUNS default, copy_back() and frame log taken; #814's overlay plane kept, but a present held behind a queue passes no overlay). descriptor/host.rs needed main's record_print, sync_tables and COPIED_TABLED. Workspace tests pass. Rerun in the game with the same switches and VICTORY_INPLACE=4: cell lit, 260 to 290 ms a frame, 0 draws dropped, no device loss.

<!-- greyfinch-sync:fxceless/victory-fork:comment:7166424811 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/980#issuecomment-7166424811). Originally posted by [gangg111](https://github.com/gangg111) on 2026-11-25T15:10:38Z. --- Merged current main (a253706, 0b0074e) into the branch; conflicts in copystat, watch, lib and host resolved (main's VICTORY_CARD_REHASH_RUNS default, copy_back() and frame log taken; #814's overlay plane kept, but a present held behind a queue passes no overlay). descriptor/host.rs needed main's record_print, sync_tables and COPIED_TABLED. Workspace tests pass. Rerun in the game with the same switches and VICTORY_INPLACE=4: cell lit, 260 to 290 ms a frame, 0 draws dropped, no device loss.
npanu420 commented 2026-11-25 16:12:50 +00:00 (Migrated from github.com)

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


Tested this branch as published (pr-980 head) on an RTX 3070 8 GB + i9-9900X, Windows 11, Series S, with the switches from your description plus BAKE_TEXTURES_MS=0.

With both parts on (BVH_BUILDER=1 BVH_QUARANTINE=0 CARD_FETCH_INFLIGHT=1 TEXTURE_DROP_MIPS=1 TEXTURE_ROOM_PERCENT=82 INPLACE=4): it crashes during loading, about 110 s in, 2 of 2 launches (cold and warm pipeline cache):
0xc0000005 at <title image>+0x23cf683 (write 0x0).

Each part alone does not crash:

switches result
ray tracing only (as above, without INPLACE=4) no crash; ~914 ms/frame median, preparing 658 ms, copy-back 268 ms, 0 dropped draws
INPLACE=4 without the builder no crash; ~407 ms/frame

So the crash needs the resident/in-place memory and live ray tracing together, at least on an 8 GB card. It may be memory: the title's own null write often follows a failed allocation, and 8 GB with ROOM_PERCENT=82 is tight. On this card, ray tracing alone is about 1 fps for now.

For reference, the same machine runs at ~188-220 ms/frame in steady play with the BVH off, using #917's VICTORY_AMBIENT=0.6 as a stand-in for the bounce light.

(AI-assisted, Claude Code. No game data.)

<!-- greyfinch-sync:fxceless/victory-fork:comment:7166602316 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/980#issuecomment-7166602316). Originally posted by [npanu420](https://github.com/npanu420) on 2026-11-25T15:17:19Z. --- Tested this branch as published (`pr-980` head) on an RTX 3070 8 GB + i9-9900X, Windows 11, Series S, with the switches from your description plus `BAKE_TEXTURES_MS=0`. **With both parts on** (`BVH_BUILDER=1 BVH_QUARANTINE=0 CARD_FETCH_INFLIGHT=1 TEXTURE_DROP_MIPS=1 TEXTURE_ROOM_PERCENT=82 INPLACE=4`): it crashes during loading, about 110 s in, 2 of 2 launches (cold and warm pipeline cache): `0xc0000005 at <title image>+0x23cf683 (write 0x0)`. **Each part alone does not crash:** | switches | result | |---|---| | ray tracing only (as above, without `INPLACE=4`) | no crash; **~914 ms/frame** median, preparing 658 ms, copy-back 268 ms, 0 dropped draws | | `INPLACE=4` without the builder | no crash; ~407 ms/frame | So the crash needs the resident/in-place memory and live ray tracing together, at least on an 8 GB card. It may be memory: the title's own null write often follows a failed allocation, and 8 GB with `ROOM_PERCENT=82` is tight. On this card, ray tracing alone is about 1 fps for now. For reference, the same machine runs at ~188-220 ms/frame in steady play with the BVH off, using #917's `VICTORY_AMBIENT=0.6` as a stand-in for the bounce light. (AI-assisted, Claude Code. No game data.)
Proudnoob4 commented 2026-11-25 17:08:01 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by Proudnoob4 on 2026-11-25T16:19:57Z.


Tested rt-772-vram-residents (8685f5b) on an RTX 4080 16 GB (Windows 10, i5-13600K, 32 GB RAM, driver 621.01, Series X profile; local Agility SDK opt-in only for Win10 loading).

1. Shader / BVH pipeline check (VICTORY_HOST_WAVE=32)

  • XboxBvhBuilder.dll: 52 / 52 compute pipelines translated and created.
  • shaders.rpf: 2,682 / 2,682 compute pipelines, 14,199 / 14,247 VS+PS, and 8,762 / 8,765 mesh pipelines created.

2. In-game runs (VICTORY_BVH_BUILDER=1 VICTORY_BVH_QUARANTINE=0 VICTORY_INPLACE=4 VICTORY_CARD_FETCH_INFLIGHT=1 VICTORY_TEXTURE_DROP_MIPS=1 VICTORY_TEXTURE_ROOM_PERCENT=82)

  • Cold -> Warm (rt980_x, 600 s; rt980_warm2, 400 s):
    • Stable: both runs completed their full duration with no device loss.
    • BVH builder active: the ray-tracing structure builder runs: all of its programs have host pipelines pipelines=53, dropped 0 without a host pipeline (0 being made).
    • Warm world performance (rt980_warm2): 2.00 fps / 490.2 ms median (4,874–4,951 draws/frame; preparing 367–406 ms with copies 212–230 ms / ~158 MB; VICTORY_CARD_TIME: title lists 167–170 ms, upload to residents 9.5–10.1 ms, merge 14.6–19.6 ms, from one submission's end to the next 276–331 ms).
    • Residents (VICTORY_INPLACE=4): 124 alive (747 MB / 9,168 MB budget), ~193–203 MB uploaded from arenas, ~480 MB compared in ~110 merge passes, ~31 MB merged back; 0.0 view mismatches. Note the default 1/4 RAM arena cap (8,127 MB on 32 GB) filled (8071 MB locked of 8127 MB, 16 arenas fell back to copies).
    • Visuals (frame-2150, frame-2300): prison cell, HUD prompt, hair, and yard inmates render cleanly, though the bottom-edge blocky artifact from f85101b is still present.

3. Failure mode when adding VICTORY_ASYNC_SUBMIT=1 VICTORY_QUEUE2=1 VICTORY_INPLACE_MB=16384

  • rt980_warm hit DXGI_ERROR_DEVICE_HUNG (0x887A0006) at 168 s right after registering two 4 MB VICTORY_INPLACE=4 residents (start=0xd86400000 and 0xd77000000), so INPLACE=4 + ASYNC_SUBMIT/QUEUE2 is not yet safe together.

Tested with AI assistance (Gemini 4 Hydrogen).

<!-- greyfinch-sync:fxceless/victory-fork:comment:7167794470 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/980#issuecomment-7167794470). Originally posted by [Proudnoob4](https://github.com/Proudnoob4) on 2026-11-25T16:19:57Z. --- Tested `rt-772-vram-residents` (`8685f5b`) on an RTX 4080 16 GB (Windows 10, i5-13600K, 32 GB RAM, driver 621.01, Series X profile; local Agility SDK opt-in only for Win10 loading). ### 1. Shader / BVH pipeline check (`VICTORY_HOST_WAVE=32`) - `XboxBvhBuilder.dll`: **52 / 52** compute pipelines translated and created. - `shaders.rpf`: **2,682 / 2,682** compute pipelines, **14,199 / 14,247** VS+PS, and **8,762 / 8,765** mesh pipelines created. ### 2. In-game runs (`VICTORY_BVH_BUILDER=1 VICTORY_BVH_QUARANTINE=0 VICTORY_INPLACE=4 VICTORY_CARD_FETCH_INFLIGHT=1 VICTORY_TEXTURE_DROP_MIPS=1 VICTORY_TEXTURE_ROOM_PERCENT=82`) - **Cold -> Warm (`rt980_x`, 600 s; `rt980_warm2`, 400 s):** - **Stable:** both runs completed their full duration with no device loss. - **BVH builder active:** `the ray-tracing structure builder runs: all of its programs have host pipelines pipelines=53`, `dropped 0 without a host pipeline (0 being made)`. - **Warm world performance (`rt980_warm2`):** **2.00 fps / 490.2 ms** median (4,874–4,951 draws/frame; `preparing` 367–406 ms with `copies` 212–230 ms / ~158 MB; `VICTORY_CARD_TIME`: `title lists` 167–170 ms, `upload to residents` 9.5–10.1 ms, `merge` 14.6–19.6 ms, `from one submission's end to the next` 276–331 ms). - **Residents (`VICTORY_INPLACE=4`):** 124 alive (747 MB / 9,168 MB budget), ~193–203 MB uploaded from arenas, ~480 MB compared in ~110 merge passes, ~31 MB merged back; `0.0` view mismatches. Note the default `1/4` RAM arena cap (`8,127 MB` on 32 GB) filled (`8071 MB locked of 8127 MB`, 16 arenas fell back to copies). - **Visuals (`frame-2150`, `frame-2300`):** prison cell, HUD prompt, hair, and yard inmates render cleanly, though the bottom-edge blocky artifact from `f85101b` is still present. ### 3. Failure mode when adding `VICTORY_ASYNC_SUBMIT=1 VICTORY_QUEUE2=1 VICTORY_INPLACE_MB=16384` - `rt980_warm` hit `DXGI_ERROR_DEVICE_HUNG` (`0x887A0006`) at 168 s right after registering two 4 MB `VICTORY_INPLACE=4` residents (`start=0xd86400000` and `0xd77000000`), so `INPLACE=4` + `ASYNC_SUBMIT`/`QUEUE2` is not yet safe together. *Tested with AI assistance (Gemini 4 Hydrogen).*
Zayfway commented 2026-11-25 17:08:02 +00:00 (Migrated from github.com)

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


Tested pr-980 head (9156270) on a 12 GB card with 16 GB of RAM, to separate VRAM from host memory in the crash @npanu420 saw. AI-assisted (Claude Code); every number below is from this machine.

Machine: RTX 3060 12 GB (driver 610.88, 32-lane), Ryzen 7 5700X, 16 GB RAM, system-managed pagefile (commit limit ~32 GB), Windows 11 26300, Series X profile, warm shader cache (translate --warm all: 25,707 translated, 278 do not).

1. The head does not build with diagnostics

cargo build --profile diag -p victory --features diagnostics fails:

error[E0599]: no variant ... named `WatchFailed` found for enum `C`   (copystat.rs:1283)
error[E0599]: no variant ... named `WatchKnownView` found for enum `C` (copystat.rs:1284)

The merge kept main's two reads of these counters but dropped their declarations, along with the add in watch::writes that fills them. Putting the two variants back after IndirectBounded in enum C (as on main 0b0074e) makes it build. The counters then read 0 until the watch.rs side comes back.

2. In the game (diag build, same scene: opening cutscene, measured from world +60 s)

ray tracing on (#814's set + LEVELS_ON_DEMAND=1) same build, builder off
builder runs ... pipelines=53 off
frame 1,797 ms median (0.57 fps); GPU 971 ms, preparing 574 ms (copies 448 ms) 1,042 ms median (1.05 fps)
host copies of title memory 6.6 GB 4.0 GB
VRAM, max 8.5 GB of 12 8.8 GB of 12
end world +146 s: no shared buffer error=0x8007000E size=4194304; 3 s later an access violation in nvwgf2umx.dll (read 0x36) under Host::submit → ExecuteCommandLists world +~5 min: the title stops on a breakpoint (0x80000003) with 1.3–1.8 GB of commit left

So on this machine the limit is host commit, not VRAM. The card kept 3+ GB free in both runs, and the first failure is a 4 MB shared (system-memory) buffer. That fits npanu420's "needs both parts together" on 8 GB: ray tracing adds ~2.6 GB of host copies, and the in-place/resident part adds its own. I did not prove that the failed buffer is what the driver tripped on. The callers handle None, so this is a correlation, not a traced cause.

For reference, on the same machine main at 0b0074e (ASYNC_SUBMIT QUEUE2 TEXTURE_NO_WAIT COPY_PLAIN LEVELS_ON_DEMAND) ran 6 world runs without a crash, at 2.1–2.3 fps and 22–25 GB private.

Not tested: VICTORY_INPLACE=4 together with the builder (it would only add host memory here), Series S, a larger pagefile. The two runs above do not reach the lit cell, so I cannot say anything about the picture with ray tracing on this card yet.

<!-- greyfinch-sync:fxceless/victory-fork:comment:7167978535 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/980#issuecomment-7167978535). Originally posted by [Zayfway](https://github.com/Zayfway) on 2026-11-25T16:26:15Z. --- Tested `pr-980` head (`9156270`) on a 12 GB card with **16 GB of RAM**, to separate VRAM from host memory in the crash @npanu420 saw. *AI-assisted (Claude Code); every number below is from this machine.* **Machine:** RTX 3060 12 GB (driver 610.88, 32-lane), Ryzen 7 5700X, **16 GB RAM**, system-managed pagefile (commit limit ~32 GB), Windows 11 26300, Series X profile, warm shader cache (`translate --warm all`: 25,707 translated, 278 do not). ### 1. The head does not build with diagnostics `cargo build --profile diag -p victory --features diagnostics` fails: ``` error[E0599]: no variant ... named `WatchFailed` found for enum `C` (copystat.rs:1283) error[E0599]: no variant ... named `WatchKnownView` found for enum `C` (copystat.rs:1284) ``` The merge kept main's two reads of these counters but dropped their declarations, along with the `add` in `watch::writes` that fills them. Putting the two variants back after `IndirectBounded` in `enum C` (as on main `0b0074e`) makes it build. The counters then read 0 until the `watch.rs` side comes back. ### 2. In the game (diag build, same scene: opening cutscene, measured from world +60 s) | | ray tracing on (#814's set + `LEVELS_ON_DEMAND=1`) | same build, builder off | |---|---|---| | builder | `runs ... pipelines=53` | off | | frame | **1,797 ms** median (0.57 fps); GPU 971 ms, preparing 574 ms (copies 448 ms) | 1,042 ms median (1.05 fps) | | host copies of title memory | **6.6 GB** | 4.0 GB | | VRAM, max | 8.5 GB of 12 | 8.8 GB of 12 | | end | world +146 s: `no shared buffer error=0x8007000E size=4194304`; 3 s later an access violation in `nvwgf2umx.dll` (read 0x36) under `Host::submit` → `ExecuteCommandLists` | world +~5 min: the title stops on a breakpoint (0x80000003) with 1.3–1.8 GB of commit left | So on this machine **the limit is host commit, not VRAM**. The card kept 3+ GB free in both runs, and the first failure is a 4 MB shared (system-memory) buffer. That fits npanu420's "needs both parts together" on 8 GB: ray tracing adds ~2.6 GB of host copies, and the in-place/resident part adds its own. I did not prove that the failed buffer is what the driver tripped on. The callers handle `None`, so this is a correlation, not a traced cause. For reference, on the same machine `main` at `0b0074e` (`ASYNC_SUBMIT QUEUE2 TEXTURE_NO_WAIT COPY_PLAIN LEVELS_ON_DEMAND`) ran 6 world runs without a crash, at 2.1–2.3 fps and 22–25 GB private. Not tested: `VICTORY_INPLACE=4` together with the builder (it would only add host memory here), Series S, a larger pagefile. The two runs above do not reach the lit cell, so I cannot say anything about the picture with ray tracing on this card yet.
Zayfway commented 2026-11-25 17:08:03 +00:00 (Migrated from github.com)

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


Follow-up, a correction of my comment above: host commit was a symptom, not the cause.

I raised the pagefile to 32 GB (commit limit ~32 → 48 GB, same 16 GB of RAM) and reran the same pr-980 build with the same ray-tracing switches.

  • The builder starts again (pipelines=53), and 0 draws are dropped.
  • The run ends earlier, at world +~95 s, with 9.6 GB of commit still free: a host command list did not close (0x8007000E).
  • Just before that:
    • title memory by address: shaders touched pages that had no copy ... pages=1609 first=0x10000;
    • loose window budget reached (VICTORY_MEMORY_MB) mb=1536.
  • Frame while it ran: 1,498 ms median (0.66 fps); GPU 660 ms, preparing 703 ms, copy-back 344 ms.

So the traversal reads memory from near-null pointers (0x10000 up), and the copies made for those reads are what fill memory, here as in the earlier run. That matches what #994 describes: dispatches by thread counts that over-run, and the builder then reading pointers out of garbage. #980 converts USE_THREAD_DIMENSIONS counts to groups (draw.rs), but its "without thread-count masking" warning never fired here. I could not confirm the link from the logs, so it is a consistent reading, not a traced cause.

Same machine as above (RTX 3060 12 GB, Ryzen 7 5700X, 16 GB RAM, Windows 11 26300, Series X, diag build with the copystat fix). AI-assisted (Claude Code).

<!-- greyfinch-sync:fxceless/victory-fork:comment:7168591643 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/980#issuecomment-7168591643). Originally posted by [Zayfway](https://github.com/Zayfway) on 2026-11-25T16:49:39Z. --- **Follow-up, a correction of my comment above:** host commit was a symptom, not the cause. I raised the pagefile to 32 GB (commit limit ~32 → 48 GB, same 16 GB of RAM) and reran the same `pr-980` build with the same ray-tracing switches. - The builder starts again (`pipelines=53`), and 0 draws are dropped. - The run ends **earlier**, at world +~95 s, with **9.6 GB of commit still free**: `a host command list did not close (0x8007000E)`. - Just before that: - `title memory by address: shaders touched pages that had no copy ... pages=1609 first=0x10000`; - `loose window budget reached (VICTORY_MEMORY_MB) mb=1536`. - Frame while it ran: 1,498 ms median (0.66 fps); GPU 660 ms, preparing 703 ms, copy-back 344 ms. So the traversal reads memory from near-null pointers (0x10000 up), and the copies made for those reads are what fill memory, here as in the earlier run. That matches what #994 describes: dispatches by thread counts that over-run, and the builder then reading pointers out of garbage. #980 converts `USE_THREAD_DIMENSIONS` counts to groups (`draw.rs`), but its "without thread-count masking" warning never fired here. I could not confirm the link from the logs, so it is a consistent reading, not a traced cause. Same machine as above (RTX 3060 12 GB, Ryzen 7 5700X, 16 GB RAM, Windows 11 26300, Series X, diag build with the `copystat` fix). *AI-assisted (Claude Code).*
loftymocha commented 2026-11-26 05:05:54 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by loftymocha on 2026-11-26T04:59:03Z.


RTX 5070 12 GB (32-lane), pr-980 head 9156270: live ray tracing runs fully and holds 5 minutes on both profiles, but the cell's light is wrong: dark on Series X, washed out on Series S. This is a 12 GB card with 32 GB of RAM, between the 8 GB and 16 GB reports above. Thanks to gangg111, sirrus98 and staronthehorizon for the branch, and to Zayfway for the build fix.

Setup: RTX 5070 12 GB (driver 32.0.16.1742), Ryzen 7 7800X3D, 32 GB DDR5 + 64 GB page file, Windows 11 Pro 26300. Diag build of the head as published, plus Zayfway's two copystat.rs variants (WatchFailed, WatchKnownView) so --features diagnostics builds; nothing else changed. Your switches: VICTORY_BVH_BUILDER=1 VICTORY_BVH_QUARANTINE=0 VICTORY_CARD_FETCH_INFLIGHT=1 VICTORY_TEXTURE_DROP_MIPS=1 VICTORY_TEXTURE_ROOM_PERCENT=82 VICTORY_INPLACE=4, plus VICTORY_SHADER_LOOP_LIMIT=256. No ASYNC_SUBMIT/QUEUE2 (after Proudnoob4's device hang). Its own cache, empty before the first run. One launch per profile, from the prologue checkpoint, played by hand, stopped by my runner 300 s after builder runs. Counts and descriptions only.

--console series-x --console series-s
builder runs ... pipelines=53 at +79 s pipelines=53 at +64 s
end held 306 s; 0 exceptions, no device loss held 304 s; the same
programs refused / untranslated 0 0
draws dropped 0 without a host pipeline, 0 indirect the same
frame (status lines, late) 910-1010 ms (~1.0 fps), up to 5,351 draws 252-290 ms (3.4-4.0 fps), ~4,500 draws
on the GPU / VICTORY_CARD_TIME title lists 726-821 ms / 836 ms 46-84 ms / 216 ms
preparing (copies) ~168 ms (175 ms, 260-307 MB) ~182 ms (170 ms, 168 MB)
residents, card copies 80 buffers + 13 windows; 727 MB card copies 104 + 68; 419 MB
lowest free RAM 0.6 GB 3.2 GB
the cell dark, as with the builder off washed out: the view through the window (fence, yard, a silhouette) is visible, but the rest of the frame is a bright, blurred orange-white haze with no detail
  • Light: neither profile gives the lit cell you got on the 3080. Series S matches your frame times (238-292 ms) but not your picture. With every program created and no draw dropped, I'd guess the traced lighting's values are off on this card (near zero on X, far too high on S, then pushed by the exposure), not that a pass is missing. That's a reading from two runs, not a traced cause.
  • Series X: the card itself is the limit, ~10x the GPU time of Series S at similar draw counts. That's more than the resolution difference alone would explain.
  • Loading on Series X flickered between a picture and none (at ~1 fps, ~1,800 draws). There was no flicker once in the cell.
  • Memory: both runs logged shaders touched pages that had no copy 50 times. Unlike Zayfway's 3060, the first addresses are ordinary (first=0x705fd0000 on X, 0x50c460000 on S), not near-null. Series X also hit loose window budget reached (VICTORY_MEMORY_MB) mb=1538 once. Neither ran out of memory.
  • The driver watch tripped about 5 s in on both launches on the Auto HDR notice (#1077; this branch predates #1255). That's harmless here, since no INDIRECT_WINDOW.

Not tested: VICTORY_INPLACE=4 off; more than one launch per profile; #905 alone.

AI-assisted (Claude Code)

<!-- greyfinch-sync:fxceless/victory-fork:comment:7183074313 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/980#issuecomment-7183074313). Originally posted by [loftymocha](https://github.com/loftymocha) on 2026-11-26T04:59:03Z. --- **RTX 5070 12 GB (32-lane), `pr-980` head `9156270`: live ray tracing runs fully and holds 5 minutes on both profiles, but the cell's light is wrong: dark on Series X, washed out on Series S.** This is a 12 GB card with 32 GB of RAM, between the 8 GB and 16 GB reports above. Thanks to gangg111, sirrus98 and staronthehorizon for the branch, and to Zayfway for the build fix. **Setup:** RTX 5070 12 GB (driver 32.0.16.1742), Ryzen 7 7800X3D, 32 GB DDR5 + 64 GB page file, Windows 11 Pro 26300. Diag build of the head as published, plus Zayfway's two `copystat.rs` variants (`WatchFailed`, `WatchKnownView`) so `--features diagnostics` builds; nothing else changed. Your switches: `VICTORY_BVH_BUILDER=1 VICTORY_BVH_QUARANTINE=0 VICTORY_CARD_FETCH_INFLIGHT=1 VICTORY_TEXTURE_DROP_MIPS=1 VICTORY_TEXTURE_ROOM_PERCENT=82 VICTORY_INPLACE=4`, plus `VICTORY_SHADER_LOOP_LIMIT=256`. No `ASYNC_SUBMIT`/`QUEUE2` (after Proudnoob4's device hang). Its own cache, empty before the first run. One launch per profile, from the prologue checkpoint, played by hand, stopped by my runner 300 s after `builder runs`. Counts and descriptions only. | | `--console series-x` | `--console series-s` | |---|---|---| | builder | `runs ... pipelines=53` at +79 s | `pipelines=53` at +64 s | | end | held 306 s; 0 exceptions, no device loss | held 304 s; the same | | programs refused / untranslated | 0 | 0 | | draws dropped | 0 without a host pipeline, 0 indirect | the same | | frame (status lines, late) | **910-1010 ms** (~1.0 fps), up to 5,351 draws | **252-290 ms** (3.4-4.0 fps), ~4,500 draws | | on the GPU / `VICTORY_CARD_TIME` title lists | 726-821 ms / 836 ms | 46-84 ms / 216 ms | | preparing (copies) | ~168 ms (175 ms, 260-307 MB) | ~182 ms (170 ms, 168 MB) | | residents, card copies | 80 buffers + 13 windows; 727 MB card copies | 104 + 68; 419 MB | | lowest free RAM | 0.6 GB | 3.2 GB | | **the cell** | **dark**, as with the builder off | **washed out**: the view through the window (fence, yard, a silhouette) is visible, but the rest of the frame is a bright, blurred orange-white haze with no detail | - **Light:** neither profile gives the lit cell you got on the 3080. Series S matches your frame times (238-292 ms) but not your picture. With every program created and no draw dropped, I'd guess the traced lighting's *values* are off on this card (near zero on X, far too high on S, then pushed by the exposure), not that a pass is missing. That's a reading from two runs, not a traced cause. - **Series X:** the card itself is the limit, ~10x the GPU time of Series S at similar draw counts. That's more than the resolution difference alone would explain. - **Loading** on Series X flickered between a picture and none (at ~1 fps, ~1,800 draws). There was no flicker once in the cell. - **Memory:** both runs logged `shaders touched pages that had no copy` 50 times. Unlike Zayfway's 3060, the first addresses are ordinary (`first=0x705fd0000` on X, `0x50c460000` on S), not near-null. Series X also hit `loose window budget reached (VICTORY_MEMORY_MB) mb=1538` once. Neither ran out of memory. - The driver watch tripped about 5 s in on both launches on the Auto HDR notice (#1077; this branch predates #1255). That's harmless here, since no `INDIRECT_WINDOW`. **Not tested:** `VICTORY_INPLACE=4` off; more than one launch per profile; #905 alone. AI-assisted (Claude Code)
loftymocha commented 2026-11-26 06:07:02 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by loftymocha on 2026-11-26T05:09:45Z.


Follow-up to my RTX 5070 report above: without VICTORY_INPLACE=4, the same build on Series S shows the cell lit by the traced light. So on this card the washed-out picture comes from the in-place/resident part (#772), not from #814's ray tracing.

The same build (9156270 + the two copystat.rs variants), the same cache, save and Series S profile as the washed-out run. The only change is that VICTORY_INPLACE=4 is left out. Switches: VICTORY_BVH_BUILDER=1 VICTORY_BVH_QUARANTINE=0 VICTORY_CARD_FETCH_INFLIGHT=1 VICTORY_TEXTURE_DROP_MIPS=1 VICTORY_TEXTURE_ROOM_PERCENT=82 VICTORY_SHADER_LOOP_LIMIT=256, --console series-s. One launch, stopped 300 s after builder runs. Counts and descriptions only.

Series S VICTORY_INPLACE=4 (run above) without it
builder pipelines=53 at +64 s pipelines=53 at +73 s
end held 304 s, 0 exceptions held 304 s, 0 exceptions
refused / untranslated / draws dropped 0 / 0 / 0 0 / 0 / 0
frame (late status lines) 252-290 ms (3.4-4.0 fps), ~4,500 draws 451-464 ms (2.2 fps, steady), ~5,170 draws
on the GPU 46-84 ms 144-164 ms
preparing: copies ~170 ms, 168 MB ~274 ms, 269-277 MB
lowest free RAM 3.2 GB 1.5 GB
the cell washed out: a bright orange-white haze, only the window view readable lit: sun through the windows lands as patches on the walls and floor, rim light on hair, contact shadows under the table and stools, the ceiling lamps light the room
  • The in-place part does save the third of the copying it claims (~274 → ~170 ms, ~270 → 168 MB). But on this card it also takes about two thirds of the card's time per frame away (144-164 → 46-84 ms). With the picture washed out at the same time, that looks like part of the lighting work being skipped or fed the wrong memory, not like a speed-up. That's a reading of two runs, not a traced cause.
  • What's still wrong in the lit run, by eye: blocky, stair-stepped edges on the sunlit patches (cells of roughly 8-16 px); grain on hair and walls; white sparkles on the floor; one bluish noisy patch at the lower left; glowing outlines on window frames. It looks like the denoise or upscale step getting noisy or mismatched input, but I haven't checked that.
  • The same 50 shaders touched pages that had no copy warnings as before, at ordinary addresses (first=0x50c510000), and loose window budget reached ... mb=1536 once.
  • Series X without VICTORY_INPLACE=4: not run yet, so I can't say whether the dark Series X cell above has the same cause.

AI-assisted (Claude Code)

<!-- greyfinch-sync:fxceless/victory-fork:comment:7183235905 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/980#issuecomment-7183235905). Originally posted by [loftymocha](https://github.com/loftymocha) on 2026-11-26T05:09:45Z. --- **Follow-up to my RTX 5070 report above: without `VICTORY_INPLACE=4`, the same build on Series S shows the cell lit by the traced light. So on this card the washed-out picture comes from the in-place/resident part (#772), not from #814's ray tracing.** The same build (`9156270` + the two `copystat.rs` variants), the same cache, save and Series S profile as the washed-out run. The only change is that `VICTORY_INPLACE=4` is left out. Switches: `VICTORY_BVH_BUILDER=1 VICTORY_BVH_QUARANTINE=0 VICTORY_CARD_FETCH_INFLIGHT=1 VICTORY_TEXTURE_DROP_MIPS=1 VICTORY_TEXTURE_ROOM_PERCENT=82 VICTORY_SHADER_LOOP_LIMIT=256`, `--console series-s`. One launch, stopped 300 s after `builder runs`. Counts and descriptions only. | Series S | `VICTORY_INPLACE=4` (run above) | without it | |---|---|---| | builder | `pipelines=53` at +64 s | `pipelines=53` at +73 s | | end | held 304 s, 0 exceptions | held 304 s, 0 exceptions | | refused / untranslated / draws dropped | 0 / 0 / 0 | 0 / 0 / 0 | | frame (late status lines) | 252-290 ms (3.4-4.0 fps), ~4,500 draws | **451-464 ms (2.2 fps, steady)**, ~5,170 draws | | on the GPU | 46-84 ms | **144-164 ms** | | preparing: copies | ~170 ms, 168 MB | ~274 ms, 269-277 MB | | lowest free RAM | 3.2 GB | 1.5 GB | | **the cell** | washed out: a bright orange-white haze, only the window view readable | **lit**: sun through the windows lands as patches on the walls and floor, rim light on hair, contact shadows under the table and stools, the ceiling lamps light the room | - **The in-place part does save the third of the copying it claims** (~274 → ~170 ms, ~270 → 168 MB). But on this card it also takes about two thirds of the card's time per frame away (144-164 → 46-84 ms). With the picture washed out at the same time, that looks like part of the lighting work being skipped or fed the wrong memory, not like a speed-up. That's a reading of two runs, not a traced cause. - **What's still wrong in the lit run, by eye:** blocky, stair-stepped edges on the sunlit patches (cells of roughly 8-16 px); grain on hair and walls; white sparkles on the floor; one bluish noisy patch at the lower left; glowing outlines on window frames. It looks like the denoise or upscale step getting noisy or mismatched input, but I haven't checked that. - The same 50 `shaders touched pages that had no copy` warnings as before, at ordinary addresses (`first=0x50c510000`), and `loose window budget reached ... mb=1536` once. - Series X without `VICTORY_INPLACE=4`: not run yet, so I can't say whether the dark Series X cell above has the same cause. AI-assisted (Claude Code)
loftymocha commented 2026-11-26 06:07:03 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by loftymocha on 2026-11-26T05:19:48Z.


Last one from me on this card: Series X without VICTORY_INPLACE=4 is not dark either, so on the RTX 5070 the in-place part causes both bad pictures, dark on X and washed out on S. Without it, Series X shows the traced light but with many more artifacts than Series S.

Same build, cache and save as my two comments above, --console series-x, the same switches without VICTORY_INPLACE=4. One launch, stopped 300 s after builder runs (+61 s). Counts and descriptions only.

All four launches on this card side by side. Each held 300 s with the builder running, with 0 exceptions, 0 device losses, 0 programs refused or untranslated, and 0 draws dropped:

pr-980 on RTX 5070 VICTORY_INPLACE=4 without it
Series X dark; 910-1010 ms (GPU 726-821 ms); lowest free RAM 0.6 GB lit, heavy artifacts; 890-899 ms at ~7,000 draws (GPU 558-579 ms, copies 323-359 ms / ~335 MB, copy-back ~275 ms); lowest free RAM 0.5 GB
Series S washed out; 252-290 ms (GPU 46-84 ms); 3.2 GB lit, mild artifacts; 451-464 ms (GPU 144-164 ms, copies ~274 ms); 1.5 GB

Series X without in-place, by eye:

  • Lit: sun on faces and hair, rim light, the ceiling lamps, the yard through the window.
  • Glowing white and cyan blobs over the floor, bunks and walls, often with pure-black specks inside them. To me that looks like invalid values (NaN/inf) coming out of the lighting and being spread by bloom or denoising, but I haven't checked any buffer.
  • The yard seen through the window is smeared and ghosted, and there are blocky patches at the right of the frame.
  • Series S without in-place shows the same kinds of fault (blocky sunlit edges, grain, sparkles), but far milder.

So on this card I'd separate two things: VICTORY_INPLACE=4 leaving the traced light wrong (dark or blown out), and, without it, noise or invalid values in the lighting that Series X makes much worse. The shaders touched pages that had no copy warnings (50 per run, ordinary addresses, first=0x11a530000 here) and one loose window budget reached ... mb=1536 appear in every run, lit or not.

Not tested: more than one launch per cell; VICTORY_CARD_FETCH_INFLIGHT=0; another driver.

AI-assisted (Claude Code)

<!-- greyfinch-sync:fxceless/victory-fork:comment:7183388821 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/980#issuecomment-7183388821). Originally posted by [loftymocha](https://github.com/loftymocha) on 2026-11-26T05:19:48Z. --- **Last one from me on this card: Series X without `VICTORY_INPLACE=4` is not dark either, so on the RTX 5070 the in-place part causes both bad pictures, dark on X and washed out on S. Without it, Series X shows the traced light but with many more artifacts than Series S.** Same build, cache and save as my two comments above, `--console series-x`, the same switches without `VICTORY_INPLACE=4`. One launch, stopped 300 s after `builder runs` (+61 s). Counts and descriptions only. All four launches on this card side by side. Each held 300 s with the builder running, with 0 exceptions, 0 device losses, 0 programs refused or untranslated, and 0 draws dropped: | `pr-980` on RTX 5070 | `VICTORY_INPLACE=4` | without it | |---|---|---| | **Series X** | dark; 910-1010 ms (GPU 726-821 ms); lowest free RAM 0.6 GB | **lit, heavy artifacts**; 890-899 ms at ~7,000 draws (GPU 558-579 ms, copies 323-359 ms / ~335 MB, copy-back ~275 ms); lowest free RAM 0.5 GB | | **Series S** | washed out; 252-290 ms (GPU 46-84 ms); 3.2 GB | **lit, mild artifacts**; 451-464 ms (GPU 144-164 ms, copies ~274 ms); 1.5 GB | **Series X without in-place, by eye:** - Lit: sun on faces and hair, rim light, the ceiling lamps, the yard through the window. - Glowing white and cyan blobs over the floor, bunks and walls, often with **pure-black specks inside them**. To me that looks like invalid values (NaN/inf) coming out of the lighting and being spread by bloom or denoising, but I haven't checked any buffer. - The yard seen through the window is smeared and ghosted, and there are blocky patches at the right of the frame. - Series S without in-place shows the same kinds of fault (blocky sunlit edges, grain, sparkles), but far milder. So on this card I'd separate two things: `VICTORY_INPLACE=4` leaving the traced light wrong (dark or blown out), and, without it, noise or invalid values in the lighting that Series X makes much worse. The `shaders touched pages that had no copy` warnings (50 per run, ordinary addresses, `first=0x11a530000` here) and one `loose window budget reached ... mb=1536` appear in every run, lit or not. **Not tested:** more than one launch per cell; `VICTORY_CARD_FETCH_INFLIGHT=0`; another driver. AI-assisted (Claude Code)
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/980:upstream-pr/980'
git switch 'upstream-pr/980'

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/980'
git switch 'upstream-pr/980'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/980'
git switch 'upstream-pr/980'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/980'
git switch 'main'
git merge --squash 'upstream-pr/980'
git switch 'main'
git merge --ff-only 'upstream-pr/980'
git switch 'main'
git merge 'upstream-pr/980'
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!978
No description provided.