Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to Silk.NET 2.18.0 #5854

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

gdkchan
Copy link
Member

@gdkchan gdkchan commented Oct 28, 2023

As the title says. I also replaced the shdaerc.net dependency with Silk.NET.Shaderc.
I tested on macOS and it seems to work there too with our MoltenVK package.

@github-actions github-actions bot added gpu Related to Ryujinx.Graphics infra Related to the project infrastructure graphics-backend:vulkan Graphical bugs when using the Vulkan API labels Oct 28, 2023
@ryujinx-mako ryujinx-mako bot requested review from marysaka, riperiperi, TSRBerry and a team October 28, 2023 22:34
@makigumo
Copy link
Contributor

On macOS there is now some conflict when vulkan-loader (from Homebrew) is installed. Ryujinx is no longer able to find a vulkan device.

Error message after opening Settings.

00:00:06.001 |E| .NET ThreadPool Worker Gpu : Error querying Vulkan devices: Unexpected API error "ErrorIncompatibleDriver".

Error message after starting any game.

00:00:01.530 |E| .NET ThreadPool Worker objc[39440]: Class MVKBlockObserver is implemented in both /Volumes/Data/Ryujinx.app/Contents/Frameworks/libMoltenVK.dylib (0x1b4014060) and /usr/local/Cellar/molten-vk/HEAD-bb914fa/lib/libMoltenVK.dylib (0x10593666d90). One of the two will be used. Which one is undefined.
00:00:01.595 |E| GUI.RenderThread Application : Unhandled exception caught: Ryujinx.Graphics.Vulkan.VulkanException: Unexpected API error "ErrorIncompatibleDriver".
   at Ryujinx.Graphics.Vulkan.VulkanInitialization.CreateInstance(Vk api, GraphicsDebugLevel logLevel, String[] requiredExtensions) in /home/runner/work/Ryujinx/Ryujinx/src/Ryujinx.Graphics.Vulkan/VulkanInitialization.cs:line 130
   at Ryujinx.Graphics.Vulkan.VulkanRenderer.SetupContext(GraphicsDebugLevel logLevel) in /home/runner/work/Ryujinx/Ryujinx/src/Ryujinx.Graphics.Vulkan/VulkanRenderer.cs:line 369
   at Ryujinx.Graphics.Vulkan.VulkanRenderer.Initialize(GraphicsDebugLevel logLevel) in /home/runner/work/Ryujinx/Ryujinx/src/Ryujinx.Graphics.Vulkan/VulkanRenderer.cs:line 732
   at Ryujinx.Graphics.GAL.Multithreading.ThreadedRenderer.Initialize(GraphicsDebugLevel logLevel) in /home/runner/work/Ryujinx/Ryujinx/src/Ryujinx.Graphics.GAL/Multithreading/ThreadedRenderer.cs:line 391
   at Ryujinx.Ava.AppHost.RenderLoop() in /home/runner/work/Ryujinx/Ryujinx/src/Ryujinx.Ava/AppHost.cs:line 904
   at System.Threading.Thread.StartCallback()

@gdkchan
Copy link
Member Author

gdkchan commented Nov 1, 2023

On macOS there is now some conflict when vulkan-loader (from Homebrew) is installed. Ryujinx is no longer able to find a vulkan device.

Error message after opening Settings.

00:00:06.001 |E| .NET ThreadPool Worker Gpu : Error querying Vulkan devices: Unexpected API error "ErrorIncompatibleDriver".

Error message after starting any game.

00:00:01.530 |E| .NET ThreadPool Worker objc[39440]: Class MVKBlockObserver is implemented in both /Volumes/Data/Ryujinx.app/Contents/Frameworks/libMoltenVK.dylib (0x1b4014060) and /usr/local/Cellar/molten-vk/HEAD-bb914fa/lib/libMoltenVK.dylib (0x10593666d90). One of the two will be used. Which one is undefined.
00:00:01.595 |E| GUI.RenderThread Application : Unhandled exception caught: Ryujinx.Graphics.Vulkan.VulkanException: Unexpected API error "ErrorIncompatibleDriver".
   at Ryujinx.Graphics.Vulkan.VulkanInitialization.CreateInstance(Vk api, GraphicsDebugLevel logLevel, String[] requiredExtensions) in /home/runner/work/Ryujinx/Ryujinx/src/Ryujinx.Graphics.Vulkan/VulkanInitialization.cs:line 130
   at Ryujinx.Graphics.Vulkan.VulkanRenderer.SetupContext(GraphicsDebugLevel logLevel) in /home/runner/work/Ryujinx/Ryujinx/src/Ryujinx.Graphics.Vulkan/VulkanRenderer.cs:line 369
   at Ryujinx.Graphics.Vulkan.VulkanRenderer.Initialize(GraphicsDebugLevel logLevel) in /home/runner/work/Ryujinx/Ryujinx/src/Ryujinx.Graphics.Vulkan/VulkanRenderer.cs:line 732
   at Ryujinx.Graphics.GAL.Multithreading.ThreadedRenderer.Initialize(GraphicsDebugLevel logLevel) in /home/runner/work/Ryujinx/Ryujinx/src/Ryujinx.Graphics.GAL/Multithreading/ThreadedRenderer.cs:line 391
   at Ryujinx.Ava.AppHost.RenderLoop() in /home/runner/work/Ryujinx/Ryujinx/src/Ryujinx.Ava/AppHost.cs:line 904
   at System.Threading.Thread.StartCallback()

I guess we would need to bundle our own Vulkan loader too to fix this issue, or rename the libmoltenvk library to libvulkan (so it would be loaded as if it was the loader, not sure if that is a good idea).

@MutantAura
Copy link
Collaborator

MutantAura commented Apr 23, 2024

On macOS there is now some conflict when vulkan-loader (from Homebrew) is installed. Ryujinx is no longer able to find a vulkan device.

Error message after opening Settings.

00:00:06.001 |E| .NET ThreadPool Worker Gpu : Error querying Vulkan devices: Unexpected API error "ErrorIncompatibleDriver".

Error message after starting any game.

00:00:01.530 |E| .NET ThreadPool Worker objc[39440]: Class MVKBlockObserver is implemented in both /Volumes/Data/Ryujinx.app/Contents/Frameworks/libMoltenVK.dylib (0x1b4014060) and /usr/local/Cellar/molten-vk/HEAD-bb914fa/lib/libMoltenVK.dylib (0x10593666d90). One of the two will be used. Which one is undefined.
00:00:01.595 |E| GUI.RenderThread Application : Unhandled exception caught: Ryujinx.Graphics.Vulkan.VulkanException: Unexpected API error "ErrorIncompatibleDriver".
   at Ryujinx.Graphics.Vulkan.VulkanInitialization.CreateInstance(Vk api, GraphicsDebugLevel logLevel, String[] requiredExtensions) in /home/runner/work/Ryujinx/Ryujinx/src/Ryujinx.Graphics.Vulkan/VulkanInitialization.cs:line 130
   at Ryujinx.Graphics.Vulkan.VulkanRenderer.SetupContext(GraphicsDebugLevel logLevel) in /home/runner/work/Ryujinx/Ryujinx/src/Ryujinx.Graphics.Vulkan/VulkanRenderer.cs:line 369
   at Ryujinx.Graphics.Vulkan.VulkanRenderer.Initialize(GraphicsDebugLevel logLevel) in /home/runner/work/Ryujinx/Ryujinx/src/Ryujinx.Graphics.Vulkan/VulkanRenderer.cs:line 732
   at Ryujinx.Graphics.GAL.Multithreading.ThreadedRenderer.Initialize(GraphicsDebugLevel logLevel) in /home/runner/work/Ryujinx/Ryujinx/src/Ryujinx.Graphics.GAL/Multithreading/ThreadedRenderer.cs:line 391
   at Ryujinx.Ava.AppHost.RenderLoop() in /home/runner/work/Ryujinx/Ryujinx/src/Ryujinx.Ava/AppHost.cs:line 904
   at System.Threading.Thread.StartCallback()

I am unable to reproduce this on Silk.NET 2.20.0 with latest vulkan-loader installed via homebrew.
image

@makigumo
Copy link
Contributor

Unfortunately I'm still seeing exactly the same issue with #6573 applied, or when using the PR artifact.

It's working with vulkan-loader removed or unlinked.

Log when opening Settings

00:00:00.005 |I| Configuration LogValueChange: EnableFileLog set to: False
00:00:00.012 |I| Configuration LogValueChange: ResScale set to: 1
00:00:00.024 |I| Configuration LogValueChange: ResScaleCustom set to: 1
00:00:00.024 |I| Configuration LogValueChange: MaxAnisotropy set to: -1
00:00:00.025 |I| Configuration LogValueChange: AspectRatio set to: Fixed16x9
00:00:00.026 |I| Configuration LogValueChange: BackendThreading set to: Auto
00:00:00.026 |I| Configuration LogValueChange: GraphicsBackend set to: Vulkan
00:00:00.027 |I| Configuration LogValueChange: PreferredGpu set to: 0x1002_0x73BF
00:00:00.027 |I| Configuration LogValueChange: AntiAliasing set to: None
00:00:00.028 |I| Configuration LogValueChange: ScalingFilter set to: Bilinear
00:00:00.028 |I| Configuration LogValueChange: ScalingFilterLevel set to: 80
00:00:00.030 |I| Configuration LogValueChange: EnableDockedMode set to: True
00:00:00.031 |I| Configuration LogValueChange: EnableVsync set to: True
00:00:00.031 |I| Configuration LogValueChange: EnableShaderCache set to: True
00:00:00.031 |I| Configuration LogValueChange: EnableTextureRecompression set to: False
00:00:00.031 |I| Configuration LogValueChange: EnableMacroHLE set to: True
00:00:00.031 |I| Configuration LogValueChange: EnableColorSpacePassthrough set to: True
00:00:00.031 |I| Configuration LogValueChange: EnablePtc set to: True
00:00:00.031 |I| Configuration LogValueChange: EnableInternetAccess set to: False
00:00:00.031 |I| Configuration LogValueChange: EnableFsIntegrityChecks set to: True
00:00:00.031 |I| Configuration LogValueChange: FsGlobalAccessLogMode set to: 0
00:00:00.032 |I| Configuration LogValueChange: AudioBackend set to: SDL2
00:00:00.032 |I| Configuration LogValueChange: AudioVolume set to: 1
00:00:00.033 |I| Configuration LogValueChange: MemoryManagerMode set to: HostMappedUnsafe
00:00:00.033 |I| Configuration LogValueChange: ExpandRam set to: False
00:00:00.033 |I| Configuration LogValueChange: IgnoreMissingServices set to: False
00:00:00.033 |I| Configuration LogValueChange: UseHypervisor set to: True
00:00:00.036 |I| Configuration LogValueChange: MultiplayerMode set to: Disabled
00:00:00.037 |N| Application PrintSystemInfo: Ryujinx Version: 1.1.1+c6f8bfed9
00:00:00.048 |N| Application Print: Operating System: macOS 14.5.0 (23F5059e) (X64)
00:00:00.048 |N| Application Print: CPU: Intel(R) Core(TM) i9-9900K CPU @ 3.60GHz ; 16 logical
00:00:00.050 |N| Application Print: RAM: Total 32 GiB ; Available 18.1 GiB
00:00:00.052 |N| Application PrintSystemInfo: Logs Enabled: Info, Warning, Error, Guest
00:00:00.053 |N| Application PrintSystemInfo: Launch Mode: UserProfile
00:00:03.140 |E| .NET TP Worker 2024-04-23 20:56:27.128 Ryujinx[36062:586075] WARNING: Secure coding is not enabled for restorable state! Enable secure coding by implementing NSApplicationDelegate.applicationSupportsSecureRestorableState: and returning YES.
00:00:11.832 |E| .NET TP Worker Gpu : Error querying Vulkan devices: Unexpected API error "ErrorIncompatibleDriver".

@jcm93
Copy link
Contributor

jcm93 commented Apr 23, 2024

I tested #6573 and on my machine, unlinking vulkan-loader does not resolve the crash/failed init. Completely uninstalling vulkan-loader and vulkan-headers does not resolve it either. I do not know what the source of the issue is, but it's not vulkan-loader, at least not on my machine (M1 Max, macOS 14.4.1).

Crash/failed init also does not occur in Ryujinx debug configuration. Only occurs in run configuration on my machine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
gpu Related to Ryujinx.Graphics graphics-backend:vulkan Graphical bugs when using the Vulkan API infra Related to the project infrastructure
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants