Ray tracing: hardware DXR 1.1 for the title's structures and traversal loops (35-46 ms against 43-94 ms for the software walk on an RTX 4090) #3704
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#3704
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
@dyshay on GitHub · 2026-11-30 04:22 UTC · original
The software path today
With
VICTORY_BVH_BUILDER=1(the F1 menu's RAY TRACING) the title's own structure builder runs as translated compute programs, and the trace programs walk the console's structures in title memory, with the node test (image_bvh64_intersect_ray,image_bvh_intersect_ray) emulated in DXIL (emit/intersect.rs). It is correct, but on an RTX 4090 it is slow and uneven:What a hardware path does
Ported from Leslie-d-a/VIctory-NVIDIA-HWRT, original work by dakisback2 (dakisback2/VIctory-Nvidia-Linux). It runs only on a card with DXR 1.1 (
D3D12_RAYTRACING_TIER_1_1):XboxBvhBuilder.dllis replaced by an HLE module (victory-hlexboxbvh.rs, its 12 exports by name only, no title bytes). Its calls become host DXR 1.1 bottom and top levels, keyed by the console structure's GPU address (victory-gpuhwrt.rs): refits of dynamic bottom levels, a scratch pool, an empty top level until the first is built, the instances' bottom-level addresses remapped on the card by a small compute pass, and eviction when the title frees the memory. The title's builder programs do not run.RayQuery(emit/rayquery.rs) where every value a loop leaves behind is accounted for. A loop it cannot account for keeps the software walk; a program whose lifted form is refused is translated again without lifting, whole. The host binds the structure as a root SRV (t230..t241).ray queries lifted N of M (bvh64 a/b, bvh32 c/d), fell back: <first reason>. Every five seconds:ray queries: lifted shaders N, partly N, fell back N (software); per frame ... dispatches, andhardware RT: BLAS live ..., TLAS live ..., AS memory ... MB.Measured (RTX 4090, Windows 11, diagnostics build, house scene, 300 s)
In each hardware run 13 ray-tracing programs were lifted whole and none fell back to software; 4,193 bottom levels were live; no device loss.
What should be tested on other cards
The proposed PR keeps it off by default (
VICTORY_HW_RT=1turns it on, in place ofVICTORY_BVH_BUILDER=1; with both set the hardware path is kept and the builder is turned off, with a warning). It has been run on one PC and one card. It would help to know:VICTORY_HW_RT=1againstVICTORY_BVH_BUILDER=1on the same scene, and whether the picture matches (indirect light in interiors, shadows, reflections).RayQueryavailable): whether the lifted programs make pipelines and run, and the same timings. The lifted programs have only been validated bydxil.dlland run on WARP and on NVIDIA.AS memory ... MBfigure in the five-second line) and whether a long run in a dense area runs out of card memory or evicts often.fell backother thannone, and the reason it gives (VICTORY_HW_RT_WHY=1logs more).VICTORY_BVH_BUILDER=1there).I have a branch ready with the port behind
VICTORY_HW_RTand will open the PR referencing this issue.@github-actions[bot] on GitHub · 2026-11-30 04:23 UTC · original
Please attach both logs from the run that went wrong. Without them we can only guess. Paste
%LOCALAPPDATA%into the address bar of File Explorer to get there.%LOCALAPPDATA%\victory\logs\: the newestvictory-nvidia-play-<date>-<time>-<number>.log(fromvictory.exe) orvictory-nvidia-<date>-<time>.log(from the script launcher). The window shows its path at the start, on the lineLog: ....%LOCALAPPDATA%\VIctory\data\7952987A\crashes.log, and, if there is one from that run, the newestvictory-<date>-<time>-<number>.crash.login%LOCALAPPDATA%\VIctory\data\7952987A\temp\.Also say which GPU, Windows version (10 or 11)