mirror of
https://github.com/wolfpld/tracy.git
synced 2025-03-20 07:40:02 +08:00
When using the tracy ON_DEMAND mode, it is ok in most cases to drop measurements and do a GPU clock synchronization (that may stall) during the first tracyCollect. This is not enabled by default in the CMakeLists for backward compatibility and because it may be a bit intrusive. This commit also makes the OpenGL tracy TracyGpuZone* a tiny bit more efficient by not calling the threadlocal GetGpuCtx(). It is also more resilient if no context has been declared on this thread. This means that the application will not crash if a context was used on different threads even though declared only on one (thus GetGpuCtx().ptr == nullptr). Tracy does not support this scenario, so on one hand this helps users by not crashing, on the other it is an error that is now silent.