feat: Tracy profiler 接入(CPU 帧时间线)
- vendored tracy 子模块;TRACY_ENABLE 全局生效,宏关闭时零开销 - 插桩:Application::Run FrameMark(帧边界)、Renderer::Render、 SceneRenderer::BuildFrame(ZoneScopedN)+ GPUDriven Collect (ZoneNamedN——同作用域第二个 zone 不能用 ZoneScopedN,变量名 固定会重声明)、Scene::UpdateTransforms - 覆盖 CPU 侧关键路径:帧时间线 / 场景收集 / transform 重算 / 录制提交 - 用法:游戏运行时打开 Tracy GUI(release 下载)即自动连接(8086 端口)
This commit is contained in:
@@ -33,6 +33,8 @@
|
||||
#include <Engine/ECS/Scene.h>
|
||||
#include <Engine/Assets/AssetManager.h>
|
||||
|
||||
#include <tracy/Tracy.hpp>
|
||||
|
||||
#include <glm/glm.hpp>
|
||||
|
||||
#include <array>
|
||||
@@ -307,6 +309,7 @@ namespace Engine
|
||||
|
||||
void Renderer::Render(ECS::Scene& scene, Assets::AssetManager& assets)
|
||||
{
|
||||
ZoneScoped; // CPU 侧:UBO/SSBO 上传 + 录制 + 提交(GPU 耗时见 RG timestamp)
|
||||
if (m_Window.WasResized()) {
|
||||
m_Window.ResetResizedFlag();
|
||||
HandleResize();
|
||||
|
||||
Reference in New Issue
Block a user