gpu(native): the ray-tracing structure builder's pipelines are put off past the frame's budget and its dispatches dropped #492

Open
opened 2026-11-27 22:09:58 +00:00 by Tarraga · 2 comments
Tarraga commented 2026-11-27 22:09:58 +00:00 (Migrated from github.com)
Contributor

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 b998bb65

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:issue:6655247141 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/492). Originally posted by [Tarraga](https://github.com/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 b998bb65
Tarraga commented 2026-11-27 22:10:05 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by Tarraga on 2026-11-27T22:10:05Z.


/claim

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7229087020 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/492#issuecomment-7229087020). Originally posted by [Tarraga](https://github.com/Tarraga) on 2026-11-27T22:10:05Z. --- /claim
github-actions[bot] commented 2026-11-27 22:10:20 +00:00 (Migrated from github.com)
Author
Contributor

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 #492 in its description within 24 hours, or the claim expires.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7229090867 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/492#issuecomment-7229090867). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-11-27T22:10:20Z. --- Claimed by @Tarraga. Open a draft pull request with `Refs #492` in its description within 24 hours, or the claim expires.
Sign in to join this conversation.
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
LakshanSivakumar/Native-Victory-macOS#492
No description provided.