mirror of
https://github.com/Ryubing/Ryujinx.git
synced 2025-11-23 16:30:53 -05:00
Compare commits
4 Commits
Canary-1.2
...
Canary-1.2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b05eab21a2 | ||
|
|
ff667a5c84 | ||
|
|
2f540dc88c | ||
|
|
3cb996bf5c |
@@ -838,6 +838,7 @@ namespace Ryujinx.Graphics.Gpu.Shader
|
||||
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);
|
||||
|
||||
@@ -1767,6 +1767,7 @@ namespace Ryujinx.Graphics.Metal
|
||||
Constants.StorageBuffersSetIndex => Constants.StorageBuffersIndex,
|
||||
Constants.TexturesSetIndex => Constants.TexturesIndex,
|
||||
Constants.ImagesSetIndex => Constants.ImagesIndex,
|
||||
_ => throw new NotImplementedException()
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -21,9 +21,12 @@ namespace Ryujinx.Graphics.Metal
|
||||
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;
|
||||
|
||||
@@ -125,6 +125,7 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Msl.Instructions
|
||||
Instruction.Add => "PreciseFAdd",
|
||||
Instruction.Subtract => "PreciseFSub",
|
||||
Instruction.Multiply => "PreciseFMul",
|
||||
_ => throw new NotImplementedException()
|
||||
};
|
||||
|
||||
return $"{func}({expr[0]}, {expr[1]})";
|
||||
|
||||
@@ -917,7 +917,7 @@ namespace Ryujinx.Ava
|
||||
|
||||
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
|
||||
|
||||
@@ -2,6 +2,7 @@ using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Gommon;
|
||||
using Ryujinx.Common.Configuration;
|
||||
using Ryujinx.Common.Logging;
|
||||
using Ryujinx.UI.Common.Configuration;
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
@@ -72,6 +73,16 @@ namespace Ryujinx.Ava.UI.Renderer
|
||||
EmbeddedWindow = new EmbeddedWindowVulkan();
|
||||
break;
|
||||
}
|
||||
|
||||
string backendText = EmbeddedWindow switch
|
||||
{
|
||||
EmbeddedWindowVulkan => "Vulkan",
|
||||
EmbeddedWindowOpenGL => "OpenGL",
|
||||
EmbeddedWindowMetal => "Metal",
|
||||
_ => throw new NotImplementedException()
|
||||
};
|
||||
|
||||
Logger.Info?.PrintMsg(LogClass.Gpu, $"Backend ({ConfigurationState.Instance.Graphics.GraphicsBackend.Value}): {backendText}");
|
||||
|
||||
Initialize();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user