|
|
|
|
|
by boywitharupee
638 days ago
|
|
can someone explain how is profiling tools like this written for GPU applications? wouldn't you need access to internal runtime api? for ex. Apple wraps Metal buffers as "Debug" buffers to record allocations/deallocations. |
|
But in principle it’s not that different to how you just grab timestamps on the CPU. On Vulkan the API used is called “timestamp queries”
It’s quite tricky on tiled renderers like Arm/Qualcomm/Apple as they can’t provide meaningful timestamps at much tighter granularity than a whole renderpass. I believe Metal only allows you to query timestamps at the encoder level, which roughly maps to a render pass in Vulkan (at the hardware level anyway)