GreemDev / Ryujinx

Experimental Switch emulator written in C#
MIT License
3.74k stars 279 forks source link

[Bug] Unhandled exceptions using Vulkan Backend #162

Open codeflorist opened 2 days ago

codeflorist commented 2 days ago

Description of the issue

I'm consistently getting the following error starting games using Vulkan:

00:00:16.049 |E| GUI.RenderThread Application : Unhandled exception caught: System.Runtime.InteropServices.SEHException (0x80004005): External component has thrown an exception.
   at Silk.NET.Vulkan.Vk.CmdBindPipeline(CommandBuffer commandBuffer, PipelineBindPoint pipelineBindPoint, Pipeline pipeline)
   at Ryujinx.Graphics.Vulkan.PipelineBase.CreatePipeline(PipelineBindPoint pbp) in D:\a\Ryujinx\Ryujinx\src\Ryujinx.Graphics.Vulkan\PipelineBase.cs:line 1701
   at Ryujinx.Graphics.Vulkan.PipelineBase.RecreateGraphicsPipelineIfNeeded() in D:\a\Ryujinx\Ryujinx\src\Ryujinx.Graphics.Vulkan\PipelineBase.cs:line 1648
   at Ryujinx.Graphics.Vulkan.PipelineBase.Draw(Int32 vertexCount, Int32 instanceCount, Int32 firstVertex, Int32 firstInstance) in D:\a\Ryujinx\Ryujinx\src\Ryujinx.Graphics.Vulkan\PipelineBase.cs:line 331
   at Ryujinx.Graphics.Vulkan.HelperShader.BlitColor(VulkanRenderer gd, CommandBufferScoped cbs, TextureView src, TextureView dst, Extents2D srcRegion, Extents2D dstRegion, Boolean linearFilter, Boolean clearAlpha) in D:\a\Ryujinx\Ryujinx\src\Ryujinx.Graphics.Vulkan\HelperShader.cs:line 462
   at Ryujinx.Graphics.Vulkan.Window.Present(ITexture texture, ImageCrop crop, Action swapBuffersCallback) in D:\a\Ryujinx\Ryujinx\src\Ryujinx.Graphics.Vulkan\Window.cs:line 438
   at Ryujinx.Graphics.GAL.Multithreading.Commands.Window.WindowPresentCommand.Run(WindowPresentCommand& command, ThreadedRenderer threaded, IRenderer renderer) in D:\a\Ryujinx\Ryujinx\src\Ryujinx.Graphics.GAL\Multithreading\Commands\Window\WindowPresentCommand.cs:line 24
   at Ryujinx.Graphics.GAL.Multithreading.CommandHelper.<>c.<InitLookup>b__5_1[T](Span`1 memory, ThreadedRenderer threaded, IRenderer renderer) in D:\a\Ryujinx\Ryujinx\src\Ryujinx.Graphics.GAL\Multithreading\CommandHelper.cs:line 43
   at Ryujinx.Graphics.GAL.Multithreading.ThreadedRenderer.RenderLoop() in D:\a\Ryujinx\Ryujinx\src\Ryujinx.Graphics.GAL\Multithreading\ThreadedRenderer.cs:line 146
   at Ryujinx.Graphics.GAL.Multithreading.ThreadedRenderer.RunLoop(ThreadStart gpuLoop) in D:\a\Ryujinx\Ryujinx\src\Ryujinx.Graphics.GAL\Multithreading\ThreadedRenderer.cs:line 115
   at Ryujinx.Ava.AppHost.RenderLoop() in D:\a\Ryujinx\Ryujinx\src\Ryujinx\AppHost.cs:line 985
   at System.Threading.Thread.StartCallback()

It has been quite a while with new versions this way. I have an old version 1.1.1243.0 from march, that is still working.

I'm on Windows 11 with a 3080 RTX. Drivers are all up-to-date.

Switching to OpenGL solves the problem.

Reproduction steps

Start any game (e.g. Metroid Prime Remastered) with Vulkan.

Log file

OS

Windows 11

Ryujinx version

1.2.69.0

Game version

No response

CPU

i7-13700K

GPU

NVIDIA RTX 3080

RAM

No response

List of applied mods

No response

Additional context?

No response

codeflorist commented 2 days ago

Interestingly enough it works on a much more outdated machine: i7-7700k / GTX 970 / Win 10 64bit

GabCoolDude commented 2 days ago

Can you upload the full log ? Just drag and drop it instead of copy pasting it

codeflorist commented 2 days ago

Here it is: Ryujinx_1.2.69_2024-11-02_14-09-37.log

I've just made another interesting discovery. It works, if Ryujiinx is started as Administrator mode.

GabCoolDude commented 2 days ago

I suggest not starting Ryujinx as Admin, it can mess stuff up.

Can you tell me what's the filepath to Ryujinx ?

codeflorist commented 2 days ago

Filepath is D:\Spiele\Ryujinx and using portable mode.