Structural and Memory Safety Improvements, Analyzer Cleanup (ryubing/ryujinx!47)

See merge request ryubing/ryujinx!47
This commit is contained in:
MrKev 2025-06-11 17:58:27 -05:00 committed by LotP
parent d03ae9c164
commit ea027d65a7
309 changed files with 1018 additions and 1247 deletions

View file

@ -4,10 +4,9 @@ namespace Ryujinx.Graphics.Vic.Types
{
readonly struct ClearRectStruct
{
#pragma warning disable CS0649 // Field is never assigned to
private readonly long _word0;
private readonly long _word1;
#pragma warning restore CS0649
public int ClearRect0Left => (int)_word0.Extract(0, 14);
public int ClearRect0Right => (int)_word0.Extract(16, 14);

View file

@ -4,13 +4,13 @@ namespace Ryujinx.Graphics.Vic.Types
{
struct ConfigStruct
{
#pragma warning disable CS0649 // Field is never assigned to
public PipeConfig PipeConfig;
public OutputConfig OutputConfig;
public OutputSurfaceConfig OutputSurfaceConfig;
public MatrixStruct OutColorMatrix;
public Array4<ClearRectStruct> ClearRectStruct;
public Array8<SlotStruct> SlotStruct;
#pragma warning restore CS0649
}
}

View file

@ -4,10 +4,9 @@ namespace Ryujinx.Graphics.Vic.Types
{
readonly struct OutputConfig
{
#pragma warning disable CS0649 // Field is never assigned to
private readonly long _word0;
private readonly long _word1;
#pragma warning restore CS0649
public int AlphaFillMode => (int)_word0.Extract(0, 3);
public int AlphaFillSlot => (int)_word0.Extract(3, 3);

View file

@ -4,10 +4,9 @@ namespace Ryujinx.Graphics.Vic.Types
{
readonly struct OutputSurfaceConfig
{
#pragma warning disable CS0649 // Field is never assigned to
private readonly long _word0;
private readonly long _word1;
#pragma warning restore CS0649
public PixelFormat OutPixelFormat => (PixelFormat)_word0.Extract(0, 7);
public int OutChromaLocHoriz => (int)_word0.Extract(7, 2);

View file

@ -1,13 +1,13 @@
using Ryujinx.Common.Utilities;
using System.Runtime.InteropServices;
namespace Ryujinx.Graphics.Vic.Types
{
[StructLayout(LayoutKind.Sequential, Pack = 1)]
readonly struct PipeConfig
{
#pragma warning disable CS0169, CS0649, IDE0051 // Remove unused private member
private readonly long _word0;
private readonly long _word1;
#pragma warning restore CS0169, CS0649, IDE0051
public int DownsampleHoriz => (int)_word0.Extract(0, 11);
public int DownsampleVert => (int)_word0.Extract(16, 11);

View file

@ -11,9 +11,8 @@ namespace Ryujinx.Graphics.Vic.Types
private readonly long _word4;
private readonly long _word5;
private readonly long _word6;
#pragma warning disable IDE0051 // Remove unused private member
private readonly long _word7;
#pragma warning restore IDE0051
public bool SlotEnable => _word0.Extract(0);
public bool DeNoise => _word0.Extract(1);

View file

@ -4,16 +4,16 @@ namespace Ryujinx.Graphics.Vic
{
struct PlaneOffsets
{
#pragma warning disable CS0649 // Field is never assigned to
public uint LumaOffset;
public uint ChromaUOffset;
public uint ChromaVOffset;
#pragma warning restore CS0649
}
struct VicRegisters
{
#pragma warning disable CS0649 // Field is never assigned to
public Array64<uint> Reserved0;
public uint Nop;
public Array15<uint> Reserved104;
@ -46,6 +46,6 @@ namespace Ryujinx.Graphics.Vic
public Array8<uint> SetSlotContextId;
public Array8<uint> SetCompTagBufferOffset;
public Array8<uint> SetHistoryBufferOffset;
#pragma warning restore CS0649
}
}