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

Open
opened 2026-11-27 22:11:30 +00:00 by github-bot · 2 comments
Owner

@⁠Tarraga on GitHub · 2026-11-27 22:09 UTC · original

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 #485: 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 #485 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** on GitHub · 2026-11-27 22:09 UTC · [original](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/492) ### 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 #485: 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 #485 does. I will open the pull request with the test. ### Mac, macOS version and commit M4 Pro, 48 GB, macOS 27.0, main b998bb65
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 22:11:30 +00:00
Author
Owner

@⁠Tarraga on GitHub · 2026-11-27 22:10 UTC · original

/claim

**@⁠Tarraga** on GitHub · 2026-11-27 22:10 UTC · [original](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/492#issuecomment-7229087020) /claim
Author
Owner

@⁠github-actions[bot] on GitHub · 2026-11-27 22:10 UTC · original

Claimed by @⁠Tarraga. Open a draft pull request with Refs #492 in its description within 24 hours, or the claim expires.

**@⁠github-actions[bot]** on GitHub · 2026-11-27 22:10 UTC · [original](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/492#issuecomment-7229090867) Claimed by @⁠Tarraga. Open a draft pull request with `Refs #492` in its description within 24 hours, or the claim expires.
This discussion has been locked. Commenting is limited to contributors.
No description provided.