Merge branch 'master' into master
This commit is contained in:
commit
25c47368db
@ -10,14 +10,18 @@ namespace Ryujinx.Common.Helper
|
||||
public static bool IsMacOS => OperatingSystem.IsMacOS();
|
||||
public static bool IsWindows => OperatingSystem.IsWindows();
|
||||
public static bool IsLinux => OperatingSystem.IsLinux();
|
||||
|
||||
public static bool IsArm => RuntimeInformation.OSArchitecture is Architecture.Arm64;
|
||||
|
||||
public static bool IsX64 => RuntimeInformation.OSArchitecture is Architecture.X64;
|
||||
|
||||
public static bool IsIntelMac => IsMacOS && RuntimeInformation.OSArchitecture is Architecture.X64;
|
||||
public static bool IsArmMac => IsMacOS && RuntimeInformation.OSArchitecture is Architecture.Arm64;
|
||||
public static bool IsIntelMac => IsMacOS && IsX64;
|
||||
public static bool IsArmMac => IsMacOS && IsArm;
|
||||
|
||||
public static bool IsX64Windows => IsWindows && (RuntimeInformation.OSArchitecture is Architecture.X64);
|
||||
public static bool IsArmWindows => IsWindows && (RuntimeInformation.OSArchitecture is Architecture.Arm64);
|
||||
public static bool IsX64Windows => IsWindows && IsX64;
|
||||
public static bool IsArmWindows => IsWindows && IsArm;
|
||||
|
||||
public static bool IsX64Linux => IsLinux && (RuntimeInformation.OSArchitecture is Architecture.X64);
|
||||
public static bool IsArmLinux => IsLinux && (RuntimeInformation.OSArchitecture is Architecture.Arm64);
|
||||
public static bool IsX64Linux => IsLinux && IsX64;
|
||||
public static bool IsArmLinux => IsLinux && IsArmMac;
|
||||
}
|
||||
}
|
||||
|
@ -83,11 +83,11 @@ namespace Ryujinx.Graphics.Gpu.Synchronization
|
||||
// TODO: Remove this when GPU channel scheduling will be implemented.
|
||||
if (timeout == Timeout.InfiniteTimeSpan)
|
||||
{
|
||||
timeout = TimeSpan.FromSeconds(1);
|
||||
timeout = TimeSpan.FromMilliseconds(500);
|
||||
}
|
||||
|
||||
using ManualResetEvent waitEvent = new(false);
|
||||
SyncpointWaiterHandle info = _syncpoints[id].RegisterCallback(threshold, (x) => waitEvent.Set());
|
||||
SyncpointWaiterHandle info = _syncpoints[id].RegisterCallback(threshold, _ => waitEvent.Set());
|
||||
|
||||
if (info == null)
|
||||
{
|
||||
@ -96,7 +96,7 @@ namespace Ryujinx.Graphics.Gpu.Synchronization
|
||||
|
||||
bool signaled = waitEvent.WaitOne(timeout);
|
||||
|
||||
if (!signaled && info != null)
|
||||
if (!signaled)
|
||||
{
|
||||
Logger.Error?.Print(LogClass.Gpu, $"Wait on syncpoint {id} for threshold {threshold} took more than {timeout.TotalMilliseconds}ms, resuming execution...");
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
using Ryujinx.Common.Helper;
|
||||
using SharpMetal.QuartzCore;
|
||||
using System;
|
||||
|
||||
@ -7,14 +8,12 @@ namespace Ryujinx.Ava.UI.Renderer
|
||||
{
|
||||
public CAMetalLayer CreateSurface()
|
||||
{
|
||||
if (OperatingSystem.IsMacOS())
|
||||
if (OperatingSystem.IsMacOS() && RunningPlatform.IsArm)
|
||||
{
|
||||
return new CAMetalLayer(MetalLayer);
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new NotSupportedException();
|
||||
}
|
||||
|
||||
throw new NotSupportedException($"Cannot create a {nameof(CAMetalLayer)} without being on ARM Mac.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -43,19 +43,19 @@ namespace Ryujinx.Ava.UI.Renderer
|
||||
|
||||
public RendererHost(string titleId)
|
||||
{
|
||||
switch (TitleIDs.SelectGraphicsBackend(titleId, ConfigurationState.Instance.Graphics.GraphicsBackend))
|
||||
{
|
||||
case GraphicsBackend.OpenGl:
|
||||
EmbeddedWindow = new EmbeddedWindowOpenGL();
|
||||
break;
|
||||
case GraphicsBackend.Metal:
|
||||
EmbeddedWindow = new EmbeddedWindowMetal();
|
||||
break;
|
||||
case GraphicsBackend.Vulkan:
|
||||
EmbeddedWindow = new EmbeddedWindowVulkan();
|
||||
break;
|
||||
}
|
||||
|
||||
Focusable = true;
|
||||
FlowDirection = FlowDirection.LeftToRight;
|
||||
|
||||
EmbeddedWindow =
|
||||
#pragma warning disable CS8509
|
||||
TitleIDs.SelectGraphicsBackend(titleId, ConfigurationState.Instance.Graphics.GraphicsBackend) switch
|
||||
#pragma warning restore CS8509
|
||||
{
|
||||
GraphicsBackend.OpenGl => new EmbeddedWindowOpenGL(),
|
||||
GraphicsBackend.Metal => new EmbeddedWindowMetal(),
|
||||
GraphicsBackend.Vulkan => new EmbeddedWindowVulkan(),
|
||||
};
|
||||
|
||||
string backendText = EmbeddedWindow switch
|
||||
{
|
||||
EmbeddedWindowVulkan => "Vulkan",
|
||||
|
Loading…
x
Reference in New Issue
Block a user