Using Vulkan with RetroPie
-
I've installed the Vulkan video drivers on my Pi 5 using sudo apt install mesa-vulkan-drivers mesa-utils vulkan-tools.
I've seen a build where they are getting Naomi 2 games to run close to full speed and they have the following line in their retroarch.cfg:
video_driver = "vulkan"
I've done a re-install of retroarch again after installing the Vulkan drivers but if I add that to my .cfg file the games just crash back to emulationstation.
Any help on how to get that running and how to make retroarch see that I've installed that driver?
Thank you.
-
Doing more research I found a post on reddit and followed these steps:
Add the green highlighted parts of sdl2.sh and system.sh from this dev repo to yours. https://github.com/cmitu/RetroPie-Setup/commit/192144f215c9ed0f717531a242f447ab9d325701
Edit your system.sh, go to "[[ "$__has_dispmanx" -eq 1 ]] && __platform_flags+=(dispmanx)" and then add the following:
# Pi4/5 have Vulkan working under KMS on Debian 12 (bookworm) or newer
if (isPlatform "rpi4" || isPlatform "rpi5") && [[ "$__os_debian_ver" -ge 12 ]]; then
__platform_flags+=(vulkan)
fiIt should look like this when it's done:
[[ "$__has_dispmanx" -eq 1 ]] && __platform_flags+=(dispmanx)
# Pi4/5 have Vulkan working under KMS on Debian 12 (bookworm) or newer
if (isPlatform "rpi4" || isPlatform "rpi5") && [[ "$__os_debian_ver" -ge 12 ]]; then
__platform_flags+=(vulkan)
fi
else
__platform_flags+=(videocore dispmanx)
fiEdit your system.sh , go to "platform_rpi5", and add the vulkan flag after "gles31". It should look like this:
function platform_rpi5() {
cpu_armv8 "cortex-a76"
__platform_flags+=(rpi gles gles3 gles31 vulkan)IMPORTANT: Re-install sdl2, retroarch, and flycast-dev from source again in that order. Open a game with flycast-dev, go to the retroarch menu, change the driver to vulkan, save config, and exit.
This actually worked! I can now select Vulkan from the RA drivers menu...
But...
Naomi 2 games still seem to lag and stutter. So what else could I be doing to improve that performance?
-
Update! In Core Options I turned set Alpha Sorting to "Per-Strip" and now VF4 is lightning fast!
-
So here's another question for all of you and maybe @mitu will know the answer....
I went back and forth testing Vulkan and GL with Naomi 2 games and to be honest I didn't notice too much of a difference once I set the Alpha Sorting to Per-Strip.
So my question is... SHOULD I be seeing that much of a difference? Or does Vulkan not really add to much in terms of performance to these games?
-
@TPR
Let's wait for official support of vulkan drivers. For now, it is not clear if it's make difference. -
@abj 100% totally understood. Was just wanting to make sure I didn't do something wrong and was supposed to be seeing an improvement.
It's funny... I keep seeing in other forums (Reddit, etc....) people talking up Vulkan... but then I get it installed and I'm all "Huh... maybe this is oversold?"
But I hear you... I'm all for waiting for the official support.
I'm impressed with how much stuff I've been able to get going on the Pi 5 already.... but I'm also not in any rush either!
Thank you!
-
Re: Using Vulkan with RetroPie
Hi,
i am also experimenting with vulkan (on my 64 bit pi4 bookworm install)
I basically followed the standard manual setup on a pi4, but using the a modified retropie setup script: I merged this commit in the latest version of the setup script: https://github.com/RetroPie/RetroPie-Setup/pull/3785
happy to see that libretro indead now supports vulkan, but i would also like to use PPSSPP with vulkan. I see it was compiled now with vulkan, cause i can select the option.
good news is: Under X11 it works and has a better perfomance that on OpenGL.
bad news: Without X11 i get an error "vulkan subsystem 13 not supported"anyone recognize this error and know how to get arround it?
-
It looks like a known issue, see: https://github.com/hrydgard/ppsspp/issues/14672
-
@abj said in Using Vulkan with RetroPie:
@TPR
Let's wait for official support of vulkan drivers. For now, it is not clear if it's make difference.I haven't been following this so I apologize but did vulkan ever get official support?
-
It's not merged yet, but I'm sure it will be when the time comes. See: https://github.com/RetroPie/RetroPie-Setup/pull/3785.
To answer your previous question: yes, the Vulkan driver provides noticeble better performance with the Flycast, Dolphin, and PPSSPP emulators. The extent of the improvement depends on the game.
-
@sugarfree said in Using Vulkan with RetroPie:
It's not merged yet, but I'm sure it will be when the time comes. See: https://github.com/RetroPie/RetroPie-Setup/pull/3785.
To answer your previous question: yes, the Vulkan driver provides noticeble better performance with the Flycast, Dolphin, and PPSSPP emulators. The extent of the improvement depends on the game.
OK thanks. Those are the emulators I've been using it on.
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.