-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
Vulkan backend #2518
Vulkan backend #2518
Conversation
This PR doesn't work with RADV, at all and crashes after character selection in amdvlk(Test System: Ryzen 5 3500u GPU: Vega 8) |
Link's Awakening crashes on boot with an AMD RX 580. (Same behavior happens with a RX 5500XT) |
original:osx 闪退 是没给mac适配吗, 为什么会出现这个问题? |
OSX does not support vulkan. |
Windows 10, Ryzen 3600, GTX 960 2 GB VRAM, 16 GB RAM
|
This was fixed in 637ffad. |
In Fedora 34 with Intel Graphics using Mesa I got next error when trying to run a game. Looks like shaderc_shared.dll is included in the build but shaderc_shared.so is not. Note I'm in a Wayland Session, so X11 is forced to make use of XWayland. $ GDK_BACKEND=x11 ./Ryujinx
00:00:00.003 |W| Application GetWindowScaleFactor: Couldn't determine monitor DPI: The type initializer for 'Gdip' threw an exception.
00:00:00.369 |I| Configuration LogValueChange: EnableFileLog set to: False
00:00:00.371 |I| Configuration LogValueChange: ResScale set to: 1
00:00:00.372 |I| Configuration LogValueChange: ResScaleCustom set to: 1
00:00:00.372 |I| Configuration LogValueChange: MaxAnisotropy set to: -1
00:00:00.373 |I| Configuration LogValueChange: AspectRatio set to: Fixed16x9
00:00:00.374 |I| Configuration LogValueChange: GraphicsBackend set to: Vulkan
00:00:00.402 |N| Application PrintSystemInfo: Ryujinx Version: 1.0.0+0165c9d
00:00:00.409 |N| Application Print: Operating System: Linux 5.13.4-200.fc34.x86_64 #1 SMP Tue Jul 20 20:27:29 UTC 2021 (X64)
00:00:00.409 |N| Application Print: CPU: Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz ; 8 logical
00:00:00.409 |N| Application Print: RAM: Total 15689 MB ; Available 11119 MB
00:00:00.412 |N| Application PrintSystemInfo: Logs Enabled: Warning, Error
00:00:00.412 |N| Application PrintSystemInfo: Launch Mode: UserProfile
00:00:00.463 |N| Application LoadApplication: Using Firmware Version: 9.0.1
00:00:01.453 |E| GUI.RenderLoop Application : Unhandled exception caught: System.DllNotFoundException: Unable to load shared library 'shaderc_shared' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: libshaderc_shared: cannot open shared object file: No such file or directory
at shaderc.NativeMethods.shaderc_compile_options_initialize()
at shaderc.Options..ctor(Boolean enableIncludes)
at Ryujinx.Graphics.Vulkan.Shader..ctor(Vk api, Device device, ShaderStage stage, ShaderBindings bindings, String glsl)
at Ryujinx.Graphics.Vulkan.TextureBlit..ctor(VulkanGraphicsDevice gd, Device device)
at Ryujinx.Graphics.Vulkan.VulkanGraphicsDevice.SetupContext(GraphicsDebugLevel logLevel, String[] requiredExtensions)
at Ryujinx.Graphics.Vulkan.VulkanGraphicsDevice.Initialize(GraphicsDebugLevel logLevel)
at Ryujinx.Ui.RendererWidgetBase.Render()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location ---
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
Unhandled exception. System.DllNotFoundException: Unable to load shared library 'shaderc_shared' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: libshaderc_shared: cannot open shared object file: No such file or directory
at shaderc.NativeMethods.shaderc_compile_options_initialize()
at shaderc.Options..ctor(Boolean enableIncludes)
at Ryujinx.Graphics.Vulkan.Shader..ctor(Vk api, Device device, ShaderStage stage, ShaderBindings bindings, String glsl)
at Ryujinx.Graphics.Vulkan.TextureBlit..ctor(VulkanGraphicsDevice gd, Device device)
at Ryujinx.Graphics.Vulkan.VulkanGraphicsDevice.SetupContext(GraphicsDebugLevel logLevel, String[] requiredExtensions)
at Ryujinx.Graphics.Vulkan.VulkanGraphicsDevice.Initialize(GraphicsDebugLevel logLevel)
at Ryujinx.Ui.RendererWidgetBase.Render()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location ---
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
Aborted (core dumped) |
Perhaps you need to install this dependency, for example for arch this package https://archlinux.org/packages/extra/x86_64/shaderc/ provides this shared library, for fedora find a way to get libshaderc |
AMD graphics card Pokémon sword shield white screen |
For anyone reporting issues on specific Vendors and Configurations, please post the GPU model you have, the operating system you're on, and the driver you're using. Even better, upload a full log as well. |
I'm going to start collating issues I've observed here. All tests were performed on the following hardware, with the same Ryujinx settings, unless noted otherwise: OS: Windows 10 21H1 19043.1151 Ryujinx Ver: Ryujinx built from fb186f8 General Findings
|
Thanks! It worked. I had to symblink libshaderc_shared.so.1 > libshaderc_shared.so because it didn't exist. $ sudo dnf install libshaderc
$ sudo ln -s /usr/lib64/libshaderc_shared.so.1 /usr/lib64/libshaderc_shared.so |
System info
New Super Mario Bros U DeluxeNote: Performance is better in OpenGL and there no graphic issues |
Mesa OpenGL is likely going to be the preferred choice for many users for a while, until Vulkan can be refined and optimised. It's really only Intel and AMD on Windows that suffer the most from OpenGL and Vulkan provides a big boost there. Eventually, the hope is, that Vulkan becomes the first class backend, however the first iteration was never going to beat OpenGL on Mesa or the NV OGL drivers on Windows. |
Fixed on 266be80.
Fixed on 66dd537. |
Note for AMD GPU users on Windows: The issue causing model vertices being stretched out was fixed. The crash when changing the resolution scale was fixed. The crash on Pokémon Sword on scenes with DoF or fog effects was also fixed. If you find any more games with vertex explosions etc exclusive to AMD, please let me know. Downgrading the driver should be no longer needed, just use the latest version. The window transparency issue was not fixed yet, I was not able to find a way to reproduce it so far, only some systems are affected. |
This is something changed in today's release the old release from yesterday did not have the transparency problem. |
Can you provide a screenshot to demonstrate each of the issues? The issue with BRAVELY DEFAULT II sounds like a standard issue that exists in master on all vendors at the moment. |
I've tested both of the above transparency issues, and neither reproduced the issue where some users see the entire window going semi-transparent. A video reproducing this issue can be found here: https://youtu.be/qRnNafuG9fo?t=310 |
The transparency issue can be fixed by turning off image sharpening in the radeon software. Should also work the other way around to trigger it. |
Thanks legend~! Can confirm that this causes the issue on latest AMD drivers on Windows... attempting to figure out what causes it now! |
Disabling sharpening worked for me also for the transparency issue but not my crashing issue on loading Dragon Quest XI. |
Try deleting PPTC and Shader cache, sometimes games crash when they have older files that are being loaded in or something. |
AlignUp helper does not support NPOT alignment, and ASTC textures can have NPOT block sizes
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
Win10 RX 570 22.7.1 |
Are you using resolution scale? If so, does the issue happen at native resolution (1x)? |
That was Xenoblade Chronicles Definitive Edition, not Xenoblade Chronicles 3, they are different games. |
Thanks to everyone that helped testing Vulkan over the past year! Since it is now merged, please open separate issues for the remaining problems with Vulkan, rather than posting them here. Thanks. |
It only happens at 1x, looks fine on 2x and up |
I just want to say... bravo. |
oi CDAKACHAN pode deixar eu entrar no discord por favor meu amigo |
[Ryujinx/Ryujinx] Vulkan backend
|
Overview
This is a WIP implementation of a Vulkan graphics backend. The main goal here is improving the performance for AMD users, however there are other advantages of using Vulkan for all vendors.
Main advantages of Vulkan (for all vendors):
Pending work
Those items should be completed before the Vulkan implementation is merged.
Other nice-to-haves, not essential for merge:
Should have some very minor performance improvement for AMD.AMD now supports Uint8 index buffers.Consider using a separate thread for command submission. Might benefit Intel due to the workaround that makes it submit commands a lot.No longer an issue, the workaround was removed as the bug was fixed on their driver.Known issues
Some game models are stretching to the origin on AMD. The last version of their driver that is known to function properly is 21.3.2. You might want to downgrade it if you want to try this without the vertex corruption for now.Fixed on 66dd537, downgrading the driver should be no longer needed, just use the latest version.Performance roadmap
The changes below should improve performance significantly on the Vulkan backend in the near future.
Threaded GAL: Large performance improvements for all vendors, since Vulkan drivers do not provide any form of threaded optimizations, unlike OpenGL.SPIR-V backend: This will not improve overall performance, but will reduce shader compilation times and consequently, stutters, resulting in a smoother experience.Async shader compilation: This is something that is asked a lot. The truth is that async shader compilation is not really worth it, since it introduces graphical glitches, and in fact, pretty much all emulators that implemented this feature in the past are moving away from it because there are better alternatives. The better alternative in this case is parallel shader compilation, which also reduces the compilation times significantly without introducing graphical glitches. This is already implemented as part of Threaded GAL, and will also come to Vulkan after Threaded GAL is merged.
Improvements
AMD:
TBD
Intel:
Some graphical issues that exists on OpenGL are not present on Vulkan.
OpenGL:
Vulkan:
OpenGL:
Vulkan:
OpenGL:
Vulkan:
What to test
All games really, but if you find a issue, before reporting, make sure it was not already reported, or is included on the "known issues" section.
Closes #2924.