From aa129fdbdfd424f73da2b187fc28855f8ae90059 Mon Sep 17 00:00:00 2001 From: Mary Date: Sun, 15 Nov 2020 19:27:15 +0100 Subject: [PATCH] infra: Migrate to .NET 5 (#1694) * infra: Migrate to .NET 5 This migrate projects and CI to .NET 5 * Remove language version restrictions (now on 9.0 by default) * infra: pin .NET 5 to avoid later issues * infra: Cleanup csproj files * infra: update dependencies * infra: Add temporary workaround for a bug in Vector128.Create see https://github.com/dotnet/runtime/issues/44704 for more informations --- .github/workflows/build.yml | 40 +++++++---- ARMeilleure/ARMeilleure.csproj | 11 +-- README.md | 4 +- .../Ryujinx.Audio.Renderer.csproj | 15 +--- Ryujinx.Audio/Ryujinx.Audio.csproj | 14 +--- Ryujinx.Common/Ryujinx.Common.csproj | 14 +--- Ryujinx.Cpu/Ryujinx.Cpu.csproj | 9 +-- .../Ryujinx.Graphics.Device.csproj | 2 +- .../Ryujinx.Graphics.GAL.csproj | 10 ++- .../Ryujinx.Graphics.Gpu.csproj | 19 ++--- .../Ryujinx.Graphics.Host1x.csproj | 10 +-- .../Ryujinx.Graphics.Nvdec.H264.csproj | 9 +-- .../Ryujinx.Graphics.Nvdec.Vp9.csproj | 9 +-- .../Ryujinx.Graphics.Nvdec.csproj | 11 +-- .../Ryujinx.Graphics.OpenGL.csproj | 6 +- .../Ryujinx.Graphics.Shader.csproj | 18 +++-- .../Ryujinx.Graphics.Texture.csproj | 11 ++- Ryujinx.Graphics.Vic/Blender.cs | 37 ++++++++-- .../Ryujinx.Graphics.Vic.csproj | 9 +-- .../Ryujinx.Graphics.Video.csproj | 2 +- Ryujinx.HLE/Ryujinx.HLE.csproj | 42 +++++------ .../Ryujinx.Memory.Tests.csproj | 5 +- Ryujinx.Memory/Ryujinx.Memory.csproj | 9 +-- .../Ryujinx.ShaderTools.csproj | 11 ++- .../Ryujinx.Tests.Unicorn.csproj | 4 +- Ryujinx.Tests/Ryujinx.Tests.csproj | 5 +- Ryujinx/Ryujinx.csproj | 70 +++++++++---------- appveyor.yml | 2 +- global.json | 5 ++ 29 files changed, 165 insertions(+), 248 deletions(-) create mode 100644 global.json diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index cd0fee4a02..596ed5b8a3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,27 +1,39 @@ -name: "Build job" +name: Build job + on: push: - branches: - - master + branches: [ master ] + paths-ignore: + - '.github/*' + - '.github/ISSUE_TEMPLATE/**' + - '*.yml' + - 'README.md' pull_request: - branches: - - '*' + branches: [ master ] + paths-ignore: + - '.github/*' + - '.github/ISSUE_TEMPLATE/**' + - '*.yml' + - 'README.md' + jobs: build: + name: ${{ matrix.os }} (${{ matrix.configuration }}) runs-on: ${{ matrix.os }} strategy: matrix: os: [ubuntu-latest, macOS-latest, windows-latest] - dotnet: ['3.1.100'] - environment: ['Debug', 'Release'] - name: ${{ matrix.environment }} build (Dotnet ${{ matrix.dotnet }}, OS ${{ matrix.os }}) + configuration: [Debug, Release] + fail-fast: false + env: + POWERSHELL_TELEMETRY_OPTOUT: 1 + DOTNET_CLI_TELEMETRY_OPTOUT: 1 steps: - - uses: actions/checkout@master - - name: Setup dotnet - uses: actions/setup-dotnet@v1 + - uses: actions/checkout@v2 + - uses: actions/setup-dotnet@v1 with: - dotnet-version: ${{ matrix.dotnet }} + dotnet-version: 5.0.x - name: Build - run: dotnet build -c "${{ matrix.environment }}" + run: dotnet build -c "${{ matrix.configuration }}" - name: Test - run: dotnet test -c "${{ matrix.environment }}" \ No newline at end of file + run: dotnet test -c "${{ matrix.configuration }}" \ No newline at end of file diff --git a/ARMeilleure/ARMeilleure.csproj b/ARMeilleure/ARMeilleure.csproj index 4a221e691e..ebc4433a12 100644 --- a/ARMeilleure/ARMeilleure.csproj +++ b/ARMeilleure/ARMeilleure.csproj @@ -1,16 +1,7 @@ - netcoreapp3.1 - 8.0 - win-x64;osx-x64;linux-x64 - - - - true - - - + net5.0 true diff --git a/README.md b/README.md index 8babe1b073..5db48b32b3 100644 --- a/README.md +++ b/README.md @@ -35,12 +35,12 @@ The latest automatic build for Windows, macOS, and Linux can be found on the [Of If you wish to build the emulator yourself you will need to: -**Step one:** Install the [.NET Core 3.1 (or higher) SDK](https://dotnet.microsoft.com/download/dotnet-core). +**Step one:** Install the [.NET 5.0 (or higher) SDK](https://dotnet.microsoft.com/download/dotnet/5.0). **Step two (choose one):** **(Variant one)** -After the installation of the Net Core SDK is done; go ahead and copy the Clone link from GitHub from here (via Clone or Download --> Copy HTTPS Link. You can Git Clone the repo by using Git Bash or Git CMD. +After the installation of the .NET SDK is done; go ahead and copy the Clone link from GitHub from here (via Clone or Download --> Copy HTTPS Link. You can Git Clone the repo by using Git Bash or Git CMD. **(Variant two):** diff --git a/Ryujinx.Audio.Renderer/Ryujinx.Audio.Renderer.csproj b/Ryujinx.Audio.Renderer/Ryujinx.Audio.Renderer.csproj index d49b516638..eac49fb3a5 100644 --- a/Ryujinx.Audio.Renderer/Ryujinx.Audio.Renderer.csproj +++ b/Ryujinx.Audio.Renderer/Ryujinx.Audio.Renderer.csproj @@ -1,23 +1,10 @@  - netcoreapp3.1 - win-x64;osx-x64;linux-x64 - Debug;Release - - - + net5.0 true - - true - - - - - - diff --git a/Ryujinx.Audio/Ryujinx.Audio.csproj b/Ryujinx.Audio/Ryujinx.Audio.csproj index ea699c38be..6e0b668a7b 100644 --- a/Ryujinx.Audio/Ryujinx.Audio.csproj +++ b/Ryujinx.Audio/Ryujinx.Audio.csproj @@ -1,22 +1,12 @@  - netcoreapp3.1 - 8.0 - win-x64;osx-x64;linux-x64 - Debug;Release - - - - true - - - + net5.0 true - + diff --git a/Ryujinx.Common/Ryujinx.Common.csproj b/Ryujinx.Common/Ryujinx.Common.csproj index fdc512580c..4bb52c6d2f 100644 --- a/Ryujinx.Common/Ryujinx.Common.csproj +++ b/Ryujinx.Common/Ryujinx.Common.csproj @@ -1,23 +1,13 @@ - netcoreapp3.1 - 8.0 - win-x64;osx-x64;linux-x64 - Debug;Release - - - - true - - - + net5.0 true - + diff --git a/Ryujinx.Cpu/Ryujinx.Cpu.csproj b/Ryujinx.Cpu/Ryujinx.Cpu.csproj index 3fd647eb57..ef33dd1851 100644 --- a/Ryujinx.Cpu/Ryujinx.Cpu.csproj +++ b/Ryujinx.Cpu/Ryujinx.Cpu.csproj @@ -1,14 +1,7 @@  - netcoreapp3.1 - - - - true - - - + net5.0 true diff --git a/Ryujinx.Graphics.Device/Ryujinx.Graphics.Device.csproj b/Ryujinx.Graphics.Device/Ryujinx.Graphics.Device.csproj index 7c4ae4ca62..2f002aa338 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 0afbad1486..6b3597385d 100644 --- a/Ryujinx.Graphics.GAL/Ryujinx.Graphics.GAL.csproj +++ b/Ryujinx.Graphics.GAL/Ryujinx.Graphics.GAL.csproj @@ -1,14 +1,12 @@ + + net5.0 + + - - netcoreapp3.1 - 8.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 f40857b40a..01e8e235d3 100644 --- a/Ryujinx.Graphics.Gpu/Ryujinx.Graphics.Gpu.csproj +++ b/Ryujinx.Graphics.Gpu/Ryujinx.Graphics.Gpu.csproj @@ -1,5 +1,10 @@  + + net5.0 + true + + @@ -9,18 +14,4 @@ - - netcoreapp3.1 - 8.0 - win-x64;osx-x64;linux-x64 - - - - true - - - - true - - diff --git a/Ryujinx.Graphics.Host1x/Ryujinx.Graphics.Host1x.csproj b/Ryujinx.Graphics.Host1x/Ryujinx.Graphics.Host1x.csproj index 4c0736cfad..69b6103f32 100644 --- a/Ryujinx.Graphics.Host1x/Ryujinx.Graphics.Host1x.csproj +++ b/Ryujinx.Graphics.Host1x/Ryujinx.Graphics.Host1x.csproj @@ -1,15 +1,7 @@ - netcoreapp3.1 - - - - false - - - - false + 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 cda0d9337c..2d54173cdc 100644 --- a/Ryujinx.Graphics.Nvdec.H264/Ryujinx.Graphics.Nvdec.H264.csproj +++ b/Ryujinx.Graphics.Nvdec.H264/Ryujinx.Graphics.Nvdec.H264.csproj @@ -1,14 +1,7 @@  - netcoreapp3.1 - - - - true - - - + net5.0 true diff --git a/Ryujinx.Graphics.Nvdec.Vp9/Ryujinx.Graphics.Nvdec.Vp9.csproj b/Ryujinx.Graphics.Nvdec.Vp9/Ryujinx.Graphics.Nvdec.Vp9.csproj index 8fb9d43507..51e880252a 100644 --- a/Ryujinx.Graphics.Nvdec.Vp9/Ryujinx.Graphics.Nvdec.Vp9.csproj +++ b/Ryujinx.Graphics.Nvdec.Vp9/Ryujinx.Graphics.Nvdec.Vp9.csproj @@ -1,14 +1,7 @@  - netcoreapp3.1 - - - - true - - - + net5.0 true diff --git a/Ryujinx.Graphics.Nvdec/Ryujinx.Graphics.Nvdec.csproj b/Ryujinx.Graphics.Nvdec/Ryujinx.Graphics.Nvdec.csproj index 3561cf802b..4c20979ddb 100644 --- a/Ryujinx.Graphics.Nvdec/Ryujinx.Graphics.Nvdec.csproj +++ b/Ryujinx.Graphics.Nvdec/Ryujinx.Graphics.Nvdec.csproj @@ -1,16 +1,7 @@  - netcoreapp3.1 - 8.0 - win-x64;osx-x64;linux-x64 - - - - true - - - + net5.0 true diff --git a/Ryujinx.Graphics.OpenGL/Ryujinx.Graphics.OpenGL.csproj b/Ryujinx.Graphics.OpenGL/Ryujinx.Graphics.OpenGL.csproj index 754d41984c..5d28b4f33e 100644 --- a/Ryujinx.Graphics.OpenGL/Ryujinx.Graphics.OpenGL.csproj +++ b/Ryujinx.Graphics.OpenGL/Ryujinx.Graphics.OpenGL.csproj @@ -1,14 +1,12 @@ + net5.0 true - netcoreapp3.1 - 8.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 b2d8a2a775..28a031a2f3 100644 --- a/Ryujinx.Graphics.Shader/Ryujinx.Graphics.Shader.csproj +++ b/Ryujinx.Graphics.Shader/Ryujinx.Graphics.Shader.csproj @@ -1,5 +1,13 @@ + + net5.0 + + + + + + @@ -12,14 +20,4 @@ - - - - - - netcoreapp3.1 - 8.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 dcd70821ab..b74938c0ce 100644 --- a/Ryujinx.Graphics.Texture/Ryujinx.Graphics.Texture.csproj +++ b/Ryujinx.Graphics.Texture/Ryujinx.Graphics.Texture.csproj @@ -1,14 +1,11 @@ + + net5.0 + true + - - netcoreapp3.1 - 8.0 - win-x64;osx-x64;linux-x64 - true - - diff --git a/Ryujinx.Graphics.Vic/Blender.cs b/Ryujinx.Graphics.Vic/Blender.cs index f00b909323..84171241e1 100644 --- a/Ryujinx.Graphics.Vic/Blender.cs +++ b/Ryujinx.Graphics.Vic/Blender.cs @@ -48,10 +48,39 @@ namespace Ryujinx.Graphics.Vic int one = 1 << (mtx.MatrixRShift + 8); - Vector128 col1 = Vector128.Create(mtx.MatrixCoeff00, mtx.MatrixCoeff10, mtx.MatrixCoeff20, 0); - Vector128 col2 = Vector128.Create(mtx.MatrixCoeff01, mtx.MatrixCoeff11, mtx.MatrixCoeff21, 0); - Vector128 col3 = Vector128.Create(mtx.MatrixCoeff02, mtx.MatrixCoeff12, mtx.MatrixCoeff22, one); - Vector128 col4 = Vector128.Create(mtx.MatrixCoeff03, mtx.MatrixCoeff13, mtx.MatrixCoeff23, 0); + + // NOTE: This is buggy on .NET 5.0.100, we use a workaround for now (see https://github.com/dotnet/runtime/issues/44704) + // TODO: Uncomment this when fixed. + //Vector128 col1 = Vector128.Create(mtx.MatrixCoeff00, mtx.MatrixCoeff10, mtx.MatrixCoeff20, 0); + //Vector128 col2 = Vector128.Create(mtx.MatrixCoeff01, mtx.MatrixCoeff11, mtx.MatrixCoeff21, 0); + //Vector128 col3 = Vector128.Create(mtx.MatrixCoeff02, mtx.MatrixCoeff12, mtx.MatrixCoeff22, one); + //Vector128 col4 = Vector128.Create(mtx.MatrixCoeff03, mtx.MatrixCoeff13, mtx.MatrixCoeff23, 0); + + Vector128 col1 = new Vector128(); + Vector128 col2 = new Vector128(); + Vector128 col3 = new Vector128(); + Vector128 col4 = new Vector128(); + + col1 = Sse41.Insert(col1, mtx.MatrixCoeff00, 0); + col1 = Sse41.Insert(col1, mtx.MatrixCoeff10, 1); + col1 = Sse41.Insert(col1, mtx.MatrixCoeff20, 2); + col1 = Sse41.Insert(col1, 0, 3); + + col2 = Sse41.Insert(col2, mtx.MatrixCoeff01, 0); + col2 = Sse41.Insert(col2, mtx.MatrixCoeff11, 1); + col2 = Sse41.Insert(col2, mtx.MatrixCoeff21, 2); + col2 = Sse41.Insert(col2, 0, 3); + + col3 = Sse41.Insert(col3, mtx.MatrixCoeff02, 0); + col3 = Sse41.Insert(col3, mtx.MatrixCoeff12, 1); + col3 = Sse41.Insert(col3, mtx.MatrixCoeff22, 2); + col3 = Sse41.Insert(col3, one, 3); + + col4 = Sse41.Insert(col4, mtx.MatrixCoeff03, 0); + col4 = Sse41.Insert(col4, mtx.MatrixCoeff13, 1); + col4 = Sse41.Insert(col4, mtx.MatrixCoeff23, 2); + col4 = Sse41.Insert(col4, 0, 3); + Vector128 rShift = Vector128.CreateScalar(mtx.MatrixRShift); Vector128 clMin = Vector128.Create((ushort)slot.SlotConfig.SoftClampLow); Vector128 clMax = Vector128.Create((ushort)slot.SlotConfig.SoftClampHigh); diff --git a/Ryujinx.Graphics.Vic/Ryujinx.Graphics.Vic.csproj b/Ryujinx.Graphics.Vic/Ryujinx.Graphics.Vic.csproj index f072fa36c9..fe9b834bba 100644 --- a/Ryujinx.Graphics.Vic/Ryujinx.Graphics.Vic.csproj +++ b/Ryujinx.Graphics.Vic/Ryujinx.Graphics.Vic.csproj @@ -1,14 +1,7 @@ - netcoreapp3.1 - - - - true - - - + net5.0 true diff --git a/Ryujinx.Graphics.Video/Ryujinx.Graphics.Video.csproj b/Ryujinx.Graphics.Video/Ryujinx.Graphics.Video.csproj index 6710726c63..a7f8f74614 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 92d776a41f..c3b5ac7aa7 100644 --- a/Ryujinx.HLE/Ryujinx.HLE.csproj +++ b/Ryujinx.HLE/Ryujinx.HLE.csproj @@ -1,35 +1,10 @@  - netcoreapp3.1 - 8.0 - win-x64;osx-x64;linux-x64 - Debug;Release - - - + net5.0 true - - true - - - - - NU1605 - - - - - - - - - - - - @@ -50,4 +25,19 @@ + + + NU1605 + + + + + + + + + + + + diff --git a/Ryujinx.Memory.Tests/Ryujinx.Memory.Tests.csproj b/Ryujinx.Memory.Tests/Ryujinx.Memory.Tests.csproj index c7c151857b..38a241b94c 100644 --- a/Ryujinx.Memory.Tests/Ryujinx.Memory.Tests.csproj +++ b/Ryujinx.Memory.Tests/Ryujinx.Memory.Tests.csproj @@ -1,13 +1,12 @@ - netcoreapp3.1 - + net5.0 false - + diff --git a/Ryujinx.Memory/Ryujinx.Memory.csproj b/Ryujinx.Memory/Ryujinx.Memory.csproj index c9cf861f6f..f6d19b99f5 100644 --- a/Ryujinx.Memory/Ryujinx.Memory.csproj +++ b/Ryujinx.Memory/Ryujinx.Memory.csproj @@ -1,14 +1,7 @@  - netcoreapp3.1 - - - - true - - - + net5.0 true diff --git a/Ryujinx.ShaderTools/Ryujinx.ShaderTools.csproj b/Ryujinx.ShaderTools/Ryujinx.ShaderTools.csproj index ad643f49a4..03872c45c9 100644 --- a/Ryujinx.ShaderTools/Ryujinx.ShaderTools.csproj +++ b/Ryujinx.ShaderTools/Ryujinx.ShaderTools.csproj @@ -1,15 +1,14 @@ - - - - - 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 c009e6a503..55cb85cd63 100644 --- a/Ryujinx.Tests.Unicorn/Ryujinx.Tests.Unicorn.csproj +++ b/Ryujinx.Tests.Unicorn/Ryujinx.Tests.Unicorn.csproj @@ -1,9 +1,7 @@ - netcoreapp3.1 - 8.0 - win-x64;osx-x64;linux-x64 + net5.0 true Debug;Release diff --git a/Ryujinx.Tests/Ryujinx.Tests.csproj b/Ryujinx.Tests/Ryujinx.Tests.csproj index 60ccc960f9..e6d7208cbb 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 @@ -18,7 +17,7 @@ - + diff --git a/Ryujinx/Ryujinx.csproj b/Ryujinx/Ryujinx.csproj index 536657bc87..1734ca6dd8 100644 --- a/Ryujinx/Ryujinx.csproj +++ b/Ryujinx/Ryujinx.csproj @@ -1,15 +1,46 @@ - netcoreapp3.1 - 8.0 + net5.0 win-x64;osx-x64;linux-x64 Exe true - Debug;Release 1.0.0-dirty + + + + + + + + + + + + + + + + + + + + + + + PreserveNewest + + + Always + + + Always + LICENSE-Ryujinx.Audio.Renderer.txt + + + false @@ -70,37 +101,4 @@ - - - - - - - - - - - - - - - - - - - - - - - PreserveNewest - - - Always - - - Always - LICENSE-Ryujinx.Audio.Renderer.txt - - - diff --git a/appveyor.yml b/appveyor.yml index 84c61cc72f..1bf99a049e 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: '-' diff --git a/global.json b/global.json new file mode 100644 index 0000000000..2cb2ac9bd8 --- /dev/null +++ b/global.json @@ -0,0 +1,5 @@ +{ + "sdk": { + "version": "5.0.100" + } +} \ No newline at end of file