fix: TRACY_ON_DEMAND——GPU context 宣告随连接重发
GpuNewContext 消息只在 TRACY_ON_DEMAND 下 DeferItem(连接后重发)。 程序启动即建 Tracy GPU context 而 GUI 晚连接,宣告丢失 → GUI 不认识 GPU context → pass zone 全部不显示(只见 CPU lane)。启用按需剖析: 连接建立后的帧才活跃,语义即 tracy 官方推荐用法。
This commit is contained in:
@@ -40,6 +40,9 @@ set(TRACY_DIR ${CMAKE_SOURCE_DIR}/Lib/tracy)
|
||||
target_include_directories(Engine PUBLIC ${TRACY_DIR}/public)
|
||||
target_sources(Engine PRIVATE ${TRACY_DIR}/public/TracyClient.cpp)
|
||||
target_compile_definitions(Engine PUBLIC TRACY_ENABLE)
|
||||
# 按需剖析:GPU context 宣告(GpuNewContext)与连接绑定——GUI 永远晚于
|
||||
# 程序启动连接,没有这个宏宣告消息被丢弃,GPU 时间线永远空白
|
||||
target_compile_definitions(Engine PUBLIC TRACY_ON_DEMAND)
|
||||
|
||||
find_package(Threads REQUIRED)
|
||||
target_link_libraries(Engine PUBLIC Threads::Threads)
|
||||
|
||||
Reference in New Issue
Block a user