Live ray tracing (#814) on current main, conflicts resolved; tested on an RTX 3080 #905

Open
github-bot wants to merge 5 commits from github-bot/gh-905 into main AGit
Owner

@⁠gangg111 on GitHub · 2026-11-25 12:22 UTC · original
gangg111:rt-814-on-main → main · +5736 −772 · 34 files · 5 commits · open

What

Pull request #814 by @⁠staronthehorizon (live ray tracing) brought onto current main (f85101b). #814 is based on 9376fd6 and conflicts with f85101b in indirect.rs, host.rs, draw.rs and the README. All credit for the ray-tracing work is theirs; this only resolves the merge and reports a run on another card.

How the conflicts were resolved

  • Indirect draw path: main's. indirect.rs is f85101b's as is (pull request #220 windows, off by default), and so are HostList::budget and HostList::indirect_scratch. #814's sub-allocated scratch buffer, its barrier skipping and its windows-on-by-default are left out: both sides rewrote the same code, and f85101b's README records device losses with windows on. VICTORY_INDIRECT_WINDOW stays opt-in.
  • Everything else of #814 is in: ray-tracing and wave32 translation, view addresses (SLOT_VIEW_ADDRESSES), USER_DISPATCH_THREADS, SLOT_MEMORY dirty pages and writeback, gpu_copy_from_shadow, lazy physical pages, VICTORY_TEXTURE_DROP_MIPS, the Series S overlay and upscaler.
  • The uav_dirty / clamp_ran fields stay; with main's clamp nothing clears uav_dirty, so gpu_copy_from_shadow keeps its UAV barrier every time (more barriers, never fewer). clamp_ran is unused now.
  • Removed: the HEAP_PASS_PARTS log line (#814 removed the counter), the scratch_offset window field. #814's synthetic_frame_cost bench adapted to main's bound().
  • README: main's text.

Testing

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

  • cargo build --release: clean (3 dead-code warnings).
  • cargo test --release: victory-shader 231 passed, victory-hle 101 passed, victory-gpu 180 passed. One test is flaky: indirect::tests::warp_budget_saturates_without_wraparound_and_preserves_draw_fields fails in about one run of two, and fails the same way on plain f85101b (checked in a separate tree), so it is not 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 (#814's recommended set):
    • the builder starts (all of its programs have host pipelines pipelines=53), the cell interior in the first scene is lit (walls, photos, bunk); without the builder it is black;
    • no device loss, no panic, 0 draws dropped for a missing host pipeline;
    • frame time: median 442 ms over 24 readings, 309 ms over the second half (293 ms last); #814 alone measured 318 to 350 ms in the same scene;
    • most of the frame is the processor-side copy of title memory (about 230 ms, 250 to 300 MB a frame); the card is about 30 to 55 ms.
  • VICTORY_ASYNC_SUBMIT=1 VICTORY_QUEUE2=1 on top: no gain here (319 ms second-half median), no device loss.

Known

  • Without --console series-s (Series X default) the process ends about 5 s after the builder starts: memory allocation of 4194304 bytes failed, on a machine with 32 GB RAM and about 15 GB of commit free.
  • The lit image is grainy and the bright yard behind the window is blurred, as in #814.

🤖 Generated with Claude Code

**@⁠gangg111** on GitHub · 2026-11-25 12:22 UTC · [original](https://github.com/fxceless/victory-fork/pull/905) `gangg111:rt-814-on-main` → `main` · +5736 −772 · 34 files · 5 commits · open ## What Pull request #814 by @⁠staronthehorizon (live ray tracing) brought onto current `main` (f85101b). #814 is based on 9376fd6 and conflicts with f85101b in `indirect.rs`, `host.rs`, `draw.rs` and the README. All credit for the ray-tracing work is theirs; this only resolves the merge and reports a run on another card. ## How the conflicts were resolved - **Indirect draw path: main's.** `indirect.rs` is f85101b's as is (pull request #220 windows, off by default), and so are `HostList::budget` and `HostList::indirect_scratch`. #814's sub-allocated scratch buffer, its barrier skipping and its windows-on-by-default are left out: both sides rewrote the same code, and f85101b's README records device losses with windows on. `VICTORY_INDIRECT_WINDOW` stays opt-in. - **Everything else of #814 is in:** ray-tracing and wave32 translation, view addresses (`SLOT_VIEW_ADDRESSES`), `USER_DISPATCH_THREADS`, `SLOT_MEMORY` dirty pages and writeback, `gpu_copy_from_shadow`, lazy physical pages, `VICTORY_TEXTURE_DROP_MIPS`, the Series S overlay and upscaler. - The `uav_dirty` / `clamp_ran` fields stay; with main's clamp nothing clears `uav_dirty`, so `gpu_copy_from_shadow` keeps its UAV barrier every time (more barriers, never fewer). `clamp_ran` is unused now. - Removed: the `HEAP_PASS_PARTS` log line (#814 removed the counter), the `scratch_offset` window field. #814's `synthetic_frame_cost` bench adapted to main's `bound()`. - README: main's text. ## Testing Hardware: RTX 3080 10 GB, driver 621.01, no Resizable BAR, i9-12900K, 32 GB RAM, Windows 11. - `cargo build --release`: clean (3 dead-code warnings). - `cargo test --release`: `victory-shader` 231 passed, `victory-hle` 101 passed, `victory-gpu` 180 passed. One test is flaky: `indirect::tests::warp_budget_saturates_without_wraparound_and_preserves_draw_fields` fails in about one run of two, and fails the same way on plain f85101b (checked in a separate tree), so it is not 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` (#814's recommended set): - the builder starts (`all of its programs have host pipelines pipelines=53`), the cell interior in the first scene is lit (walls, photos, bunk); without the builder it is black; - no device loss, no panic, 0 draws dropped for a missing host pipeline; - frame time: median 442 ms over 24 readings, 309 ms over the second half (293 ms last); #814 alone measured 318 to 350 ms in the same scene; - most of the frame is the processor-side copy of title memory (about 230 ms, 250 to 300 MB a frame); the card is about 30 to 55 ms. - `VICTORY_ASYNC_SUBMIT=1 VICTORY_QUEUE2=1` on top: no gain here (319 ms second-half median), no device loss. ## Known - Without `--console series-s` (Series X default) the process ends about 5 s after the builder starts: `memory allocation of 4194304 bytes failed`, on a machine with 32 GB RAM and about 15 GB of commit free. - The lit image is grainy and the bright yard behind the window is blurred, as in #814. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Gemini 4 Neon <[email protected]>
Co-Authored-By: Gemini 4 Neon <[email protected]>
Co-Authored-By: Gemini 4 Neon <[email protected]>
Co-Authored-By: Gemini 4 Neon <[email protected]>
Conflicts resolved toward main for the indirect draw path: indirect.rs is
main's (pull request #220 windows, off by default), and HostList::budget /
indirect_scratch are main's, so #814's sub-allocated scratch and barrier
skipping are not in. Everything else of #814 is: ray-tracing and wave32
translation, view addresses, SLOT_MEMORY dirty pages, gpu_copy_from_shadow,
lazy physical pages, texture drop-mips, Series S overlay.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 03:53:34 +00:00
Author
Owner

@⁠Filip722 on GitHub · 2026-11-25 12:49 UTC · original

I tested the merge at 8fa4f092 on Bazzite 44, Intel Core 7 240H with 16 GB RAM, and RTX 5060 Laptop 8 GB (NVIDIA 615.78.08). The private Windows MSVC build carried Wine file-backed pages, runtime DXC fallback, and #885’s empty pipeline-library call. Runtime was GE-Proton 11-14 with vkd3d-proton build cae8353ed7959c4+.

Both Series S runs started with the same frozen prefix/cache seed, executable and resource guards. The only switch between them was VICTORY_BVH_BUILDER. Common settings included quarantine off, card fetch in flight, one dropped mip, levels on demand off, 50% texture room, and a global diagnostic loop limit of 32.

  • Builder on reached the black transition and the first binds for 120 pipelines at frame 7224. The host RAM guard stopped it around 370 s, with 5.51 GiB host memory available and 3.18 GiB VRAM free in the last sample.
  • Builder off reached the black transition and the first binds for 166 pipelines at frame 4433. The same guard stopped it around 271 s, with 5.84 GiB host memory available and 3.30 GiB VRAM free. The different compile and streaming progress makes the elapsed times unsuitable for a performance comparison.
  • Neither run logged a builder start or a FidelityFX stretch before the guard stopped it. Both showed a late increase in scoped kernel charge, with no recorded NVIDIA Xid.
  • All 12 focused tests passed on the RTX 5060, including the two stretch/overlay pixel readbacks, DXC fallback with an accepted D3D12 pipeline, native library fallback, and six ray-intersection tests.

This verifies the focused fixtures under Proton. The lit-world result is still unverified on this laptop. Testing and the report were assisted by OpenAI Codex.

**@⁠Filip722** on GitHub · 2026-11-25 12:49 UTC · [original](https://github.com/fxceless/victory-fork/pull/905#issuecomment-7162900042) I tested the merge at `8fa4f092` on Bazzite 44, Intel Core 7 240H with 16 GB RAM, and RTX 5060 Laptop 8 GB (NVIDIA 615.78.08). The private Windows MSVC build carried Wine file-backed pages, runtime DXC fallback, and #885’s empty pipeline-library call. Runtime was GE-Proton 11-14 with vkd3d-proton build `cae8353ed7959c4+`. Both Series S runs started with the same frozen prefix/cache seed, executable and resource guards. The only switch between them was `VICTORY_BVH_BUILDER`. Common settings included quarantine off, card fetch in flight, one dropped mip, levels on demand off, 50% texture room, and a global diagnostic loop limit of 32. - Builder on reached the black transition and the first binds for 120 pipelines at frame 7224. The host RAM guard stopped it around 370 s, with 5.51 GiB host memory available and 3.18 GiB VRAM free in the last sample. - Builder off reached the black transition and the first binds for 166 pipelines at frame 4433. The same guard stopped it around 271 s, with 5.84 GiB host memory available and 3.30 GiB VRAM free. The different compile and streaming progress makes the elapsed times unsuitable for a performance comparison. - Neither run logged a builder start or a FidelityFX stretch before the guard stopped it. Both showed a late increase in scoped kernel charge, with no recorded NVIDIA Xid. - All 12 focused tests passed on the RTX 5060, including the two stretch/overlay pixel readbacks, DXC fallback with an accepted D3D12 pipeline, native library fallback, and six ray-intersection tests. This verifies the focused fixtures under Proton. The lit-world result is still unverified on this laptop. Testing and the report were assisted by OpenAI Codex.
Author
Owner

@⁠rafaconvaitis on GitHub · 2026-11-25 16:27 UTC · original

I compared the same prison checkpoint on an RTX 4070 12 GB (616.64) in Series S on Windows, using 8fa4f09, the builder enabled, and D3D12 debug plus DRED in both runs.

  • Reference run recorded 436 D3D12 ID 538 errors. The affected 1280×736 depth texture had both subresources in COPY_SOURCE at a CopyResource destination.
  • I applied only the existing full-resource self-copy guard from a25370661ed1343e2f2d5e79669ec8db4e60dc68. The guard fired in the prison room. The candidate recorded zero ID 538 errors, including 219.97 s after the first skipped copy.
  • The candidate remained active for 630.25 s after all 53 builder pipelines were ready. Camera and movement worked, and I walked to the companion table before closing the window normally.

Both runs used warm shader caches. The candidate started from a copy of the completed reference cache. This independently verifies the existing guard for the Series S depth-copy case on this head.

**@⁠rafaconvaitis** on GitHub · 2026-11-25 16:27 UTC · [original](https://github.com/fxceless/victory-fork/pull/905#issuecomment-7168021661) I compared the same prison checkpoint on an RTX 4070 12 GB (616.64) in Series S on Windows, using `8fa4f09`, the builder enabled, and D3D12 debug plus DRED in both runs. - Reference run recorded **436 D3D12 ID 538 errors**. The affected 1280×736 depth texture had both subresources in `COPY_SOURCE` at a `CopyResource` destination. - I applied only the existing full-resource self-copy guard from `a25370661ed1343e2f2d5e79669ec8db4e60dc68`. The guard fired in the prison room. The candidate recorded **zero ID 538 errors**, including 219.97 s after the first skipped copy. - The candidate remained active for 630.25 s after all 53 builder pipelines were ready. Camera and movement worked, and I walked to the companion table before closing the window normally. Both runs used warm shader caches. The candidate started from a copy of the completed reference cache. This independently verifies the existing guard for the Series S depth-copy case on this head.
This pull request has changes conflicting with the target branch.
  • crates/victory-gpu/src/copystat.rs
  • crates/victory-gpu/src/descriptor/host.rs
  • crates/victory-gpu/src/draw.rs
  • crates/victory-gpu/src/host.rs
  • crates/victory-gpu/src/inplace.rs
  • crates/victory-gpu/src/pipeline/host.rs
  • crates/victory-gpu/src/shadow.rs
  • crates/victory-gpu/src/texture.rs
  • crates/victory-gpu/src/watch.rs
  • crates/victory-hle/src/modules/xmem.rs
  • crates/victory-shader/src/emit/lower.rs
  • crates/victory-shader/src/emit/mod.rs
  • crates/victory-shader/src/emit/shader.rs
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/905/head:github-bot/gh-905'
git switch 'github-bot/gh-905'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-905'
git switch 'github-bot/gh-905'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-905'
git switch 'github-bot/gh-905'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-905'
git switch 'main'
git merge --squash 'github-bot/gh-905'
git switch 'main'
git merge --ff-only 'github-bot/gh-905'
git switch 'main'
git merge 'github-bot/gh-905'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.