Ray tracing: compacted structure size is read back before the builder writes it (race), copies use a stale size #689
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?
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Machad3x on 2026-11-28T03:35:33Z.
Setup: Windows 11, RTX 3080 Ti 12 GB, Ryzen 7 5700X, 32 GB RAM, Series X profile, title ray tracing on (VICTORY_BVH_BUILDER=1), 240 s runs from the prison cell scene.
What happens
The title asks for a structure's compacted size through the batched build call's postbuild info. On the console that size is ready at the call. Here the emulated builder writes it later, on the card. The title then reads the old value and makes its compacted copy with a stale size.
Fix we run
The batched-build and prebuild calls are wrapped. Each compacted-size slot gets the builder's own maximum size (
ResultDataMaxSizeInBytes, remembered per input shape) before and after the real call. The builder's later store is kept off those slots input_changed.VICTORY_BVH_SIZE_ANSWER(on;=0turns it off).Result
Average of the last 120 s: 66.8 ms/frame against 75.2 before, and the card went from 19.4 to 6.1 ms. This was in one batch with three smaller changes. No draws dropped, picture unchanged. Commit e98abea5 on Machad3x/VIctory-nvidia branch
tn1-base.Known risk
An answered slot stays protected until the title asks for another kind of postbuild info there. If the title reuses that memory for other card-written data, those 8 bytes would keep the old value.
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by github-actions[bot] on 2026-11-28T03:35:42Z.
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)
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Machad3x on 2026-11-28T03:37:58Z.
GPU: RTX 3080 Ti 12 GB, driver 621.40. Windows 11 (build 26300). Built from source, diag profile. Not a crash: the session stays alive for the whole 240 s run, so there is no crashes.log for it. The full play logs contain local paths, so these are the relevant lines with paths removed. More lines on request.
These are from the run with the fix on. The line
sizes not answerednever shows up.Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by tharun-37 on 2026-11-28T04:06:51Z.
claiming: #689 — I’ll fix the structure-builder compacted-size answer with a focused switch and tests, then open a PR.
AI-assisted (OpenCode).
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by tharun-37 on 2026-11-28T04:19:43Z.
done: claim 7233705632 -> #718
AI-assisted (OpenCode).