gpu(native): the ray-tracing structure builder's pipelines are put off past the frame's budget and its dispatches dropped #492
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 LakshanSivakumar/Native-Victory-macOS. Originally posted by Tarraga on 2026-11-27T22:09:58Z.
What went wrong
XboxBvhBuilder.dll, a title DLL, builds and refits the ray-tracing structures in title memory with 52 compute programs embedded in its image. The native host treats its pipelines like any other: once a frame has spent its budget for new pipelines (glue::pipe,glue::thread_pipe), a pipeline whose shader is not translated yet is put off and its dispatches are dropped. The builder's stages depend on each other and many run only while a level streams in, so what a dropped dispatch should have built is not built again.Counts from one run to the world (M4 Pro, Series S, a cold cache): 28 of the 52 programs lost about 7,700 dispatches in 77 s of the world load, and the log has "a dispatch of thread counts without a host compute pipeline" there. The structures stay partly built for the run. VIctory-macOS found the same on Wine (its #481: on a fork, the garbage bounds of a partial build crashed the title).
Steps to reproduce
A unit test: with the frame's budget spent, an ordinary pipeline is put off, and so is a pipeline whose bytecode lies in the builder's image. The same for dispatches of thread counts.
Plan
Know the builder's pipelines by their bytecode in the DLL's image (the loader tells the GPU crate where each title DLL is mapped), make them at their first dispatch however long it takes, and if one cannot be made, drop every builder dispatch from then on, as #481 does. I will open the pull request with the test.
Mac, macOS version and commit
M4 Pro, 48 GB, macOS 27.0, main
b998bb65Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by Tarraga on 2026-11-27T22:10:05Z.
/claim
Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by github-actions[bot] on 2026-11-27T22:10:20Z.
Claimed by @Tarraga. Open a draft pull request with
Refs #492in its description within 24 hours, or the claim expires.