From aa129fdbdfd424f73da2b187fc28855f8ae90059 Mon Sep 17 00:00:00 2001 From: Mary Date: Sun, 15 Nov 2020 19:27:15 +0100 Subject: 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 --- Ryujinx.Graphics.Vic/Blender.cs | 37 +++++++++++++++++++++--- Ryujinx.Graphics.Vic/Ryujinx.Graphics.Vic.csproj | 9 +----- 2 files changed, 34 insertions(+), 12 deletions(-) (limited to 'Ryujinx.Graphics.Vic') 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 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 f072fa36..fe9b834b 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 -- cgit v1.2.3