From dbbc2b70bfccecfe26772d64ef0059dc9d7b86a2 Mon Sep 17 00:00:00 2001 From: Wojtek Figat Date: Fri, 28 Jun 2024 09:43:18 +0200 Subject: [PATCH 1/2] Disable GlobalSurfaceAtlas on Mac due to GPU crashes in larges scenes --- Source/Engine/Renderer/GI/GlobalSurfaceAtlasPass.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Source/Engine/Renderer/GI/GlobalSurfaceAtlasPass.cpp b/Source/Engine/Renderer/GI/GlobalSurfaceAtlasPass.cpp index 3fd2060d9..4d9e1c1c1 100644 --- a/Source/Engine/Renderer/GI/GlobalSurfaceAtlasPass.cpp +++ b/Source/Engine/Renderer/GI/GlobalSurfaceAtlasPass.cpp @@ -426,6 +426,9 @@ bool GlobalSurfaceAtlasPass::Init() // Check platform support const auto device = GPUDevice::Instance; _supported = device->GetFeatureLevel() >= FeatureLevel::SM5 && device->Limits.HasCompute && device->Limits.HasTypedUAVLoad; +#if PLATFORM_APPLE_FAMILY + _supported = false; // Vulkan over Metal has some issues in complex scenes with DDGI +#endif return false; } From 7f482219ef286f8ab4d8012c9dbed9b96e2413e8 Mon Sep 17 00:00:00 2001 From: Wojtek Figat Date: Fri, 28 Jun 2024 09:51:29 +0200 Subject: [PATCH 2/2] Fix generating project files for VSCode on Mac without .NET x64 SDK installed --- Source/Tools/Flax.Build/Build/Builder.Projects.cs | 4 +--- .../VisualStudioCode/VisualStudioCodeProjectGenerator.cs | 1 + 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/Source/Tools/Flax.Build/Build/Builder.Projects.cs b/Source/Tools/Flax.Build/Build/Builder.Projects.cs index c928861eb..aa78cdb27 100644 --- a/Source/Tools/Flax.Build/Build/Builder.Projects.cs +++ b/Source/Tools/Flax.Build/Build/Builder.Projects.cs @@ -179,8 +179,7 @@ namespace Flax.Build using (new ProfileEventScope("GenerateProjects")) { // Pick the project format - HashSet projectFormats = new HashSet(); - + var projectFormats = new HashSet(); if (Configuration.ProjectFormatVS2022) projectFormats.Add(ProjectFormat.VisualStudio2022); if (Configuration.ProjectFormatVS2019) @@ -195,7 +194,6 @@ namespace Flax.Build projectFormats.Add(ProjectFormat.VisualStudio2022); if (!string.IsNullOrEmpty(Configuration.ProjectFormatCustom)) projectFormats.Add(ProjectFormat.Custom); - if (projectFormats.Count == 0) projectFormats.Add(Platform.BuildPlatform.DefaultProjectFormat); diff --git a/Source/Tools/Flax.Build/Projects/VisualStudioCode/VisualStudioCodeProjectGenerator.cs b/Source/Tools/Flax.Build/Projects/VisualStudioCode/VisualStudioCodeProjectGenerator.cs index 284b46e49..1830b8efe 100644 --- a/Source/Tools/Flax.Build/Projects/VisualStudioCode/VisualStudioCodeProjectGenerator.cs +++ b/Source/Tools/Flax.Build/Projects/VisualStudioCode/VisualStudioCodeProjectGenerator.cs @@ -553,6 +553,7 @@ namespace Flax.Build.Projects.VisualStudioCode { var toolchain = platform.GetToolchain(architecture); var targetBuildOptions = Builder.GetBuildOptions(target, platform, toolchain, architecture, configuration, Globals.Root); + targetBuildOptions.Flags |= NativeCpp.BuildFlags.GenerateProject; var modules = Builder.CollectModules(rules, platform, target, targetBuildOptions, toolchain, architecture, configuration); foreach (var module in modules) {