EmbarkStudios / EmbarkStudios/puffin
Tracking: Make puffin integrate with GPU, async tasks, and thread profiling data.
- Dominant language
- Rust
- Stars
- 1.7k
- Forks
- 111
- Avg merge
- 2h 50m
- Merged PRs (30d)
- 1
Description
Besides the main frame in the game loop, a game engine can have asynchronous tasks, threads, or GPU-related work during a frame. Currently, puffin categorizes all scopes under the same puffin frame, which is a problem when it comes to those three situations.
- GPU work is executed in parallel to the frame.
- Asynchronous tasks might take multiple frames to complete.
- Threads are not dependent on frames at all.
This results in a problem described in #59 where the frame time of GPU and CPU is added up when in reality it should not be and where the timing of CPU and GPU need to be aligned. In some of Embark's internal code bases, we have large spikes for threads that take a significant amount of time which in turn make the slowest frame summary window dysfunctional because the normal frames are relatively low compared to them.
Potential suggested solutions:
- Separate timelines of CPU/GPU with potentially relating both timelines together. Potentially do this by reporting CPU and GPU to different places. Then use two different profilers UIs to visualize them.
- Simple effort to go around the frame time calculation is to only measure the main thread.
Contributor guide
Assessment
This issue has not been assessed yet.