This commit is contained in:
Isaac Marovitz 2024-08-03 17:08:50 +01:00
parent 8674ea6752
commit 3876f60c7f
No known key found for this signature in database
GPG Key ID: 97250B2B09A132E1
4 changed files with 10 additions and 12 deletions

View File

@ -11,8 +11,6 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed.ComputeDraw
/// </summary>
class VtgAsComputeContext : IDisposable
{
private const int DummyBufferSize = 16;
private readonly GpuContext _context;
/// <summary>

View File

@ -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<TextureArray> 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<TextureArray> 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<ImageArray> 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<ImageArray> 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];

View File

@ -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);

View File

@ -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;