0
0
Fork 0
mirror of https://github.com/GreemDev/Ryujinx.git synced 2025-01-09 15:51:59 +00:00

infra: chore: fix/silence compile warnings

This commit is contained in:
Evan Husted 2024-12-24 01:23:01 -06:00
parent 3cb996bf5c
commit 2f540dc88c
5 changed files with 8 additions and 2 deletions

View file

@ -838,6 +838,7 @@ namespace Ryujinx.Graphics.Gpu.Shader
TargetApi.OpenGL => TargetLanguage.Glsl, TargetApi.OpenGL => TargetLanguage.Glsl,
TargetApi.Vulkan => GraphicsConfig.EnableSpirvCompilationOnVulkan ? TargetLanguage.Spirv : TargetLanguage.Glsl, TargetApi.Vulkan => GraphicsConfig.EnableSpirvCompilationOnVulkan ? TargetLanguage.Spirv : TargetLanguage.Glsl,
TargetApi.Metal => TargetLanguage.Msl, TargetApi.Metal => TargetLanguage.Msl,
_ => throw new NotImplementedException()
}; };
return new TranslationOptions(lang, api, flags); return new TranslationOptions(lang, api, flags);

View file

@ -1767,6 +1767,7 @@ namespace Ryujinx.Graphics.Metal
Constants.StorageBuffersSetIndex => Constants.StorageBuffersIndex, Constants.StorageBuffersSetIndex => Constants.StorageBuffersIndex,
Constants.TexturesSetIndex => Constants.TexturesIndex, Constants.TexturesSetIndex => Constants.TexturesIndex,
Constants.ImagesSetIndex => Constants.ImagesIndex, Constants.ImagesSetIndex => Constants.ImagesIndex,
_ => throw new NotImplementedException()
}; };
} }

View file

@ -21,9 +21,12 @@ namespace Ryujinx.Graphics.Metal
private Pipeline _pipeline; private Pipeline _pipeline;
private Window _window; 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; public event EventHandler<ScreenCaptureImageInfo> ScreenCaptured;
#pragma warning restore CS0067
public bool PreferThreading => true; public bool PreferThreading => true;
public IPipeline Pipeline => _pipeline; public IPipeline Pipeline => _pipeline;
public IWindow Window => _window; public IWindow Window => _window;

View file

@ -125,6 +125,7 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Msl.Instructions
Instruction.Add => "PreciseFAdd", Instruction.Add => "PreciseFAdd",
Instruction.Subtract => "PreciseFSub", Instruction.Subtract => "PreciseFSub",
Instruction.Multiply => "PreciseFMul", Instruction.Multiply => "PreciseFMul",
_ => throw new NotImplementedException()
}; };
return $"{func}({expr[0]}, {expr[1]})"; return $"{func}({expr[0]}, {expr[1]})";

View file

@ -917,7 +917,7 @@ namespace Ryujinx.Ava
if (ShouldInitMetal) 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. // 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); renderer = new MetalRenderer((RendererHost.EmbeddedWindow as EmbeddedWindowMetal)!.CreateSurface);
#pragma warning restore CA1416 #pragma warning restore CA1416