Repository navigation
Count midpoint setup and bound GPU timestamp readbacks - #9
Merged
MONZikWasTaken merged 3 commits intoNov 20, 2026
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
FlyHigh's first fast-linear phase was reporting the render time but leaving out the midpoint motion setup it had just submitted. I noticed it while comparing the fast and exact-phase paths. That made the first phase look much cheaper than it was. On native Metal I could also reproduce a separate zero-timestamp result.
What changes
costpromise still works and includes the total; the newtimingpromise gives the breakdown.This is a timing fix, not a kernel optimization. In my Mac WebGPU test, the old first-phase median was 0.92 ms. With the setup included, it's 2.95 ms total: about 2.03 ms of setup and 0.92 ms for the frame. Later phases still measured 0.92 ms.
Verification
The native Metal test reproduced a zero sample on the unmodified build. All seven GPU stream tests passed with the fix, as did the normal engine tests and strict engine Clippy. In a WebGPU burst, all 48 frames rendered: four timed, 44 untimed, with identical pixels to the untimed reference. Timing resumed afterward. I haven't tried this on Windows NVIDIA.
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.