diff options
| author | Mary <me@thog.eu> | 2020-11-15 19:27:15 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-11-15 19:27:15 +0100 |
| commit | aa129fdbdfd424f73da2b187fc28855f8ae90059 (patch) | |
| tree | afe0e93dfe246f75ed97ee8cf9d3eafb115a707e /Ryujinx.Graphics.Vic | |
| parent | 8d0d299792a28af5121ac8ec031ae958b07dd944 (diff) | |
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
Diffstat (limited to 'Ryujinx.Graphics.Vic')
| -rw-r--r-- | Ryujinx.Graphics.Vic/Blender.cs | 37 | ||||
| -rw-r--r-- | Ryujinx.Graphics.Vic/Ryujinx.Graphics.Vic.csproj | 9 |
2 files changed, 34 insertions, 12 deletions
diff --git a/Ryujinx.Graphics.Vic/Blender.cs b/Ryujinx.Graphics.Vic/Blender.cs index f00b9093..84171241 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<int> col1 = Vector128.Create(mtx.MatrixCoeff00, mtx.MatrixCoeff10, mtx.MatrixCoeff20, 0); - Vector128<int> col2 = Vector128.Create(mtx.MatrixCoeff01, mtx.MatrixCoeff11, mtx.MatrixCoeff21, 0); - Vector128<int> col3 = Vector128.Create(mtx.MatrixCoeff02, mtx.MatrixCoeff12, mtx.MatrixCoeff22, one); - Vector128<int> 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<int> col1 = Vector128.Create(mtx.MatrixCoeff00, mtx.MatrixCoeff10, mtx.MatrixCoeff20, 0); + //Vector128<int> col2 = Vector128.Create(mtx.MatrixCoeff01, mtx.MatrixCoeff11, mtx.MatrixCoeff21, 0); + //Vector128<int> col3 = Vector128.Create(mtx.MatrixCoeff02, mtx.MatrixCoeff12, mtx.MatrixCoeff22, one); + //Vector128<int> col4 = Vector128.Create(mtx.MatrixCoeff03, mtx.MatrixCoeff13, mtx.MatrixCoeff23, 0); + + Vector128<int> col1 = new Vector128<int>(); + Vector128<int> col2 = new Vector128<int>(); + Vector128<int> col3 = new Vector128<int>(); + Vector128<int> col4 = new Vector128<int>(); + + 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<int> rShift = Vector128.CreateScalar(mtx.MatrixRShift); Vector128<ushort> clMin = Vector128.Create((ushort)slot.SlotConfig.SoftClampLow); Vector128<ushort> 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 f072fa36..fe9b834b 100644 --- a/Ryujinx.Graphics.Vic/Ryujinx.Graphics.Vic.csproj +++ b/Ryujinx.Graphics.Vic/Ryujinx.Graphics.Vic.csproj @@ -1,14 +1,7 @@ <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> - <TargetFramework>netcoreapp3.1</TargetFramework> - </PropertyGroup> - - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'"> - <AllowUnsafeBlocks>true</AllowUnsafeBlocks> - </PropertyGroup> - - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'"> + <TargetFramework>net5.0</TargetFramework> <AllowUnsafeBlocks>true</AllowUnsafeBlocks> </PropertyGroup> |
