mirror of
https://git.naxdy.org/Mirror/Ryujinx.git
synced 2025-01-12 21:59:12 +00:00
Fix checking and some clean up log if Spir-V is not available
This commit is contained in:
parent
51626cd346
commit
486aaf8e5e
4 changed files with 8 additions and 33 deletions
|
@ -113,8 +113,6 @@ namespace Ryujinx.Ava.UI.ViewModels
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public bool IsOpenGLAvailable => !OperatingSystem.IsMacOS();
|
public bool IsOpenGLAvailable => !OperatingSystem.IsMacOS();
|
||||||
|
|
||||||
public bool IsHypervisorAvailable => OperatingSystem.IsMacOS() && RuntimeInformation.ProcessArchitecture == Architecture.Arm64;
|
public bool IsHypervisorAvailable => OperatingSystem.IsMacOS() && RuntimeInformation.ProcessArchitecture == Architecture.Arm64;
|
||||||
|
|
|
@ -59,7 +59,7 @@ namespace Ryujinx.Graphics.Gpu
|
||||||
public static bool EnableShaderCache;
|
public static bool EnableShaderCache;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Enables or disables color space passthrough, if available.
|
/// Enables or disables Spir-V on OpenGL.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static bool EnableOGLSpirV = false;
|
public static bool EnableOGLSpirV = false;
|
||||||
|
|
||||||
|
|
|
@ -102,8 +102,6 @@ namespace Ryujinx.Graphics.Gpu.Shader
|
||||||
|
|
||||||
string diskCacheTitleId = GetDiskCachePath();
|
string diskCacheTitleId = GetDiskCachePath();
|
||||||
|
|
||||||
_isSpirVCapable = OpenGlSpirVCapable();
|
|
||||||
|
|
||||||
_computeShaderCache = new ComputeShaderCacheHashTable();
|
_computeShaderCache = new ComputeShaderCacheHashTable();
|
||||||
_graphicsShaderCache = new ShaderCacheHashTable();
|
_graphicsShaderCache = new ShaderCacheHashTable();
|
||||||
_diskCacheHostStorage = new DiskCacheHostStorage(diskCacheTitleId);
|
_diskCacheHostStorage = new DiskCacheHostStorage(diskCacheTitleId);
|
||||||
|
@ -157,6 +155,12 @@ namespace Ryujinx.Graphics.Gpu.Shader
|
||||||
/// <param name="cancellationToken">Cancellation token to cancel the shader cache initialization process</param>
|
/// <param name="cancellationToken">Cancellation token to cancel the shader cache initialization process</param>
|
||||||
internal void Initialize(CancellationToken cancellationToken)
|
internal void Initialize(CancellationToken cancellationToken)
|
||||||
{
|
{
|
||||||
|
_isSpirVCapable = _context.Capabilities.SupportsSpirV;
|
||||||
|
if (!_isSpirVCapable)
|
||||||
|
{
|
||||||
|
Logger.Warning?.PrintMsg(LogClass.Gpu, $"Spir-V Not Available on OpenGL for your GPU");
|
||||||
|
}
|
||||||
|
|
||||||
if (_diskCacheHostStorage.CacheEnabled)
|
if (_diskCacheHostStorage.CacheEnabled)
|
||||||
{
|
{
|
||||||
ParallelDiskCacheLoader loader = new(
|
ParallelDiskCacheLoader loader = new(
|
||||||
|
@ -721,27 +725,6 @@ namespace Ryujinx.Graphics.Gpu.Shader
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Checks if SpirV is available on OpenGL
|
|
||||||
/// </summary>
|
|
||||||
/// <remarks>
|
|
||||||
/// True or false
|
|
||||||
/// </remarks>
|
|
||||||
private bool OpenGlSpirVCapable()
|
|
||||||
{
|
|
||||||
bool spirV = _context.Capabilities.SupportsSpirV;
|
|
||||||
if (!spirV)
|
|
||||||
{
|
|
||||||
Logger.Warning?.PrintMsg(LogClass.Gpu, $"Spir-V Not Available on OpenGL for your GPU");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Logger.Warning?.PrintMsg(LogClass.Gpu, $"Spir-V !Available! on OpenGL for your GPU");
|
|
||||||
}
|
|
||||||
return spirV;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Creates shader translation options with the requested graphics API and flags.
|
/// Creates shader translation options with the requested graphics API and flags.
|
||||||
/// The shader language is choosen based on the current configuration and graphics API.
|
/// The shader language is choosen based on the current configuration and graphics API.
|
||||||
|
|
|
@ -140,10 +140,4 @@ namespace Ryujinx.Graphics.OpenGL
|
||||||
return GL.GetError() == ErrorCode.NoError;
|
return GL.GetError() == ErrorCode.NoError;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class HwCapabilitiesFacade
|
|
||||||
{
|
|
||||||
public static bool SupportsSpirV => HwCapabilities.SupportsSpirV;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue