mirror of
https://git.ryujinx.app/projects/Kenji-NX.git
synced 2026-09-30 08:47:58 +02:00
Add an alternative queue, used on macOS to work around SPIRV-Cross stack overflows
- Increase stack size to 2MB
This commit is contained in:
@@ -55,6 +55,7 @@ namespace Ryujinx.Graphics.Vulkan
|
||||
internal CommandBufferPool CommandBufferPool { get; private set; }
|
||||
internal PipelineLayoutCache PipelineLayoutCache { get; private set; }
|
||||
internal BackgroundResources BackgroundResources { get; private set; }
|
||||
internal ShaderCompilationQueue ShaderCompilationQueue { get; private set; }
|
||||
internal Action<Action> InterruptAction { get; private set; }
|
||||
internal SyncManager SyncManager { get; private set; }
|
||||
|
||||
@@ -127,6 +128,12 @@ namespace Ryujinx.Graphics.Vulkan
|
||||
|
||||
// Any device running on MacOS is using MoltenVK, even Intel and AMD vendors.
|
||||
IsMoltenVk = true;
|
||||
|
||||
// The default thread stack size on MacOS is low, and can cause stack overflow
|
||||
// on SPIR-V Cross during shader compilation.
|
||||
// As a workaround, we use this custom queue which allows us to specify the stack
|
||||
// size of the threads used for compilation.
|
||||
ShaderCompilationQueue = new ShaderCompilationQueue();
|
||||
}
|
||||
|
||||
SupportsMTL31 = OperatingSystem.IsMacOSVersionAtLeast(14);
|
||||
@@ -1112,6 +1119,8 @@ namespace Ryujinx.Graphics.Vulkan
|
||||
|
||||
SurfaceApi.DestroySurface(_instance.Instance, _surface, null);
|
||||
|
||||
ShaderCompilationQueue?.Dispose();
|
||||
|
||||
Api.DestroyDevice(_device, null);
|
||||
|
||||
_debugMessenger.Dispose();
|
||||
|
||||
Reference in New Issue
Block a user