Ryujinx Gets The Vulkan Treatment
You heard that right: Ryujinx, one of the Nintendo Switch emulators available on PC/Linux, has recently received a Vulkan backend via a pull request on their GitHub. By using Vulkan, AMD and Intel users will see a massive performance upgrade, and not only this, but those who are using Intel’s integrated GPU will see a lot less graphical glitches. While those with NVIDIA may not see as big of a difference, according to the June 2021 progress report they will see “a small performance improvement in a few titles.”
But don’t let me talk too much about it; just see the difference in performance on Mario Kart 8 using OpenGL versus Vulkan on a RX 5500 XT (this was from their April progress report):
Now see how the same game plays with Vulkan:
As for graphical bugs on Intel, check out what’s been fixed with Kirby (other games benefit as well, not just Kirby):
OpenGL:
Vulkan:
There’s more benefits to Vulkan besides the performance improvements and graphical bugs getting fixed. AMD, Intel, and even NVIDIA benefit from:
- Support for compressed 3D textures: Fixes graphical glitches on Tales of Vesperia, Ghost & Goblins returns, Monster Hunter Rise and more.
- Support for textures views between compressed and uncompressed formats. Avoids copies, we do not yet take advantage of this, but will in the future.
- Supports for 2D array views from 3D textures. Avoids copies, we do not yet take advantage of this, but will in the future.
- Allows transform feedback buffers to have other uses while the transform feedback is active. Avoids copies.
There’s still a lot of work left, however, before this pull request gets merged into the main branch. The developers are working on adding alpha test and multisampling support, better stability on the AMD drivers, “Index buffer conversion for quads,” a pipeline cache, among many other things. The PR mentions that you’re going to want to use the 21.3.2 driver for AMD. What the equivalent of that is on Linux, I’m not sure. The developers also mention some games softlocking on Intel, missing transparency in others, and the game window being partially transparent on AMD.
Threaded GAL and SPIR-V will enhance the performance of Vulkan even further. Threaded GAL will provide threaded optimization, and SPIR-V will reduce shader compilation times. Both of these will definitely be appreciated, as shader compilation in particular is a bit painful to go through right now. These are being worked on as we speak.
Want to give Vulkan a shot? Just head over to the pull request, download and extract the release (you can use the headless version if you want; it has no GUI), and start testing any game you have. Vulkan is already enabled by default for the graphics API; if you want to go back to OpenGL just go into the emulator’s settings menu, and under the Graphics tab, click on the “Graphics Backend” dropdown menu:
Though I have only tested briefly with my GTX 1660, the great news with the new backend is MangoHUD works nicely now. On the other hand, Skyward Sword HD ran like molasses at an average of just 10 FPS:
Super Smash Bros. Ultimate ran at an average of 45 FPS. One thing to consider though, seeing as this PR just came fresh out of the oven, is threaded optimization (Threaded GAL) isn’t implemented yet, which slows the performance down drastically. There’s already a PR for that as well. I’ve yet to test this, but it’s probably going to come in handy.
Once Vulkan matures and has become merged with the main branch, I will have an extensive performance test between OpenGL versus Vulkan. On NVIDIA it will probably hardly make a difference, but it’s worth a shot. In the meantime, if you want to try Vulkan for yourself, head over to the PR. Report any bugs you find there. And if you need a refresher on how to emulate Switch games on Linux, head over to our guide.