diff --git a/ARMeilleure/ARMeilleure.csproj b/ARMeilleure/ARMeilleure.csproj index 4a221e691..e1794d379 100644 --- a/ARMeilleure/ARMeilleure.csproj +++ b/ARMeilleure/ARMeilleure.csproj @@ -1,8 +1,7 @@ - netcoreapp3.1 - 8.0 + net5.0 win-x64;osx-x64;linux-x64 diff --git a/ARMeilleure/CodeGen/X86/HardwareCapabilities.cs b/ARMeilleure/CodeGen/X86/HardwareCapabilities.cs index b622c65cd..6fac871d8 100644 --- a/ARMeilleure/CodeGen/X86/HardwareCapabilities.cs +++ b/ARMeilleure/CodeGen/X86/HardwareCapabilities.cs @@ -4,6 +4,13 @@ namespace ARMeilleure.CodeGen.X86 { static class HardwareCapabilities { + static HardwareCapabilities() + { + (_, _, int ecx, _) = X86Base.CpuId(0x00000001, 0x00000000); + + SupportsF16c = ((ecx >> 29) & 1) != 0; + } + public static bool SupportsSse => Sse.IsSupported; public static bool SupportsSse2 => Sse2.IsSupported; public static bool SupportsSse3 => Sse3.IsSupported; @@ -15,6 +22,7 @@ namespace ARMeilleure.CodeGen.X86 public static bool SupportsPopcnt => Popcnt.IsSupported; public static bool SupportsAesni => Aes.IsSupported; public static bool SupportsAvx => Avx.IsSupported; + public static bool SupportsF16c; public static bool ForceLegacySse { get; set; } diff --git a/ARMeilleure/Optimizations.cs b/ARMeilleure/Optimizations.cs index fbbbfdb26..f568eb055 100644 --- a/ARMeilleure/Optimizations.cs +++ b/ARMeilleure/Optimizations.cs @@ -14,6 +14,7 @@ namespace ARMeilleure public static bool UseSse42IfAvailable { get; set; } = true; public static bool UsePopCntIfAvailable { get; set; } = true; public static bool UseAvxIfAvailable { get; set; } = true; + public static bool UseF16cIfAvailable { get; set; } = true; public static bool UseAesniIfAvailable { get; set; } = true; public static bool UsePclmulqdqIfAvailable { get; set; } = true; @@ -31,6 +32,7 @@ namespace ARMeilleure internal static bool UseSse42 => UseSse42IfAvailable && HardwareCapabilities.SupportsSse42; internal static bool UsePopCnt => UsePopCntIfAvailable && HardwareCapabilities.SupportsPopcnt; internal static bool UseAvx => UseAvxIfAvailable && HardwareCapabilities.SupportsAvx && !ForceLegacySse; + internal static bool UseF16c => UseF16cIfAvailable && HardwareCapabilities.SupportsF16c; internal static bool UseAesni => UseAesniIfAvailable && HardwareCapabilities.SupportsAesni; internal static bool UsePclmulqdq => UsePclmulqdqIfAvailable && HardwareCapabilities.SupportsPclmulqdq; } diff --git a/ARMeilleure/Translation/PTC/Ptc.cs b/ARMeilleure/Translation/PTC/Ptc.cs index dd1c44b23..283cbd06f 100644 --- a/ARMeilleure/Translation/PTC/Ptc.cs +++ b/ARMeilleure/Translation/PTC/Ptc.cs @@ -1,5 +1,6 @@ using ARMeilleure.CodeGen; using ARMeilleure.CodeGen.Unwinding; +using ARMeilleure.CodeGen.X86; using ARMeilleure.Memory; using Ryujinx.Common.Configuration; using Ryujinx.Common.Logging; @@ -10,7 +11,6 @@ using System.Diagnostics; using System.IO; using System.IO.Compression; using System.Runtime.InteropServices; -using System.Runtime.Intrinsics.X86; using System.Runtime.Serialization.Formatters.Binary; using System.Threading; using System.Threading.Tasks; @@ -648,17 +648,18 @@ namespace ARMeilleure.Translation.PTC { ulong featureInfo = 0ul; - featureInfo |= (Sse3.IsSupported ? 1ul : 0ul) << 0; - featureInfo |= (Pclmulqdq.IsSupported ? 1ul : 0ul) << 1; - featureInfo |= (Ssse3.IsSupported ? 1ul : 0ul) << 9; - featureInfo |= (Fma.IsSupported ? 1ul : 0ul) << 12; - featureInfo |= (Sse41.IsSupported ? 1ul : 0ul) << 19; - featureInfo |= (Sse42.IsSupported ? 1ul : 0ul) << 20; - featureInfo |= (Popcnt.IsSupported ? 1ul : 0ul) << 23; - featureInfo |= (Aes.IsSupported ? 1ul : 0ul) << 25; - featureInfo |= (Avx.IsSupported ? 1ul : 0ul) << 28; - featureInfo |= (Sse.IsSupported ? 1ul : 0ul) << 57; - featureInfo |= (Sse2.IsSupported ? 1ul : 0ul) << 58; + featureInfo |= (HardwareCapabilities.SupportsSse3 ? 1ul : 0ul) << 0; + featureInfo |= (HardwareCapabilities.SupportsPclmulqdq ? 1ul : 0ul) << 1; + featureInfo |= (HardwareCapabilities.SupportsSsse3 ? 1ul : 0ul) << 9; + featureInfo |= (HardwareCapabilities.SupportsFma ? 1ul : 0ul) << 12; + featureInfo |= (HardwareCapabilities.SupportsSse41 ? 1ul : 0ul) << 19; + featureInfo |= (HardwareCapabilities.SupportsSse42 ? 1ul : 0ul) << 20; + featureInfo |= (HardwareCapabilities.SupportsPopcnt ? 1ul : 0ul) << 23; + featureInfo |= (HardwareCapabilities.SupportsAesni ? 1ul : 0ul) << 25; + featureInfo |= (HardwareCapabilities.SupportsAvx ? 1ul : 0ul) << 28; + featureInfo |= (HardwareCapabilities.SupportsF16c ? 1ul : 0ul) << 29; + featureInfo |= (HardwareCapabilities.SupportsSse ? 1ul : 0ul) << 57; + featureInfo |= (HardwareCapabilities.SupportsSse2 ? 1ul : 0ul) << 58; return featureInfo; } diff --git a/Ryujinx.Audio.Renderer/Ryujinx.Audio.Renderer.csproj b/Ryujinx.Audio.Renderer/Ryujinx.Audio.Renderer.csproj index d49b51663..a47d33357 100644 --- a/Ryujinx.Audio.Renderer/Ryujinx.Audio.Renderer.csproj +++ b/Ryujinx.Audio.Renderer/Ryujinx.Audio.Renderer.csproj @@ -1,7 +1,7 @@  - netcoreapp3.1 + net5.0 win-x64;osx-x64;linux-x64 Debug;Release diff --git a/Ryujinx.Audio/Ryujinx.Audio.csproj b/Ryujinx.Audio/Ryujinx.Audio.csproj index ea699c38b..b5e3d2457 100644 --- a/Ryujinx.Audio/Ryujinx.Audio.csproj +++ b/Ryujinx.Audio/Ryujinx.Audio.csproj @@ -1,8 +1,7 @@  - netcoreapp3.1 - 8.0 + net5.0 win-x64;osx-x64;linux-x64 Debug;Release diff --git a/Ryujinx.Common/Ryujinx.Common.csproj b/Ryujinx.Common/Ryujinx.Common.csproj index fdc512580..38c76659e 100644 --- a/Ryujinx.Common/Ryujinx.Common.csproj +++ b/Ryujinx.Common/Ryujinx.Common.csproj @@ -1,8 +1,7 @@ - netcoreapp3.1 - 8.0 + net5.0 win-x64;osx-x64;linux-x64 Debug;Release diff --git a/Ryujinx.Cpu/Ryujinx.Cpu.csproj b/Ryujinx.Cpu/Ryujinx.Cpu.csproj index 3fd647eb5..ec56077aa 100644 --- a/Ryujinx.Cpu/Ryujinx.Cpu.csproj +++ b/Ryujinx.Cpu/Ryujinx.Cpu.csproj @@ -1,7 +1,7 @@  - netcoreapp3.1 + net5.0 diff --git a/Ryujinx.Graphics.Device/Ryujinx.Graphics.Device.csproj b/Ryujinx.Graphics.Device/Ryujinx.Graphics.Device.csproj index 7c4ae4ca6..2f002aa33 100644 --- a/Ryujinx.Graphics.Device/Ryujinx.Graphics.Device.csproj +++ b/Ryujinx.Graphics.Device/Ryujinx.Graphics.Device.csproj @@ -1,7 +1,7 @@  - netcoreapp3.1 + net5.0 diff --git a/Ryujinx.Graphics.GAL/Ryujinx.Graphics.GAL.csproj b/Ryujinx.Graphics.GAL/Ryujinx.Graphics.GAL.csproj index 0afbad148..9de3f1a29 100644 --- a/Ryujinx.Graphics.GAL/Ryujinx.Graphics.GAL.csproj +++ b/Ryujinx.Graphics.GAL/Ryujinx.Graphics.GAL.csproj @@ -6,8 +6,7 @@ - netcoreapp3.1 - 8.0 + net5.0 win-x64;osx-x64;linux-x64 diff --git a/Ryujinx.Graphics.Gpu/Ryujinx.Graphics.Gpu.csproj b/Ryujinx.Graphics.Gpu/Ryujinx.Graphics.Gpu.csproj index a9e81be35..a37802075 100644 --- a/Ryujinx.Graphics.Gpu/Ryujinx.Graphics.Gpu.csproj +++ b/Ryujinx.Graphics.Gpu/Ryujinx.Graphics.Gpu.csproj @@ -10,8 +10,7 @@ - netcoreapp3.1 - 8.0 + net5.0 win-x64;osx-x64;linux-x64 diff --git a/Ryujinx.Graphics.Host1x/Ryujinx.Graphics.Host1x.csproj b/Ryujinx.Graphics.Host1x/Ryujinx.Graphics.Host1x.csproj index 4c0736cfa..8fff82c38 100644 --- a/Ryujinx.Graphics.Host1x/Ryujinx.Graphics.Host1x.csproj +++ b/Ryujinx.Graphics.Host1x/Ryujinx.Graphics.Host1x.csproj @@ -1,7 +1,7 @@ - netcoreapp3.1 + net5.0 diff --git a/Ryujinx.Graphics.Nvdec.H264/Ryujinx.Graphics.Nvdec.H264.csproj b/Ryujinx.Graphics.Nvdec.H264/Ryujinx.Graphics.Nvdec.H264.csproj index cda0d9337..5945c008f 100644 --- a/Ryujinx.Graphics.Nvdec.H264/Ryujinx.Graphics.Nvdec.H264.csproj +++ b/Ryujinx.Graphics.Nvdec.H264/Ryujinx.Graphics.Nvdec.H264.csproj @@ -1,7 +1,7 @@  - netcoreapp3.1 + net5.0 diff --git a/Ryujinx.Graphics.Nvdec.Vp9/Ryujinx.Graphics.Nvdec.Vp9.csproj b/Ryujinx.Graphics.Nvdec.Vp9/Ryujinx.Graphics.Nvdec.Vp9.csproj index 8fb9d4350..c62433f9d 100644 --- a/Ryujinx.Graphics.Nvdec.Vp9/Ryujinx.Graphics.Nvdec.Vp9.csproj +++ b/Ryujinx.Graphics.Nvdec.Vp9/Ryujinx.Graphics.Nvdec.Vp9.csproj @@ -1,7 +1,7 @@  - netcoreapp3.1 + net5.0 diff --git a/Ryujinx.Graphics.Nvdec/Ryujinx.Graphics.Nvdec.csproj b/Ryujinx.Graphics.Nvdec/Ryujinx.Graphics.Nvdec.csproj index 3561cf802..9d2b6b84f 100644 --- a/Ryujinx.Graphics.Nvdec/Ryujinx.Graphics.Nvdec.csproj +++ b/Ryujinx.Graphics.Nvdec/Ryujinx.Graphics.Nvdec.csproj @@ -1,8 +1,7 @@  - netcoreapp3.1 - 8.0 + net5.0 win-x64;osx-x64;linux-x64 diff --git a/Ryujinx.Graphics.OpenGL/Ryujinx.Graphics.OpenGL.csproj b/Ryujinx.Graphics.OpenGL/Ryujinx.Graphics.OpenGL.csproj index 754d41984..e8fd6f113 100644 --- a/Ryujinx.Graphics.OpenGL/Ryujinx.Graphics.OpenGL.csproj +++ b/Ryujinx.Graphics.OpenGL/Ryujinx.Graphics.OpenGL.csproj @@ -2,8 +2,7 @@ true - netcoreapp3.1 - 8.0 + net5.0 win-x64;osx-x64;linux-x64 diff --git a/Ryujinx.Graphics.Shader/Ryujinx.Graphics.Shader.csproj b/Ryujinx.Graphics.Shader/Ryujinx.Graphics.Shader.csproj index b2d8a2a77..d800787a4 100644 --- a/Ryujinx.Graphics.Shader/Ryujinx.Graphics.Shader.csproj +++ b/Ryujinx.Graphics.Shader/Ryujinx.Graphics.Shader.csproj @@ -17,8 +17,7 @@ - netcoreapp3.1 - 8.0 + net5.0 win-x64;osx-x64;linux-x64 diff --git a/Ryujinx.Graphics.Texture/Ryujinx.Graphics.Texture.csproj b/Ryujinx.Graphics.Texture/Ryujinx.Graphics.Texture.csproj index dcd70821a..2fc9a32e4 100644 --- a/Ryujinx.Graphics.Texture/Ryujinx.Graphics.Texture.csproj +++ b/Ryujinx.Graphics.Texture/Ryujinx.Graphics.Texture.csproj @@ -5,8 +5,7 @@ - netcoreapp3.1 - 8.0 + net5.0 win-x64;osx-x64;linux-x64 true diff --git a/Ryujinx.Graphics.Vic/Ryujinx.Graphics.Vic.csproj b/Ryujinx.Graphics.Vic/Ryujinx.Graphics.Vic.csproj index f072fa36c..b71eff2bf 100644 --- a/Ryujinx.Graphics.Vic/Ryujinx.Graphics.Vic.csproj +++ b/Ryujinx.Graphics.Vic/Ryujinx.Graphics.Vic.csproj @@ -1,7 +1,7 @@ - netcoreapp3.1 + net5.0 diff --git a/Ryujinx.Graphics.Video/Ryujinx.Graphics.Video.csproj b/Ryujinx.Graphics.Video/Ryujinx.Graphics.Video.csproj index 6710726c6..a7f8f7461 100644 --- a/Ryujinx.Graphics.Video/Ryujinx.Graphics.Video.csproj +++ b/Ryujinx.Graphics.Video/Ryujinx.Graphics.Video.csproj @@ -1,7 +1,7 @@ - netcoreapp3.1 + net5.0 diff --git a/Ryujinx.HLE/Ryujinx.HLE.csproj b/Ryujinx.HLE/Ryujinx.HLE.csproj index 92d776a41..4b732642d 100644 --- a/Ryujinx.HLE/Ryujinx.HLE.csproj +++ b/Ryujinx.HLE/Ryujinx.HLE.csproj @@ -1,8 +1,7 @@  - netcoreapp3.1 - 8.0 + net5.0 win-x64;osx-x64;linux-x64 Debug;Release diff --git a/Ryujinx.Memory.Tests/Ryujinx.Memory.Tests.csproj b/Ryujinx.Memory.Tests/Ryujinx.Memory.Tests.csproj index c7c151857..f0662aa43 100644 --- a/Ryujinx.Memory.Tests/Ryujinx.Memory.Tests.csproj +++ b/Ryujinx.Memory.Tests/Ryujinx.Memory.Tests.csproj @@ -1,7 +1,7 @@ - netcoreapp3.1 + net5.0 false diff --git a/Ryujinx.Memory/Ryujinx.Memory.csproj b/Ryujinx.Memory/Ryujinx.Memory.csproj index c9cf861f6..ee7c47589 100644 --- a/Ryujinx.Memory/Ryujinx.Memory.csproj +++ b/Ryujinx.Memory/Ryujinx.Memory.csproj @@ -1,7 +1,7 @@  - netcoreapp3.1 + net5.0 diff --git a/Ryujinx.ShaderTools/Ryujinx.ShaderTools.csproj b/Ryujinx.ShaderTools/Ryujinx.ShaderTools.csproj index ad643f49a..ce9a91b9c 100644 --- a/Ryujinx.ShaderTools/Ryujinx.ShaderTools.csproj +++ b/Ryujinx.ShaderTools/Ryujinx.ShaderTools.csproj @@ -5,8 +5,7 @@ - netcoreapp3.1 - 8.0 + net5.0 win-x64;osx-x64;linux-x64 Exe Debug;Release diff --git a/Ryujinx.Tests.Unicorn/Ryujinx.Tests.Unicorn.csproj b/Ryujinx.Tests.Unicorn/Ryujinx.Tests.Unicorn.csproj index c009e6a50..206654fa3 100644 --- a/Ryujinx.Tests.Unicorn/Ryujinx.Tests.Unicorn.csproj +++ b/Ryujinx.Tests.Unicorn/Ryujinx.Tests.Unicorn.csproj @@ -1,8 +1,7 @@ - netcoreapp3.1 - 8.0 + net5.0 win-x64;osx-x64;linux-x64 true Debug;Release diff --git a/Ryujinx.Tests/Ryujinx.Tests.csproj b/Ryujinx.Tests/Ryujinx.Tests.csproj index 60ccc960f..f040899b6 100644 --- a/Ryujinx.Tests/Ryujinx.Tests.csproj +++ b/Ryujinx.Tests/Ryujinx.Tests.csproj @@ -1,8 +1,7 @@ - netcoreapp3.1 - 8.0 + net5.0 win-x64;osx-x64;linux-x64 Exe false diff --git a/Ryujinx/Ryujinx.csproj b/Ryujinx/Ryujinx.csproj index 536657bc8..c38a2bedb 100644 --- a/Ryujinx/Ryujinx.csproj +++ b/Ryujinx/Ryujinx.csproj @@ -1,8 +1,7 @@ - netcoreapp3.1 - 8.0 + net5.0 win-x64;osx-x64;linux-x64 Exe true diff --git a/appveyor.yml b/appveyor.yml index 84c61cc72..1bf99a049 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -4,7 +4,7 @@ branches: - master image: Visual Studio 2019 environment: - appveyor_dotnet_runtime: netcoreapp3.1 + appveyor_dotnet_runtime: net5.0 matrix: - config: Release config_name: '-'