Fix ~3500 analyser issues

See merge request ryubing/ryujinx!44
This commit is contained in:
MrKev
2025-05-30 17:08:34 -05:00
committed by LotP
parent 417df486b1
commit 361d0c5632
622 changed files with 3080 additions and 2652 deletions

View File

@@ -454,6 +454,7 @@ namespace Ryujinx.Graphics.Gpu.Image
// If this is null, a request was already queued to decrement reference.
texture.DecrementReferenceCount(this, request.ID);
}
continue;
}
}
@@ -544,7 +545,7 @@ namespace Ryujinx.Graphics.Gpu.Image
int width = target == Target.TextureBuffer ? descriptor.UnpackBufferTextureWidth() : descriptor.UnpackWidth();
int height = descriptor.UnpackHeight();
if (target == Target.Texture2DMultisample || target == Target.Texture2DMultisampleArray)
if (target is Target.Texture2DMultisample or Target.Texture2DMultisampleArray)
{
// This is divided back before the backend texture is created.
width *= samplesInX;
@@ -699,8 +700,8 @@ namespace Ryujinx.Graphics.Gpu.Image
{
int maxSize = width;
if (target != Target.Texture1D &&
target != Target.Texture1DArray)
if (target is not Target.Texture1D and
not Target.Texture1DArray)
{
maxSize = Math.Max(maxSize, height);
}
@@ -761,8 +762,8 @@ namespace Ryujinx.Graphics.Gpu.Image
/// <returns>True if the swizzle component is equal to the red or green, false otherwise</returns>
private static bool IsRG(SwizzleComponent component)
{
return component == SwizzleComponent.Red ||
component == SwizzleComponent.Green;
return component is SwizzleComponent.Red or
SwizzleComponent.Green;
}
/// <summary>