|
| 1 | +If you wish to optimize something, you must first measure and understand it. |
| 2 | +When looking at the performance of applications, [tracy] is our tool of choice. |
| 3 | +It gives us a clear understanding of how long work takes, when it happens relative to other work each frame, |
| 4 | +and how various threads are used. |
| 5 | +Read our [profiling docs] to get started! |
| 6 | + |
| 7 | +But until now, it's had a critical limitation: work done on the GPU wasn't shown, |
| 8 | +forcing devs to pull up dedicated GPU-focused tools (like [NSight] or [RenderDoc]) and struggle to piece together an intuition for how it all fits together. |
| 9 | + |
| 10 | +In 0.16, we've connected the [rendering diagnostics added in Bevy 0.14] to [tracy], creating a cohesive picture of |
| 11 | +all of the work that's being done in a Bevy application in a single convenient place. |
| 12 | + |
| 13 | +That said, we've only instrumented a few of our passes so far. |
| 14 | +While we will improve this in the future, you will need to add spans to your own custom rendering code, |
| 15 | +and specialized GPU diagnostic tools will always be more powerful: capturing all GPU-related work done, |
| 16 | +and providing more detailed information. |
| 17 | + |
| 18 | +Special thanks to [@wumpf] for trailblazing this work in the excellent [wgpu-profiler] tool, and demonstrating how to wire [wgpu] and [tracy] together. |
| 19 | + |
| 20 | +[tracy]: https://github.com/wolfpld/tracy |
| 21 | +[profiling docs]: https://github.com/bevyengine/bevy/blob/main/docs/profiling.md |
| 22 | +[NSight]: https://developer.nvidia.com/nsight-systems |
| 23 | +[RenderDoc]: https://renderdoc.org/ |
| 24 | +[@wumpf]: https://github.com/Wumpf |
| 25 | +[wgpu-profiler]: https://github.com/Wumpf/wgpu-profiler |
| 26 | +[rendering diagnostics added in Bevy 0.14]: https://bevyengine.org/news/bevy-0-14/#tools-for-profiling-gpu-performance |
0 commit comments