Disable Tracy profiler on Android

This commit is contained in:
Wojtek Figat
2021-07-13 13:02:16 +02:00
parent 1c03b21a43
commit 0b9f33b4af
4 changed files with 14 additions and 5 deletions

View File

@@ -168,7 +168,9 @@ void SceneRendering::DrawEntries::CullAndDraw(RenderContext& renderContext)
{
#if SCENE_RENDERING_USE_PROFILER
PROFILE_CPU();
#if TRACY_ENABLE
___tracy_scoped_zone.Name(*e.Actor->GetName(), e.Actor->GetName().Length());
#endif
#endif
e.Actor->Draw(renderContext);
}
@@ -181,7 +183,9 @@ void SceneRendering::DrawEntries::CullAndDraw(RenderContext& renderContext)
{
#if SCENE_RENDERING_USE_PROFILER
PROFILE_CPU();
#if TRACY_ENABLE
___tracy_scoped_zone.Name(*e.Actor->GetName(), e.Actor->GetName().Length());
#endif
#endif
e.Actor->Draw(renderContext);
}
@@ -289,7 +293,9 @@ void SceneRendering::DrawEntries::CullAndDrawOffline(RenderContext& renderContex
{
#if SCENE_RENDERING_USE_PROFILER
PROFILE_CPU();
#if TRACY_ENABLE
___tracy_scoped_zone.Name(*e.Actor->GetName(), e.Actor->GetName().Length());
#endif
#endif
e.Actor->Draw(renderContext);
}
@@ -302,7 +308,9 @@ void SceneRendering::DrawEntries::CullAndDrawOffline(RenderContext& renderContex
{
#if SCENE_RENDERING_USE_PROFILER
PROFILE_CPU();
#if TRACY_ENABLE
___tracy_scoped_zone.Name(*e.Actor->GetName(), e.Actor->GetName().Length());
#endif
#endif
e.Actor->Draw(renderContext);
}
@@ -350,7 +358,9 @@ void SceneRendering::Draw(RenderContext& renderContext)
{
#if SCENE_RENDERING_USE_PROFILER
PROFILE_CPU();
#if TRACY_ENABLE
___tracy_scoped_zone.Name(*actor->GetName(), actor->GetName().Length());
#endif
#endif
actor->Draw(renderContext);
}

View File

@@ -31,8 +31,8 @@ public class Profiler : EngineModule
// Tracy profiling tools
switch (options.Platform.Target)
{
case TargetPlatform.Android: // dlopen failed: cannot locate symbol `tracy::ScopedZone::~ScopedZone()` referenced by "libFlaxGame.so"
case TargetPlatform.Windows:
case TargetPlatform.Android:
options.PublicDependencies.Add("tracy");
break;
}

View File

@@ -1,8 +1,6 @@
#ifndef __TRACY_HPP__
#define __TRACY_HPP__
#include "common/TracySystem.hpp"
#ifndef TRACY_ENABLE
#define ZoneNamed(x,y)
@@ -84,6 +82,7 @@
#include <string.h>
#include "common/TracySystem.hpp"
#include "client/TracyCallstack.h"
namespace tracy

View File

@@ -11,10 +11,10 @@
// Define TRACY_ENABLE to enable profiler.
#include "common/TracySystem.cpp"
#ifdef TRACY_ENABLE
#include "common/TracySystem.cpp"
#ifdef _MSC_VER
# pragma warning(push, 0)
#endif