diff --git a/Ryujinx.Common/Memory/StructArrayHelpers.cs b/Ryujinx.Common/Memory/StructArrayHelpers.cs index eb8d3ce1bd..1498ac4717 100644 --- a/Ryujinx.Common/Memory/StructArrayHelpers.cs +++ b/Ryujinx.Common/Memory/StructArrayHelpers.cs @@ -12,504 +12,630 @@ namespace Ryujinx.Common.Memory } public struct Array2 : IArray where T : unmanaged { +#pragma warning disable CS0169 T _e0; Array1 _other; +#pragma warning restore CS0169 public int Length => 2; public ref T this[int index] => ref ToSpan()[index]; public Span ToSpan() => MemoryMarshal.CreateSpan(ref _e0, 2); } public struct Array3 : IArray where T : unmanaged { +#pragma warning disable CS0169 T _e0; Array2 _other; +#pragma warning restore CS0169 public int Length => 3; public ref T this[int index] => ref ToSpan()[index]; public Span ToSpan() => MemoryMarshal.CreateSpan(ref _e0, 3); } public struct Array4 : IArray where T : unmanaged { +#pragma warning disable CS0169 T _e0; Array3 _other; +#pragma warning restore CS0169 public int Length => 4; public ref T this[int index] => ref ToSpan()[index]; public Span ToSpan() => MemoryMarshal.CreateSpan(ref _e0, 4); } public struct Array5 : IArray where T : unmanaged { +#pragma warning disable CS0169 T _e0; Array4 _other; +#pragma warning restore CS0169 public int Length => 5; public ref T this[int index] => ref ToSpan()[index]; public Span ToSpan() => MemoryMarshal.CreateSpan(ref _e0, 5); } public struct Array6 : IArray where T : unmanaged { +#pragma warning disable CS0169 T _e0; Array5 _other; +#pragma warning restore CS0169 public int Length => 6; public ref T this[int index] => ref ToSpan()[index]; public Span ToSpan() => MemoryMarshal.CreateSpan(ref _e0, 6); } public struct Array7 : IArray where T : unmanaged { +#pragma warning disable CS0169 T _e0; Array6 _other; +#pragma warning restore CS0169 public int Length => 7; public ref T this[int index] => ref ToSpan()[index]; public Span ToSpan() => MemoryMarshal.CreateSpan(ref _e0, 7); } public struct Array8 : IArray where T : unmanaged { +#pragma warning disable CS0169 T _e0; Array7 _other; +#pragma warning restore CS0169 public int Length => 8; public ref T this[int index] => ref ToSpan()[index]; public Span ToSpan() => MemoryMarshal.CreateSpan(ref _e0, 8); } public struct Array9 : IArray where T : unmanaged { +#pragma warning disable CS0169 T _e0; Array8 _other; +#pragma warning restore CS0169 public int Length => 9; public ref T this[int index] => ref ToSpan()[index]; public Span ToSpan() => MemoryMarshal.CreateSpan(ref _e0, 9); } public struct Array10 : IArray where T : unmanaged { +#pragma warning disable CS0169 T _e0; Array9 _other; +#pragma warning restore CS0169 public int Length => 10; public ref T this[int index] => ref ToSpan()[index]; public Span ToSpan() => MemoryMarshal.CreateSpan(ref _e0, 10); } public struct Array11 : IArray where T : unmanaged { +#pragma warning disable CS0169 T _e0; Array10 _other; +#pragma warning restore CS0169 public int Length => 11; public ref T this[int index] => ref ToSpan()[index]; public Span ToSpan() => MemoryMarshal.CreateSpan(ref _e0, 11); } public struct Array12 : IArray where T : unmanaged { +#pragma warning disable CS0169 T _e0; Array11 _other; +#pragma warning restore CS0169 public int Length => 12; public ref T this[int index] => ref ToSpan()[index]; public Span ToSpan() => MemoryMarshal.CreateSpan(ref _e0, 12); } public struct Array13 : IArray where T : unmanaged { +#pragma warning disable CS0169 T _e0; Array12 _other; +#pragma warning restore CS0169 public int Length => 13; public ref T this[int index] => ref ToSpan()[index]; public Span ToSpan() => MemoryMarshal.CreateSpan(ref _e0, 13); } public struct Array14 : IArray where T : unmanaged { +#pragma warning disable CS0169 T _e0; Array13 _other; +#pragma warning restore CS0169 public int Length => 14; public ref T this[int index] => ref ToSpan()[index]; public Span ToSpan() => MemoryMarshal.CreateSpan(ref _e0, 14); } public struct Array15 : IArray where T : unmanaged { +#pragma warning disable CS0169 T _e0; Array14 _other; +#pragma warning restore CS0169 public int Length => 15; public ref T this[int index] => ref ToSpan()[index]; public Span ToSpan() => MemoryMarshal.CreateSpan(ref _e0, 15); } public struct Array16 : IArray where T : unmanaged { +#pragma warning disable CS0169 T _e0; Array15 _other; +#pragma warning restore CS0169 public int Length => 16; public ref T this[int index] => ref ToSpan()[index]; public Span ToSpan() => MemoryMarshal.CreateSpan(ref _e0, 16); } public struct Array17 : IArray where T : unmanaged { +#pragma warning disable CS0169 T _e0; Array16 _other; +#pragma warning restore CS0169 public int Length => 17; public ref T this[int index] => ref ToSpan()[index]; public Span ToSpan() => MemoryMarshal.CreateSpan(ref _e0, 17); } public struct Array18 : IArray where T : unmanaged { +#pragma warning disable CS0169 T _e0; Array17 _other; +#pragma warning restore CS0169 public int Length => 18; public ref T this[int index] => ref ToSpan()[index]; public Span ToSpan() => MemoryMarshal.CreateSpan(ref _e0, 18); } public struct Array19 : IArray where T : unmanaged { +#pragma warning disable CS0169 T _e0; Array18 _other; +#pragma warning restore CS0169 public int Length => 19; public ref T this[int index] => ref ToSpan()[index]; public Span ToSpan() => MemoryMarshal.CreateSpan(ref _e0, 19); } public struct Array20 : IArray where T : unmanaged { +#pragma warning disable CS0169 T _e0; Array19 _other; +#pragma warning restore CS0169 public int Length => 20; public ref T this[int index] => ref ToSpan()[index]; public Span ToSpan() => MemoryMarshal.CreateSpan(ref _e0, 20); } public struct Array21 : IArray where T : unmanaged { +#pragma warning disable CS0169 T _e0; Array20 _other; +#pragma warning restore CS0169 public int Length => 21; public ref T this[int index] => ref ToSpan()[index]; public Span ToSpan() => MemoryMarshal.CreateSpan(ref _e0, 21); } public struct Array22 : IArray where T : unmanaged { +#pragma warning disable CS0169 T _e0; Array21 _other; +#pragma warning restore CS0169 public int Length => 22; public ref T this[int index] => ref ToSpan()[index]; public Span ToSpan() => MemoryMarshal.CreateSpan(ref _e0, 22); } public struct Array23 : IArray where T : unmanaged { +#pragma warning disable CS0169 T _e0; Array22 _other; +#pragma warning restore CS0169 public int Length => 23; public ref T this[int index] => ref ToSpan()[index]; public Span ToSpan() => MemoryMarshal.CreateSpan(ref _e0, 23); } public struct Array24 : IArray where T : unmanaged { +#pragma warning disable CS0169 T _e0; Array23 _other; +#pragma warning restore CS0169 public int Length => 24; public ref T this[int index] => ref ToSpan()[index]; public Span ToSpan() => MemoryMarshal.CreateSpan(ref _e0, 24); } public struct Array25 : IArray where T : unmanaged { +#pragma warning disable CS0169 T _e0; Array24 _other; +#pragma warning restore CS0169 public int Length => 25; public ref T this[int index] => ref ToSpan()[index]; public Span ToSpan() => MemoryMarshal.CreateSpan(ref _e0, 25); } public struct Array26 : IArray where T : unmanaged { +#pragma warning disable CS0169 T _e0; Array25 _other; +#pragma warning restore CS0169 public int Length => 26; public ref T this[int index] => ref ToSpan()[index]; public Span ToSpan() => MemoryMarshal.CreateSpan(ref _e0, 26); } public struct Array27 : IArray where T : unmanaged { +#pragma warning disable CS0169 T _e0; Array26 _other; +#pragma warning restore CS0169 public int Length => 27; public ref T this[int index] => ref ToSpan()[index]; public Span ToSpan() => MemoryMarshal.CreateSpan(ref _e0, 27); } public struct Array28 : IArray where T : unmanaged { +#pragma warning disable CS0169 T _e0; Array27 _other; +#pragma warning restore CS0169 public int Length => 28; public ref T this[int index] => ref ToSpan()[index]; public Span ToSpan() => MemoryMarshal.CreateSpan(ref _e0, 28); } public struct Array29 : IArray where T : unmanaged { +#pragma warning disable CS0169 T _e0; Array28 _other; +#pragma warning restore CS0169 public int Length => 29; public ref T this[int index] => ref ToSpan()[index]; public Span ToSpan() => MemoryMarshal.CreateSpan(ref _e0, 29); } public struct Array30 : IArray where T : unmanaged { +#pragma warning disable CS0169 T _e0; Array29 _other; +#pragma warning restore CS0169 public int Length => 30; public ref T this[int index] => ref ToSpan()[index]; public Span ToSpan() => MemoryMarshal.CreateSpan(ref _e0, 30); } public struct Array31 : IArray where T : unmanaged { +#pragma warning disable CS0169 T _e0; Array30 _other; +#pragma warning restore CS0169 public int Length => 31; public ref T this[int index] => ref ToSpan()[index]; public Span ToSpan() => MemoryMarshal.CreateSpan(ref _e0, 31); } public struct Array32 : IArray where T : unmanaged { +#pragma warning disable CS0169 T _e0; Array31 _other; +#pragma warning restore CS0169 public int Length => 32; public ref T this[int index] => ref ToSpan()[index]; public Span ToSpan() => MemoryMarshal.CreateSpan(ref _e0, 32); } public struct Array33 : IArray where T : unmanaged { +#pragma warning disable CS0169 T _e0; Array32 _other; +#pragma warning restore CS0169 public int Length => 33; public ref T this[int index] => ref ToSpan()[index]; public Span ToSpan() => MemoryMarshal.CreateSpan(ref _e0, 33); } public struct Array34 : IArray where T : unmanaged { +#pragma warning disable CS0169 T _e0; Array33 _other; +#pragma warning restore CS0169 public int Length => 34; public ref T this[int index] => ref ToSpan()[index]; public Span ToSpan() => MemoryMarshal.CreateSpan(ref _e0, 34); } public struct Array35 : IArray where T : unmanaged { +#pragma warning disable CS0169 T _e0; Array34 _other; +#pragma warning restore CS0169 public int Length => 35; public ref T this[int index] => ref ToSpan()[index]; public Span ToSpan() => MemoryMarshal.CreateSpan(ref _e0, 35); } public struct Array36 : IArray where T : unmanaged { +#pragma warning disable CS0169 T _e0; Array35 _other; +#pragma warning restore CS0169 public int Length => 36; public ref T this[int index] => ref ToSpan()[index]; public Span ToSpan() => MemoryMarshal.CreateSpan(ref _e0, 36); } public struct Array37 : IArray where T : unmanaged { +#pragma warning disable CS0169 T _e0; Array36 _other; +#pragma warning restore CS0169 public int Length => 37; public ref T this[int index] => ref ToSpan()[index]; public Span ToSpan() => MemoryMarshal.CreateSpan(ref _e0, 37); } public struct Array38 : IArray where T : unmanaged { +#pragma warning disable CS0169 T _e0; Array37 _other; +#pragma warning restore CS0169 public int Length => 38; public ref T this[int index] => ref ToSpan()[index]; public Span ToSpan() => MemoryMarshal.CreateSpan(ref _e0, 38); } public struct Array39 : IArray where T : unmanaged { +#pragma warning disable CS0169 T _e0; Array38 _other; +#pragma warning restore CS0169 public int Length => 39; public ref T this[int index] => ref ToSpan()[index]; public Span ToSpan() => MemoryMarshal.CreateSpan(ref _e0, 39); } public struct Array40 : IArray where T : unmanaged { +#pragma warning disable CS0169 T _e0; Array39 _other; +#pragma warning restore CS0169 public int Length => 40; public ref T this[int index] => ref ToSpan()[index]; public Span ToSpan() => MemoryMarshal.CreateSpan(ref _e0, 40); } public struct Array41 : IArray where T : unmanaged { +#pragma warning disable CS0169 T _e0; Array40 _other; +#pragma warning restore CS0169 public int Length => 41; public ref T this[int index] => ref ToSpan()[index]; public Span ToSpan() => MemoryMarshal.CreateSpan(ref _e0, 41); } public struct Array42 : IArray where T : unmanaged { +#pragma warning disable CS0169 T _e0; Array41 _other; +#pragma warning restore CS0169 public int Length => 42; public ref T this[int index] => ref ToSpan()[index]; public Span ToSpan() => MemoryMarshal.CreateSpan(ref _e0, 42); } public struct Array43 : IArray where T : unmanaged { +#pragma warning disable CS0169 T _e0; Array42 _other; +#pragma warning restore CS0169 public int Length => 43; public ref T this[int index] => ref ToSpan()[index]; public Span ToSpan() => MemoryMarshal.CreateSpan(ref _e0, 43); } public struct Array44 : IArray where T : unmanaged { +#pragma warning disable CS0169 T _e0; Array43 _other; +#pragma warning restore CS0169 public int Length => 44; public ref T this[int index] => ref ToSpan()[index]; public Span ToSpan() => MemoryMarshal.CreateSpan(ref _e0, 44); } public struct Array45 : IArray where T : unmanaged { +#pragma warning disable CS0169 T _e0; Array44 _other; +#pragma warning restore CS0169 public int Length => 45; public ref T this[int index] => ref ToSpan()[index]; public Span ToSpan() => MemoryMarshal.CreateSpan(ref _e0, 45); } public struct Array46 : IArray where T : unmanaged { +#pragma warning disable CS0169 T _e0; Array45 _other; +#pragma warning restore CS0169 public int Length => 46; public ref T this[int index] => ref ToSpan()[index]; public Span ToSpan() => MemoryMarshal.CreateSpan(ref _e0, 46); } public struct Array47 : IArray where T : unmanaged { +#pragma warning disable CS0169 T _e0; Array46 _other; +#pragma warning restore CS0169 public int Length => 47; public ref T this[int index] => ref ToSpan()[index]; public Span ToSpan() => MemoryMarshal.CreateSpan(ref _e0, 47); } public struct Array48 : IArray where T : unmanaged { +#pragma warning disable CS0169 T _e0; Array47 _other; +#pragma warning restore CS0169 public int Length => 48; public ref T this[int index] => ref ToSpan()[index]; public Span ToSpan() => MemoryMarshal.CreateSpan(ref _e0, 48); } public struct Array49 : IArray where T : unmanaged { +#pragma warning disable CS0169 T _e0; Array48 _other; +#pragma warning restore CS0169 public int Length => 49; public ref T this[int index] => ref ToSpan()[index]; public Span ToSpan() => MemoryMarshal.CreateSpan(ref _e0, 49); } public struct Array50 : IArray where T : unmanaged { +#pragma warning disable CS0169 T _e0; Array49 _other; +#pragma warning restore CS0169 public int Length => 50; public ref T this[int index] => ref ToSpan()[index]; public Span ToSpan() => MemoryMarshal.CreateSpan(ref _e0, 50); } public struct Array51 : IArray where T : unmanaged { +#pragma warning disable CS0169 T _e0; Array50 _other; +#pragma warning restore CS0169 public int Length => 51; public ref T this[int index] => ref ToSpan()[index]; public Span ToSpan() => MemoryMarshal.CreateSpan(ref _e0, 51); } public struct Array52 : IArray where T : unmanaged { +#pragma warning disable CS0169 T _e0; Array51 _other; +#pragma warning restore CS0169 public int Length => 52; public ref T this[int index] => ref ToSpan()[index]; public Span ToSpan() => MemoryMarshal.CreateSpan(ref _e0, 52); } public struct Array53 : IArray where T : unmanaged { +#pragma warning disable CS0169 T _e0; Array52 _other; +#pragma warning restore CS0169 public int Length => 53; public ref T this[int index] => ref ToSpan()[index]; public Span ToSpan() => MemoryMarshal.CreateSpan(ref _e0, 53); } public struct Array54 : IArray where T : unmanaged { +#pragma warning disable CS0169 T _e0; Array53 _other; +#pragma warning restore CS0169 public int Length => 54; public ref T this[int index] => ref ToSpan()[index]; public Span ToSpan() => MemoryMarshal.CreateSpan(ref _e0, 54); } public struct Array55 : IArray where T : unmanaged { +#pragma warning disable CS0169 T _e0; Array54 _other; +#pragma warning restore CS0169 public int Length => 55; public ref T this[int index] => ref ToSpan()[index]; public Span ToSpan() => MemoryMarshal.CreateSpan(ref _e0, 55); } public struct Array56 : IArray where T : unmanaged { +#pragma warning disable CS0169 T _e0; Array55 _other; +#pragma warning restore CS0169 public int Length => 56; public ref T this[int index] => ref ToSpan()[index]; public Span ToSpan() => MemoryMarshal.CreateSpan(ref _e0, 56); } public struct Array57 : IArray where T : unmanaged { +#pragma warning disable CS0169 T _e0; Array56 _other; +#pragma warning restore CS0169 public int Length => 57; public ref T this[int index] => ref ToSpan()[index]; public Span ToSpan() => MemoryMarshal.CreateSpan(ref _e0, 57); } public struct Array58 : IArray where T : unmanaged { +#pragma warning disable CS0169 T _e0; Array57 _other; +#pragma warning restore CS0169 public int Length => 58; public ref T this[int index] => ref ToSpan()[index]; public Span ToSpan() => MemoryMarshal.CreateSpan(ref _e0, 58); } public struct Array59 : IArray where T : unmanaged { +#pragma warning disable CS0169 T _e0; Array58 _other; +#pragma warning restore CS0169 public int Length => 59; public ref T this[int index] => ref ToSpan()[index]; public Span ToSpan() => MemoryMarshal.CreateSpan(ref _e0, 59); } public struct Array60 : IArray where T : unmanaged { +#pragma warning disable CS0169 T _e0; Array59 _other; +#pragma warning restore CS0169 public int Length => 60; public ref T this[int index] => ref ToSpan()[index]; public Span ToSpan() => MemoryMarshal.CreateSpan(ref _e0, 60); } public struct Array61 : IArray where T : unmanaged { +#pragma warning disable CS0169 T _e0; Array60 _other; +#pragma warning restore CS0169 public int Length => 61; public ref T this[int index] => ref ToSpan()[index]; public Span ToSpan() => MemoryMarshal.CreateSpan(ref _e0, 61); } public struct Array62 : IArray where T : unmanaged { +#pragma warning disable CS0169 T _e0; Array61 _other; +#pragma warning restore CS0169 public int Length => 62; public ref T this[int index] => ref ToSpan()[index]; public Span ToSpan() => MemoryMarshal.CreateSpan(ref _e0, 62); } public struct Array63 : IArray where T : unmanaged { +#pragma warning disable CS0169 T _e0; Array62 _other; +#pragma warning restore CS0169 public int Length => 63; public ref T this[int index] => ref ToSpan()[index]; public Span ToSpan() => MemoryMarshal.CreateSpan(ref _e0, 63); } public struct Array64 : IArray where T : unmanaged { +#pragma warning disable CS0169 T _e0; Array63 _other; +#pragma warning restore CS0169 public int Length => 64; public ref T this[int index] => ref ToSpan()[index]; public Span ToSpan() => MemoryMarshal.CreateSpan(ref _e0, 64); diff --git a/Ryujinx.Graphics.Gpu/Engine/GPFifo/CompressedMethod.cs b/Ryujinx.Graphics.Gpu/Engine/GPFifo/CompressedMethod.cs index 9a21348945..458dc8f6f5 100644 --- a/Ryujinx.Graphics.Gpu/Engine/GPFifo/CompressedMethod.cs +++ b/Ryujinx.Graphics.Gpu/Engine/GPFifo/CompressedMethod.cs @@ -25,7 +25,9 @@ namespace Ryujinx.Graphics.Gpu.Engine.GPFifo struct CompressedMethod { +#pragma warning disable CS0649 public uint Method; +#pragma warning restore CS0649 public int MethodAddressOld => (int)((Method >> 2) & 0x7FF); public int MethodAddress => (int)((Method >> 0) & 0xFFF); public int SubdeviceMask => (int)((Method >> 4) & 0xFFF); diff --git a/Ryujinx.Graphics.Gpu/Engine/GPFifo/GPEntry.cs b/Ryujinx.Graphics.Gpu/Engine/GPFifo/GPEntry.cs index 9866cd2e7b..b1b236e774 100644 --- a/Ryujinx.Graphics.Gpu/Engine/GPFifo/GPEntry.cs +++ b/Ryujinx.Graphics.Gpu/Engine/GPFifo/GPEntry.cs @@ -36,11 +36,15 @@ namespace Ryujinx.Graphics.Gpu.Engine.GPFifo struct GPEntry { +#pragma warning disable CS0649 public uint Entry0; +#pragma warning restore CS0649 public Entry0Fetch Entry0Fetch => (Entry0Fetch)((Entry0 >> 0) & 0x1); public int Entry0Get => (int)((Entry0 >> 2) & 0x3FFFFFFF); public int Entry0Operand => (int)(Entry0); +#pragma warning disable CS0649 public uint Entry1; +#pragma warning restore CS0649 public int Entry1GetHi => (int)((Entry1 >> 0) & 0xFF); public Entry1Priv Entry1Priv => (Entry1Priv)((Entry1 >> 8) & 0x1); public Entry1Level Entry1Level => (Entry1Level)((Entry1 >> 9) & 0x1); diff --git a/Ryujinx.Graphics.Gpu/Engine/GPFifo/GPFifoClassState.cs b/Ryujinx.Graphics.Gpu/Engine/GPFifo/GPFifoClassState.cs index 3b28266859..28dd15bd08 100644 --- a/Ryujinx.Graphics.Gpu/Engine/GPFifo/GPFifoClassState.cs +++ b/Ryujinx.Graphics.Gpu/Engine/GPFifo/GPFifoClassState.cs @@ -106,6 +106,7 @@ namespace Ryujinx.Graphics.Gpu.Engine.GPFifo struct GPFifoClassState { +#pragma warning disable CS0649 public uint SetObject; public int SetObjectNvclass => (int)((SetObject >> 0) & 0xFFFF); public int SetObjectEngine => (int)((SetObject >> 16) & 0x1F); @@ -182,5 +183,6 @@ namespace Ryujinx.Graphics.Gpu.Engine.GPFifo public uint LoadMmeStartAddressRamPointer; public uint LoadMmeStartAddressRam; public uint SetMmeShadowRamControl; +#pragma warning restore CS0649 } } diff --git a/Ryujinx.Graphics.Host1x/Host1xClassRegisters.cs b/Ryujinx.Graphics.Host1x/Host1xClassRegisters.cs index e476bdfab2..f9f4889be4 100644 --- a/Ryujinx.Graphics.Host1x/Host1xClassRegisters.cs +++ b/Ryujinx.Graphics.Host1x/Host1xClassRegisters.cs @@ -4,6 +4,7 @@ namespace Ryujinx.Graphics.Host1x { struct Host1xClassRegisters { +#pragma warning disable CS0649 public uint IncrSyncpt; public uint IncrSyncptCntrl; public uint IncrSyncptError; @@ -37,5 +38,6 @@ namespace Ryujinx.Graphics.Host1x public uint Xrefctrl; public uint ChannelXrefHi; public uint ChannelXrefLo; +#pragma warning restore CS0649 } } diff --git a/Ryujinx.Graphics.Host1x/ThiRegisters.cs b/Ryujinx.Graphics.Host1x/ThiRegisters.cs index 00c93182bc..71c4851102 100644 --- a/Ryujinx.Graphics.Host1x/ThiRegisters.cs +++ b/Ryujinx.Graphics.Host1x/ThiRegisters.cs @@ -4,6 +4,7 @@ namespace Ryujinx.Graphics.Host1x { struct ThiRegisters { +#pragma warning disable CS0649 public uint IncrSyncpt; public uint Reserved4; public uint IncrSyncptErr; @@ -18,5 +19,6 @@ namespace Ryujinx.Graphics.Host1x public Array12 Reserved48; public uint IntStatus; public uint IntMask; +#pragma warning restore CS0649 } } diff --git a/Ryujinx.Graphics.Nvdec.Vp9/Common/MemoryUtil.cs b/Ryujinx.Graphics.Nvdec.Vp9/Common/MemoryUtil.cs index e53ec9bd4b..909a948329 100644 --- a/Ryujinx.Graphics.Nvdec.Vp9/Common/MemoryUtil.cs +++ b/Ryujinx.Graphics.Nvdec.Vp9/Common/MemoryUtil.cs @@ -1,6 +1,4 @@ -using Ryujinx.Common.Memory; -using System; -using System.Runtime.CompilerServices; +using System; using System.Runtime.InteropServices; namespace Ryujinx.Graphics.Nvdec.Vp9.Common diff --git a/Ryujinx.Graphics.Nvdec.Vp9/Constants.cs b/Ryujinx.Graphics.Nvdec.Vp9/Constants.cs index 407e6f42ed..aaf1d7b983 100644 --- a/Ryujinx.Graphics.Nvdec.Vp9/Constants.cs +++ b/Ryujinx.Graphics.Nvdec.Vp9/Constants.cs @@ -1,6 +1,4 @@ -using Ryujinx.Graphics.Nvdec.Vp9.Types; - -namespace Ryujinx.Graphics.Nvdec.Vp9 +namespace Ryujinx.Graphics.Nvdec.Vp9 { internal static class Constants { diff --git a/Ryujinx.Graphics.Nvdec.Vp9/TileWorkerData.cs b/Ryujinx.Graphics.Nvdec.Vp9/TileWorkerData.cs index 2a4837026d..4055727420 100644 --- a/Ryujinx.Graphics.Nvdec.Vp9/TileWorkerData.cs +++ b/Ryujinx.Graphics.Nvdec.Vp9/TileWorkerData.cs @@ -1,7 +1,6 @@ using Ryujinx.Common.Memory; using Ryujinx.Graphics.Nvdec.Vp9.Dsp; using Ryujinx.Graphics.Nvdec.Vp9.Types; -using Ryujinx.Graphics.Video; namespace Ryujinx.Graphics.Nvdec.Vp9 { diff --git a/Ryujinx.Graphics.Nvdec.Vp9/Types/LoopFilterThresh.cs b/Ryujinx.Graphics.Nvdec.Vp9/Types/LoopFilterThresh.cs index bea1d1159d..edd79af4a6 100644 --- a/Ryujinx.Graphics.Nvdec.Vp9/Types/LoopFilterThresh.cs +++ b/Ryujinx.Graphics.Nvdec.Vp9/Types/LoopFilterThresh.cs @@ -6,8 +6,10 @@ namespace Ryujinx.Graphics.Nvdec.Vp9.Types // passed it can be loaded into vector registers. internal struct LoopFilterThresh { +#pragma warning disable CS0649 public Array16 Mblim; public Array16 Lim; public Array16 HevThr; +#pragma warning restore CS0649 } } diff --git a/Ryujinx.Graphics.Nvdec.Vp9/Types/Vp9Common.cs b/Ryujinx.Graphics.Nvdec.Vp9/Types/Vp9Common.cs index 0dafb82041..f33ea93feb 100644 --- a/Ryujinx.Graphics.Nvdec.Vp9/Types/Vp9Common.cs +++ b/Ryujinx.Graphics.Nvdec.Vp9/Types/Vp9Common.cs @@ -89,7 +89,6 @@ namespace Ryujinx.Graphics.Nvdec.Vp9.Types public ArrayPtr AboveSegContext; public ArrayPtr AboveContext; - public int AboveContextAllocCols; public bool FrameIsIntraOnly() { diff --git a/Ryujinx.Graphics.Nvdec/NvdecRegisters.cs b/Ryujinx.Graphics.Nvdec/NvdecRegisters.cs index b40e08b009..84b2c4e07e 100644 --- a/Ryujinx.Graphics.Nvdec/NvdecRegisters.cs +++ b/Ryujinx.Graphics.Nvdec/NvdecRegisters.cs @@ -3,13 +3,15 @@ namespace Ryujinx.Graphics.Nvdec { // Note: Most of those names are not official. - unsafe struct NvdecRegisters + struct NvdecRegisters { - public fixed uint Reserved0[128]; +#pragma warning disable CS0649 + public Array64 Reserved0; + public Array64 Reserved100; public uint SetCodecID; - public fixed uint Reserved204[63]; + public Array63 Reserved204; public uint Execute; - public fixed uint Reserved304[63]; + public Array63 Reserved304; public uint SetPlatformID; public uint SetPictureInfoOffset; public uint SetBitstreamOffset; @@ -37,5 +39,6 @@ namespace Ryujinx.Graphics.Nvdec public uint SetVp9LastFrameMvsOffset; public uint SetVp9CurrFrameMvsOffset; public uint Unknown5DC; +#pragma warning restore CS0649 } } diff --git a/Ryujinx.Graphics.Nvdec/Types/H264/PictureInfo.cs b/Ryujinx.Graphics.Nvdec/Types/H264/PictureInfo.cs index 92767e3591..86570342ef 100644 --- a/Ryujinx.Graphics.Nvdec/Types/H264/PictureInfo.cs +++ b/Ryujinx.Graphics.Nvdec/Types/H264/PictureInfo.cs @@ -5,6 +5,7 @@ namespace Ryujinx.Graphics.Nvdec.Types.H264 { struct PictureInfo { +#pragma warning disable CS0169, CS0649 Array18 Unknown0; public uint BitstreamSize; public uint NumSlices; @@ -47,6 +48,7 @@ namespace Ryujinx.Graphics.Nvdec.Types.H264 public Array16 MvcextViewRefMasksL1; public uint Flags2; public Array10 Unknown2D4; +#pragma warning restore CS0169, CS0649 public bool MbAdaptiveFrameFieldFlag => (Flags & (1 << 0)) != 0; public bool Direct8x8InferenceFlag => (Flags & (1 << 1)) != 0; diff --git a/Ryujinx.Graphics.Nvdec/Types/H264/ReferenceFrame.cs b/Ryujinx.Graphics.Nvdec/Types/H264/ReferenceFrame.cs index 5db311aee3..163a8783e6 100644 --- a/Ryujinx.Graphics.Nvdec/Types/H264/ReferenceFrame.cs +++ b/Ryujinx.Graphics.Nvdec/Types/H264/ReferenceFrame.cs @@ -2,9 +2,11 @@ { struct ReferenceFrame { +#pragma warning disable CS0649 public uint Unknown0; public uint Unknown4; public uint Unknown8; public uint UnknownC; +#pragma warning restore CS0649 } } diff --git a/Ryujinx.Graphics.Nvdec/Types/Vp9/EntropyProbs.cs b/Ryujinx.Graphics.Nvdec/Types/Vp9/EntropyProbs.cs index bc8484547f..b2858d2d83 100644 --- a/Ryujinx.Graphics.Nvdec/Types/Vp9/EntropyProbs.cs +++ b/Ryujinx.Graphics.Nvdec/Types/Vp9/EntropyProbs.cs @@ -5,6 +5,7 @@ namespace Ryujinx.Graphics.Nvdec.Types.Vp9 { struct EntropyProbs { +#pragma warning disable CS0649 public Array10>> KfYModeProbE0ToE7; public Array10> KfYModeProbE8; public Array3 Padding384; @@ -41,6 +42,7 @@ namespace Ryujinx.Graphics.Nvdec.Types.Vp9 public Array5 CompRefProb; public Array17 Padding58F; public Array4>>>>> CoefProbs; +#pragma warning restore CS0649 public void Convert(ref Vp9EntropyProbs fc) { diff --git a/Ryujinx.Graphics.Nvdec/Types/Vp9/FrameSize.cs b/Ryujinx.Graphics.Nvdec/Types/Vp9/FrameSize.cs index 70988b487d..d449ec4d63 100644 --- a/Ryujinx.Graphics.Nvdec/Types/Vp9/FrameSize.cs +++ b/Ryujinx.Graphics.Nvdec/Types/Vp9/FrameSize.cs @@ -2,9 +2,11 @@ { struct FrameSize { +#pragma warning disable CS0649 public ushort Width; public ushort Height; public ushort LumaPitch; public ushort ChromaPitch; +#pragma warning restore CS0649 } } diff --git a/Ryujinx.Graphics.Nvdec/Types/Vp9/FrameStats.cs b/Ryujinx.Graphics.Nvdec/Types/Vp9/FrameStats.cs index 3a3d4762fe..c360d37872 100644 --- a/Ryujinx.Graphics.Nvdec/Types/Vp9/FrameStats.cs +++ b/Ryujinx.Graphics.Nvdec/Types/Vp9/FrameStats.cs @@ -2,6 +2,7 @@ { struct FrameStats { +#pragma warning disable CS0649 public uint Unknown0; public uint Unknown4; public uint Pass2CycleCount; @@ -16,5 +17,6 @@ public uint ErrorCtbPos; public uint ErrorSlicePos; public uint Unknown34; +#pragma warning restore CS0649 } } diff --git a/Ryujinx.Graphics.Nvdec/Types/Vp9/LoopFilter.cs b/Ryujinx.Graphics.Nvdec/Types/Vp9/LoopFilter.cs index d8d5ab200c..7cb0fd7a82 100644 --- a/Ryujinx.Graphics.Nvdec/Types/Vp9/LoopFilter.cs +++ b/Ryujinx.Graphics.Nvdec/Types/Vp9/LoopFilter.cs @@ -4,8 +4,10 @@ namespace Ryujinx.Graphics.Nvdec.Types.Vp9 { struct LoopFilter { +#pragma warning disable CS0649 public byte ModeRefDeltaEnabled; public Array4 RefDeltas; public Array2 ModeDeltas; +#pragma warning restore CS0649 } } diff --git a/Ryujinx.Graphics.Nvdec/Types/Vp9/PictureInfo.cs b/Ryujinx.Graphics.Nvdec/Types/Vp9/PictureInfo.cs index f1f9e2f1be..7d06f7474f 100644 --- a/Ryujinx.Graphics.Nvdec/Types/Vp9/PictureInfo.cs +++ b/Ryujinx.Graphics.Nvdec/Types/Vp9/PictureInfo.cs @@ -5,6 +5,7 @@ namespace Ryujinx.Graphics.Nvdec.Types.Vp9 { struct PictureInfo { +#pragma warning disable CS0649 public Array12 Unknown0; public uint BitstreamSize; public uint IsEncrypted; @@ -41,6 +42,7 @@ namespace Ryujinx.Graphics.Nvdec.Types.Vp9 public uint UnknownF4; public uint UnknownF8; public uint UnknownFC; +#pragma warning restore CS0649 public uint BitDepth => (SurfaceParams >> 1) & 0xf; diff --git a/Ryujinx.Graphics.Nvdec/Types/Vp9/Segmentation.cs b/Ryujinx.Graphics.Nvdec/Types/Vp9/Segmentation.cs index ed62293d27..f6c4f0b17e 100644 --- a/Ryujinx.Graphics.Nvdec/Types/Vp9/Segmentation.cs +++ b/Ryujinx.Graphics.Nvdec/Types/Vp9/Segmentation.cs @@ -4,11 +4,13 @@ namespace Ryujinx.Graphics.Nvdec.Types.Vp9 { struct Segmentation { +#pragma warning disable CS0649 public byte Enabled; public byte UpdateMap; public byte TemporalUpdate; public byte AbsDelta; public Array8 FeatureMask; public Array8> FeatureData; +#pragma warning restore CS0649 } } diff --git a/Ryujinx.Graphics.Vic/Types/ClearRectStruct.cs b/Ryujinx.Graphics.Vic/Types/ClearRectStruct.cs index 21b7b598a1..2915404f6a 100644 --- a/Ryujinx.Graphics.Vic/Types/ClearRectStruct.cs +++ b/Ryujinx.Graphics.Vic/Types/ClearRectStruct.cs @@ -2,8 +2,10 @@ { struct ClearRectStruct { +#pragma warning disable CS0649 private long _word0; private long _word1; +#pragma warning restore CS0649 public int ClearRect0Left => _word0.Extract(0, 14); public int ClearRect0Right => _word0.Extract(16, 14); diff --git a/Ryujinx.Graphics.Vic/Types/ConfigStruct.cs b/Ryujinx.Graphics.Vic/Types/ConfigStruct.cs index f1e6287a96..5edc818398 100644 --- a/Ryujinx.Graphics.Vic/Types/ConfigStruct.cs +++ b/Ryujinx.Graphics.Vic/Types/ConfigStruct.cs @@ -4,11 +4,13 @@ namespace Ryujinx.Graphics.Vic.Types { struct ConfigStruct { +#pragma warning disable CS0649 public PipeConfig PipeConfig; public OutputConfig OutputConfig; public OutputSurfaceConfig OutputSurfaceConfig; public MatrixStruct OutColorMatrix; public Array4 ClearRectStruct; public Array8 SlotStruct; +#pragma warning restore CS0649 } } diff --git a/Ryujinx.Graphics.Vic/Types/OutputConfig.cs b/Ryujinx.Graphics.Vic/Types/OutputConfig.cs index 8ab46fe576..29633297d7 100644 --- a/Ryujinx.Graphics.Vic/Types/OutputConfig.cs +++ b/Ryujinx.Graphics.Vic/Types/OutputConfig.cs @@ -2,8 +2,10 @@ { struct OutputConfig { +#pragma warning disable CS0649 private long _word0; private long _word1; +#pragma warning restore CS0649 public int AlphaFillMode => _word0.Extract(0, 3); public int AlphaFillSlot => _word0.Extract(3, 3); diff --git a/Ryujinx.Graphics.Vic/Types/OutputSurfaceConfig.cs b/Ryujinx.Graphics.Vic/Types/OutputSurfaceConfig.cs index 9068cbbe62..0a29b7b83a 100644 --- a/Ryujinx.Graphics.Vic/Types/OutputSurfaceConfig.cs +++ b/Ryujinx.Graphics.Vic/Types/OutputSurfaceConfig.cs @@ -2,8 +2,10 @@ { struct OutputSurfaceConfig { +#pragma warning disable CS0649 private long _word0; private long _word1; +#pragma warning restore CS0649 public PixelFormat OutPixelFormat => (PixelFormat)_word0.Extract(0, 7); public int OutChromaLocHoriz => _word0.Extract(7, 2); diff --git a/Ryujinx.Graphics.Vic/Types/PipeConfig.cs b/Ryujinx.Graphics.Vic/Types/PipeConfig.cs index 72d8cc9997..cae04536f3 100644 --- a/Ryujinx.Graphics.Vic/Types/PipeConfig.cs +++ b/Ryujinx.Graphics.Vic/Types/PipeConfig.cs @@ -2,8 +2,10 @@ { struct PipeConfig { +#pragma warning disable CS0169, CS0649 private long _word0; private long _word1; +#pragma warning restore CS0169, CS0649 public int DownsampleHoriz => _word0.Extract(0, 11); public int DownsampleVert => _word0.Extract(16, 11); diff --git a/Ryujinx.Graphics.Vic/VicRegisters.cs b/Ryujinx.Graphics.Vic/VicRegisters.cs index 71dc9eedd1..74d41adecf 100644 --- a/Ryujinx.Graphics.Vic/VicRegisters.cs +++ b/Ryujinx.Graphics.Vic/VicRegisters.cs @@ -11,6 +11,7 @@ namespace Ryujinx.Graphics.Vic struct VicRegisters { +#pragma warning disable CS0649 public Array64 Reserved0; public uint Nop; public Array15 Reserved104; @@ -43,5 +44,6 @@ namespace Ryujinx.Graphics.Vic public Array8 SetSlotContextId; public Array8 SetCompTagBufferOffset; public Array8 SetHistoryBufferOffset; +#pragma warning restore CS0649 } }