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

@ -705,7 +705,7 @@ namespace Ryujinx.Graphics.Gpu.Memory
{
BufferHandle handle = Handle;
return (ulong address, ulong size, ulong _) =>
return (address, size, _) =>
{
FlushImpl(handle, address, size);
};

View file

@ -63,7 +63,7 @@ namespace Ryujinx.Graphics.Gpu.Memory
// Backend managed is always auto, unified memory is always host.
_desiredType = BufferBackingType.HostMemory;
_canSwap = _systemMemoryType != SystemMemoryType.BackendManaged && _systemMemoryType != SystemMemoryType.UnifiedMemory;
_canSwap = _systemMemoryType is not SystemMemoryType.BackendManaged and not SystemMemoryType.UnifiedMemory;
if (_canSwap)
{

View file

@ -29,10 +29,7 @@ namespace Ryujinx.Graphics.Gpu.Memory
StorageRead = 0x40,
StorageWrite = 0x80,
#pragma warning disable CA1069 // Enums values should not be duplicated
StorageAtomic = 0xc0
#pragma warning restore CA1069 // Enums values should not be duplicated
}
/// <summary>

View file

@ -76,7 +76,7 @@ namespace Ryujinx.Graphics.Gpu.Memory
BufferRange range = new(_handle, 0, data.Length);
_renderer.Pipeline.SetUniformBuffers([new BufferAssignment(0, range)]);
}
};
}
_renderer.SetBufferData(_handle, _startOffset, data[_startOffset.._endOffset]);

View file

@ -157,6 +157,7 @@ namespace Ryujinx.Graphics.Gpu.Memory
{
_cpuMemory.GetSpan(currentRange.Address, size, tracked).CopyTo(data.Slice(offset, size));
}
offset += size;
}
@ -204,6 +205,7 @@ namespace Ryujinx.Graphics.Gpu.Memory
{
GetSpan(currentRange.Address, size).CopyTo(memorySpan.Slice(offset, size));
}
offset += size;
}
@ -339,6 +341,7 @@ namespace Ryujinx.Graphics.Gpu.Memory
{
writeCallback(currentRange.Address, data.Slice(offset, size));
}
offset += size;
}
}

View file

@ -262,7 +262,7 @@ namespace Ryujinx.Graphics.Gpu.Memory
/// <returns>True if pitch, false otherwise</returns>
public static bool IsPitch(this PteKind kind)
{
return kind == PteKind.Pitch || kind == PteKind.PitchNoSwizzle;
return kind is PteKind.Pitch or PteKind.PitchNoSwizzle;
}
}
}