diff --git a/src/Ryujinx.Graphics.Gpu/Engine/Threed/ComputeDraw/VtgAsComputeContext.cs b/src/Ryujinx.Graphics.Gpu/Engine/Threed/ComputeDraw/VtgAsComputeContext.cs index a7840fb03..34f2cfcad 100644 --- a/src/Ryujinx.Graphics.Gpu/Engine/Threed/ComputeDraw/VtgAsComputeContext.cs +++ b/src/Ryujinx.Graphics.Gpu/Engine/Threed/ComputeDraw/VtgAsComputeContext.cs @@ -11,8 +11,6 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed.ComputeDraw /// class VtgAsComputeContext : IDisposable { - private const int DummyBufferSize = 16; - private readonly GpuContext _context; /// diff --git a/src/Ryujinx.Graphics.Metal/EncoderStateManager.cs b/src/Ryujinx.Graphics.Metal/EncoderStateManager.cs index 0d3df86c7..55c995760 100644 --- a/src/Ryujinx.Graphics.Metal/EncoderStateManager.cs +++ b/src/Ryujinx.Graphics.Metal/EncoderStateManager.cs @@ -97,12 +97,12 @@ namespace Ryujinx.Graphics.Metal _currentState.ClearLoadAction = clear; } - public void DirtyTextures() + public readonly void DirtyTextures() { SignalDirty(DirtyFlags.Textures); } - public void DirtyImages() + public readonly void DirtyImages() { SignalDirty(DirtyFlags.Images); } @@ -830,7 +830,7 @@ namespace Ryujinx.Graphics.Metal SignalDirty(DirtyFlags.Images); } - public void UpdateTextureArray(ShaderStage stage, int binding, TextureArray array) + public readonly void UpdateTextureArray(ShaderStage stage, int binding, TextureArray array) { ref EncoderState.ArrayRef arrayRef = ref GetArrayRef(ref _currentState.TextureArrayRefs, binding, ArrayGrowthSize); @@ -842,7 +842,7 @@ namespace Ryujinx.Graphics.Metal } } - public void UpdateTextureArraySeparate(ShaderStage stage, int setIndex, TextureArray array) + public readonly void UpdateTextureArraySeparate(ShaderStage stage, int setIndex, TextureArray array) { ref EncoderState.ArrayRef arrayRef = ref GetArrayRef(ref _currentState.TextureArrayExtraRefs, setIndex - MetalRenderer.TotalSets); @@ -854,7 +854,7 @@ namespace Ryujinx.Graphics.Metal } } - public void UpdateImageArray(ShaderStage stage, int binding, ImageArray array) + public readonly void UpdateImageArray(ShaderStage stage, int binding, ImageArray array) { ref EncoderState.ArrayRef arrayRef = ref GetArrayRef(ref _currentState.ImageArrayRefs, binding, ArrayGrowthSize); @@ -866,7 +866,7 @@ namespace Ryujinx.Graphics.Metal } } - public void UpdateImageArraySeparate(ShaderStage stage, int setIndex, ImageArray array) + public readonly void UpdateImageArraySeparate(ShaderStage stage, int setIndex, ImageArray array) { ref EncoderState.ArrayRef arrayRef = ref GetArrayRef(ref _currentState.ImageArrayExtraRefs, setIndex - MetalRenderer.TotalSets); @@ -1338,7 +1338,7 @@ namespace Ryujinx.Graphics.Metal { for (int i = 0; i < count; i++) { - int index = binding + i; + int index = binding + i; ref var image = ref _currentState.ImageRefs[index]; diff --git a/src/Ryujinx.Graphics.Metal/FormatTable.cs b/src/Ryujinx.Graphics.Metal/FormatTable.cs index 784ba183a..f6261488b 100644 --- a/src/Ryujinx.Graphics.Metal/FormatTable.cs +++ b/src/Ryujinx.Graphics.Metal/FormatTable.cs @@ -72,7 +72,7 @@ namespace Ryujinx.Graphics.Metal Add(Format.D32FloatS8Uint, MTLPixelFormat.Depth32FloatStencil8); Add(Format.R8G8B8A8Srgb, MTLPixelFormat.RGBA8UnormsRGB); // Add(Format.R4G4Unorm, MTLPixelFormat.R4G4Unorm); - Add(Format.R4G4B4A4Unorm, MTLPixelFormat.RGBA8Unorm); + Add(Format.R4G4B4A4Unorm, MTLPixelFormat.RGBA8Unorm); // Add(Format.R5G5B5X1Unorm, MTLPixelFormat.R5G5B5X1Unorm); Add(Format.R5G5B5A1Unorm, MTLPixelFormat.BGR5A1Unorm); Add(Format.R5G6B5Unorm, MTLPixelFormat.B5G6R5Unorm); diff --git a/src/Ryujinx.Graphics.Metal/Program.cs b/src/Ryujinx.Graphics.Metal/Program.cs index c76930321..170f178ad 100644 --- a/src/Ryujinx.Graphics.Metal/Program.cs +++ b/src/Ryujinx.Graphics.Metal/Program.cs @@ -15,8 +15,8 @@ namespace Ryujinx.Graphics.Metal class Program : IProgram { private ProgramLinkStatus _status; - private ShaderSource[] _shaders; - private GCHandle[] _handles; + private readonly ShaderSource[] _shaders; + private readonly GCHandle[] _handles; private int _successCount; public MTLFunction VertexFunction;