Hardware ray tracing: top levels name only bottom structures already submitted (device lost with VICTORY_HW_RT=1) #4338
No reviewers
Labels
No labels
AMD
audio
bug
confirmed
crash
cutscene
dlss
documentation
duplicate
enhancement
fixed-on-main
frame-generation
good first issue
help wanted
input
INTEL
invalid
lighting
linux-proton
memory
needs-info
needs-logs
needs-rebase
NVIDIA
performance
pr-diagnostics
pr-docs
pr-feature
pr-fix
pr-performance
pr-refactor
pr-tests
question
RAYTRACING
rendering
report
series-s
shaders
spam
startup
upstream
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/trustno1-coder--VIctory-NVIDIA!4338
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-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?
@harrisotiropoulos-jpg on GitHub · 2026-11-30 19:02 UTC · original
harrisotiropoulos-jpg:fix/hwrt-tables-name-submitted→main· +1065 −852 · 33 files · 14 commits · closed without mergingWhat 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
@KruIN689 on GitHub · 2026-12-01 00:26 UTC · original
Independent test of #4338 together with #4339 (
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 #4234. 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.)
@paales on GitHub · 2026-12-01 01:40 UTC · original
Written by 🤖:
Test of this PR together with #4579, #4171 and #4144, cherry-picked onto a build of
mainfrom 30 Nov with texture PRs (#720, #4207, #4138, #4494, #4510). 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.@rvrvrvr221 on GitHub · 2026-12-01 12:31 UTC · original
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 #4324 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 #4324.
@trustno1-coder on GitHub · 2026-12-01 18:42 UTC · original
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