Merge branch 'woa_fixes' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-woa_fixes
This commit is contained in:
@@ -5,6 +5,9 @@
|
|||||||
#include "Types.h"
|
#include "Types.h"
|
||||||
#include "Engine/Core/Types/StringView.h"
|
#include "Engine/Core/Types/StringView.h"
|
||||||
#include "Engine/Core/Types/Guid.h"
|
#include "Engine/Core/Types/Guid.h"
|
||||||
|
#if PLATFORM_ARCH_ARM64
|
||||||
|
#include "Engine/Core/Core.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
class MMethod;
|
class MMethod;
|
||||||
class BinaryModule;
|
class BinaryModule;
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ namespace Flax.Build
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Specifies the minimum CPU architecture type to support (on x86/x64).
|
/// Specifies the minimum CPU architecture type to support (on x86/x64).
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[CommandLine("winCpuArch", "<arch>", "Specifies the minimum CPU architecture type to support (om x86/x64).")]
|
[CommandLine("winCpuArch", "<arch>", "Specifies the minimum CPU architecture type to support (on x86/x64).")]
|
||||||
public static CpuArchitecture WindowsCpuArch = CpuArchitecture.SSE4_2; // 99.78% support on PC according to Steam Hardware & Software Survey: September 2025 (https://store.steampowered.com/hwsurvey/)
|
public static CpuArchitecture WindowsCpuArch = CpuArchitecture.SSE4_2; // 99.78% support on PC according to Steam Hardware & Software Survey: September 2025 (https://store.steampowered.com/hwsurvey/)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -76,22 +76,27 @@ namespace Flax.Build.Platforms
|
|||||||
options.LinkEnv.InputLibraries.Add("oleaut32.lib");
|
options.LinkEnv.InputLibraries.Add("oleaut32.lib");
|
||||||
options.LinkEnv.InputLibraries.Add("delayimp.lib");
|
options.LinkEnv.InputLibraries.Add("delayimp.lib");
|
||||||
|
|
||||||
if (options.Architecture == TargetArchitecture.ARM64)
|
options.CompileEnv.CpuArchitecture = Configuration.WindowsCpuArch;
|
||||||
|
|
||||||
|
if (options.Architecture == TargetArchitecture.x64)
|
||||||
|
{
|
||||||
|
if (_minVersion.Major <= 7 && options.CompileEnv.CpuArchitecture == CpuArchitecture.AVX2)
|
||||||
|
{
|
||||||
|
// Old Windows had lower support ratio for latest CPU features
|
||||||
|
options.CompileEnv.CpuArchitecture = CpuArchitecture.AVX;
|
||||||
|
}
|
||||||
|
if (_minVersion.Major >= 11 && options.CompileEnv.CpuArchitecture == CpuArchitecture.AVX)
|
||||||
|
{
|
||||||
|
// Windows 11 has hard requirement on SSE4.2
|
||||||
|
options.CompileEnv.CpuArchitecture = CpuArchitecture.SSE4_2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (options.Architecture == TargetArchitecture.ARM64)
|
||||||
{
|
{
|
||||||
options.CompileEnv.PreprocessorDefinitions.Add("USE_SOFT_INTRINSICS");
|
options.CompileEnv.PreprocessorDefinitions.Add("USE_SOFT_INTRINSICS");
|
||||||
options.LinkEnv.InputLibraries.Add("softintrin.lib");
|
options.LinkEnv.InputLibraries.Add("softintrin.lib");
|
||||||
}
|
if (options.CompileEnv.CpuArchitecture != CpuArchitecture.None)
|
||||||
|
options.CompileEnv.CpuArchitecture = CpuArchitecture.NEON;
|
||||||
options.CompileEnv.CpuArchitecture = Configuration.WindowsCpuArch;
|
|
||||||
if (_minVersion.Major <= 7 && options.CompileEnv.CpuArchitecture == CpuArchitecture.AVX2)
|
|
||||||
{
|
|
||||||
// Old Windows had lower support ratio for latest CPU features
|
|
||||||
options.CompileEnv.CpuArchitecture = CpuArchitecture.AVX;
|
|
||||||
}
|
|
||||||
if (_minVersion.Major >= 11 && options.CompileEnv.CpuArchitecture == CpuArchitecture.AVX)
|
|
||||||
{
|
|
||||||
// Windows 11 has hard requirement on SSE4.2
|
|
||||||
options.CompileEnv.CpuArchitecture = CpuArchitecture.SSE4_2;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user