More build fixes
This commit is contained in:
@@ -21,7 +21,7 @@ public abstract class GraphicsDeviceBaseModule : EngineModule
|
||||
options.PublicDefinitions.Add("GPU_ENABLE_DIAGNOSTICS");
|
||||
}
|
||||
|
||||
if (Profiler.Use(options) && tracy.GPU && true)
|
||||
if (Profiler.Use(options) && tracy.Use(options) && tracy.GPU && true)
|
||||
{
|
||||
// Enables GPU profiling with Tracy
|
||||
options.PrivateDefinitions.Add("GPU_ENABLE_TRACY");
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
#include "GPUDeviceVulkan.h"
|
||||
#include "CmdBufferVulkan.h"
|
||||
#include "RenderToolsVulkan.h"
|
||||
#include "Engine/Profiler/ProfilerCPU.h"
|
||||
|
||||
QueueVulkan::QueueVulkan(GPUDeviceVulkan* device, uint32 familyIndex)
|
||||
: _queue(VK_NULL_HANDLE)
|
||||
@@ -20,6 +21,7 @@ QueueVulkan::QueueVulkan(GPUDeviceVulkan* device, uint32 familyIndex)
|
||||
|
||||
void QueueVulkan::Submit(CmdBufferVulkan* cmdBuffer, uint32 signalSemaphoresCount, const VkSemaphore* signalSemaphores)
|
||||
{
|
||||
PROFILE_CPU_NAMED("vkQueueSubmit");
|
||||
ASSERT(cmdBuffer->HasEnded());
|
||||
auto fence = cmdBuffer->GetFence();
|
||||
ASSERT(!fence->IsSignaled);
|
||||
|
||||
@@ -29,15 +29,7 @@ public class Profiler : EngineModule
|
||||
options.PublicDefinitions.Add("COMPILE_WITH_PROFILER");
|
||||
|
||||
// Tracy profiling tools
|
||||
switch (options.Platform.Target)
|
||||
{
|
||||
case TargetPlatform.Android:
|
||||
case TargetPlatform.Linux:
|
||||
case TargetPlatform.Windows:
|
||||
case TargetPlatform.Switch:
|
||||
case TargetPlatform.Mac:
|
||||
if (tracy.Use(options))
|
||||
options.PublicDependencies.Add("tracy");
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
20
Source/ThirdParty/tracy/tracy.Build.cs
vendored
20
Source/ThirdParty/tracy/tracy.Build.cs
vendored
@@ -20,6 +20,26 @@ public class tracy : ThirdPartyModule
|
||||
/// </summary>
|
||||
public static bool GPU = true;
|
||||
|
||||
/// <summary>
|
||||
/// Determinates whenever performance Tracy supports a given platform.
|
||||
/// </summary>
|
||||
/// <param name="options">The options.</param>
|
||||
/// <returns>True if use profiler, otherwise false.</returns>
|
||||
public static bool Use(BuildOptions options)
|
||||
{
|
||||
switch (options.Platform.Target)
|
||||
{
|
||||
case TargetPlatform.Android:
|
||||
case TargetPlatform.Linux:
|
||||
case TargetPlatform.Windows:
|
||||
case TargetPlatform.Switch:
|
||||
case TargetPlatform.Mac:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override void Init()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user