Hardware ray tracing: top levels name only bottom structures already submitted (device lost with VICTORY_HW_RT=1) #4337
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/4337"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by harrisotiropoulos-jpg on 2026-11-30T19:02:59Z.
What it changes
With
VICTORY_HW_RT=1(#3706, off by default).as_mapis written as lists are recorded, up to a frame ahead of the submitting thread. A top level's remap table (fill_blas_table) is filled as its list is submitted, from the newest entries ofas_map. So a top level could name a bottom structure whose build was recorded but not yet submitted, and rays walked memory that held no structure yet.HwRtManager::shownholds, per console address, the bottom structure whose build or copy lies in lists submitted so far. The remap table is filled from it. Entries are published by a submission-time step of the list that builds or copies them (HostList::at_submit), so they follow submission order. Evicted and freed structures are taken out of it, and those replaced go throughretire.How it was tested
VICTORY_HW_RT_REFIT=0. This branch, the same code on main, was built and unit tested but not played by itself. No unit test covers the ordering.cargo test --release -p victory-gpu --lib: no. 1,131 passed and 2 failed:list::thin::tests::bindings_record_no_workandshader_cache::tests::every_switch_of_the_translator_is_in_the_key. Both fail on main (e1251c319) too.cargo checkpasses; clippy with-D warningsreports only lines already on main.Checked for overlap
hwrt.rs)🤖 Generated with Claude Code
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by KruIN689 on 2026-12-01T00:26:42Z.
Independent test of #4337 together with #4338 (
VICTORY_RT_BIG_ASIDE=40000). RTX 5080 16 GB (driver 621.40), Ryzen 9 9950X3D, 47 GB, Windows 11. Series X, native 1440p, DLSS and FG off,VICTORY_HW_RT=1.Method: both PRs merged onto our fork's main, which is upstream
84bd61e2plus a spread sweep, #3272, #3063/#3067 and #4233. Auto-driven roaming (walk and drive), 2+2 alternating runs of 6 min, stats over the last 4 min. Warm shader cache.(Measured and written with Claude Code, for KruIN689.)
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by paales on 2026-12-01T01:40:56Z.
Written by 🤖:
Test of this PR together with #4578, #4170 and #4144, cherry-picked onto a build of
mainfrom 30 Nov with texture PRs (#720, #4206, #4138, #4493, #4509). RTX 5070 Ti 16 GB, 12 cores, Windows 11. HDR full screen, 1440p, DLSS Performance, 30 fps cap, all pipelines preloaded.The first cutscene of a new game, 5 to 60 s after its first scene frame:
VICTORY_BVH_BUILDER=1VICTORY_HW_RT=1VICTORY_HW_RT=1: 4 of the cutscene and 2 of a save that ends on the boat (82 s each).BLAS prep).HwRtManagerfields and intitle_memory_freed. Both sides stay:shownbesideMeshletCache,mgr.hidebesidedrop(removed_as), andibs.forget(lo, hi)beside theclamped_ibsrange invalidation of #4144.Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by rvrvrvr221 on 2026-12-01T12:31:37Z.
Isolated A/B on an RTX 4090: this PR alone (
8717169a) against its parent, the v2026.11.30.03 release (e1251c31). The device is still lost with it.PC: Core i9-13900K, RTX 4090 24 GB (driver 621.40), 32 GB DDR5-6400, Windows 11 Pro (build 26300). Both built release from source, nothing else on top. Same settings for every run: Series X, native 2560x1440, DLSS Balanced (preset M),
-Fps 30 -FixedStep, frame generation off,VICTORY_HW_RT=1andVICTORY_BVH_BUILDER=1,-NoMenu. Runs alternated, same save, played until the device was lost or about 10 minutes of play.Every loss is
0x887A0005("The GPU device instance has been suspended"), asrelay: device lost before publishing queued GPU work(4 runs) orthe device was lost before fence value N was reached(run 5), withwhen the host device went: the submitting thread was preparing a submission (nothing of ours was running on the card). The card had 13.1 to 13.9 GB in use of a 23.4 GB budget at the last report before each loss.So on this card the PR does not prevent the loss: 3 of 3 runs with it, 2 of 3 without, at about the same times, with no frame rate difference. Six runs can't rule out a smaller effect, but the ordering this PR fixes doesn't look like the cause of the device loss here. This matches the comments in #4323 that
VICTORY_BVH_BUILDER=1alone also loses the device, which this ordering wouldn't touch.Water was black in every run of both builds, as reported in #4323.
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by trustno1-coder on 2026-12-01T18:42:28Z.
Closing this as part of moving main to the texture and video-memory rework (v2026.12.01.01-test). A lot of the code changed, and this pull request no longer applies cleanly to it; it would need to be rewritten against the new main rather than rebased. Thank you for the work. If the change is still needed, please open a new pull request based on the current main.
Pull request closed