aboutsummaryrefslogtreecommitdiff
path: root/src/Ryujinx.Graphics.Texture
diff options
context:
space:
mode:
authorZoltan Csizmadia <zcsizmadia@gmail.com>2023-11-15 10:41:31 -0600
committerGitHub <noreply@github.com>2023-11-15 17:41:31 +0100
commit29e192f241136ce910071ff4fdedda5bd1d9b838 (patch)
tree4d729880c4e4a7693d9d6255490642771ed2ef09 /src/Ryujinx.Graphics.Texture
parent5b3662b793b3a34acc12c45c3c1691b7302d4b1d (diff)
Migrate to .NET 8 (#5887)
* Change TargetFramework to net8.0 * Disable info messages * Fix warings * Disable additional analyzer messages * Fix typo * Add whitespace * Fix ref vs in warnings * Use explicit [In] on array parameters * No need to guard Remove with Contains * Use 'ArgumentOutOfRangeException.ThrowIf...' instead of explicitly throwing a new exception instance * Bump .NET SDK version * Enable JsonSerializerIsReflectionEnabledByDefault * Use 8.0.100 GA release * Bump System package versions --------- Co-authored-by: Zoltan Csizmadia <Zoltan.Csizmadia@vericast.com>
Diffstat (limited to 'src/Ryujinx.Graphics.Texture')
-rw-r--r--src/Ryujinx.Graphics.Texture/Ryujinx.Graphics.Texture.csproj2
-rw-r--r--src/Ryujinx.Graphics.Texture/Utils/RgbaColor32.cs9
2 files changed, 6 insertions, 5 deletions
diff --git a/src/Ryujinx.Graphics.Texture/Ryujinx.Graphics.Texture.csproj b/src/Ryujinx.Graphics.Texture/Ryujinx.Graphics.Texture.csproj
index 70e3453c..51721490 100644
--- a/src/Ryujinx.Graphics.Texture/Ryujinx.Graphics.Texture.csproj
+++ b/src/Ryujinx.Graphics.Texture/Ryujinx.Graphics.Texture.csproj
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFramework>net7.0</TargetFramework>
+ <TargetFramework>net8.0</TargetFramework>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
diff --git a/src/Ryujinx.Graphics.Texture/Utils/RgbaColor32.cs b/src/Ryujinx.Graphics.Texture/Utils/RgbaColor32.cs
index de7c9262..8ca3f89b 100644
--- a/src/Ryujinx.Graphics.Texture/Utils/RgbaColor32.cs
+++ b/src/Ryujinx.Graphics.Texture/Utils/RgbaColor32.cs
@@ -1,4 +1,5 @@
using System;
+using System.Diagnostics.CodeAnalysis;
using System.Runtime.CompilerServices;
using System.Runtime.Intrinsics;
using System.Runtime.Intrinsics.X86;
@@ -102,11 +103,11 @@ namespace Ryujinx.Graphics.Texture.Utils
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static RgbaColor32 operator <<(RgbaColor32 x, int shift)
+ public static RgbaColor32 operator <<(RgbaColor32 x, [ConstantExpected] byte shift)
{
if (Sse2.IsSupported)
{
- return new RgbaColor32(Sse2.ShiftLeftLogical(x._color, (byte)shift));
+ return new RgbaColor32(Sse2.ShiftLeftLogical(x._color, shift));
}
else
{
@@ -115,11 +116,11 @@ namespace Ryujinx.Graphics.Texture.Utils
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static RgbaColor32 operator >>(RgbaColor32 x, int shift)
+ public static RgbaColor32 operator >>(RgbaColor32 x, [ConstantExpected] byte shift)
{
if (Sse2.IsSupported)
{
- return new RgbaColor32(Sse2.ShiftRightLogical(x._color, (byte)shift));
+ return new RgbaColor32(Sse2.ShiftRightLogical(x._color, shift));
}
else
{