Skip to content

Commit

Permalink
infra: chore: fix/silence compile warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
GreemDev committed Dec 24, 2024
1 parent 3cb996b commit 2f540dc
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/Ryujinx.Graphics.Gpu/Shader/ShaderCache.cs
Original file line number Diff line number Diff line change
Expand Up @@ -838,6 +838,7 @@ private static TranslationOptions CreateTranslationOptions(TargetApi api, Transl
TargetApi.OpenGL => TargetLanguage.Glsl,
TargetApi.Vulkan => GraphicsConfig.EnableSpirvCompilationOnVulkan ? TargetLanguage.Spirv : TargetLanguage.Glsl,
TargetApi.Metal => TargetLanguage.Msl,
_ => throw new NotImplementedException()
};

return new TranslationOptions(lang, api, flags);
Expand Down
1 change: 1 addition & 0 deletions src/Ryujinx.Graphics.Metal/EncoderStateManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1767,6 +1767,7 @@ private static uint SetIndexToBindingIndex(uint setIndex)
Constants.StorageBuffersSetIndex => Constants.StorageBuffersIndex,
Constants.TexturesSetIndex => Constants.TexturesIndex,
Constants.ImagesSetIndex => Constants.ImagesIndex,
_ => throw new NotImplementedException()
};
}

Expand Down
5 changes: 4 additions & 1 deletion src/Ryujinx.Graphics.Metal/MetalRenderer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,12 @@ public sealed class MetalRenderer : IRenderer
private Pipeline _pipeline;
private Window _window;

public uint ProgramCount { get; set; } = 0;
public uint ProgramCount { get; set; }

#pragma warning disable CS0067 // The event is never used
public event EventHandler<ScreenCaptureImageInfo> ScreenCaptured;
#pragma warning restore CS0067

public bool PreferThreading => true;
public IPipeline Pipeline => _pipeline;
public IWindow Window => _window;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ private static string GetExpression(CodeGenContext context, AstOperation operati
Instruction.Add => "PreciseFAdd",
Instruction.Subtract => "PreciseFSub",
Instruction.Multiply => "PreciseFMul",
_ => throw new NotImplementedException()
};

return $"{func}({expr[0]}, {expr[1]})";
Expand Down
2 changes: 1 addition & 1 deletion src/Ryujinx/AppHost.cs
Original file line number Diff line number Diff line change
Expand Up @@ -917,7 +917,7 @@ private void InitializeSwitchInstance()

if (ShouldInitMetal)
{
#pragma warning disable CA1416 This call site is reachable on all platforms
#pragma warning disable CA1416 // This call site is reachable on all platforms
// The condition does a check for Mac, on top of checking if it's an ARM Mac. This isn't a problem.
renderer = new MetalRenderer((RendererHost.EmbeddedWindow as EmbeddedWindowMetal)!.CreateSurface);
#pragma warning restore CA1416
Expand Down

0 comments on commit 2f540dc

Please sign in to comment.