More build fixes

This commit is contained in:
Wojtek Figat
2025-08-02 21:50:09 +02:00
parent 31764d6d4e
commit 2730d63257
4 changed files with 24 additions and 10 deletions

View File

@@ -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");

View File

@@ -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);

View File

@@ -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;
}
}
}

View File

@@ -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()
{