Add Vulkan Support to RetroPie for Pi 4?
-
@BuZz am I correct in understanding that the debhelper will override build and CFLAGS flags, etc since it relies on the maintainer using their own flags? (dpkg-buildflags)
I have been building and using the latest SDL2 (v2.0.15) for some time now and I noticed that if I explicitly use the debhelper options to specify the CFLAGS that
retropie_setup.sh
script uses those flags specified and it will pass through onto the log, otherwise they do not. See snippet below:(this was on 64-bit RPiOS w/ RPi4)
debian/rules override_dh_auto_configure make[1]: Entering directory '/home/pi/RetroPie-Setup/tmp/build/sdl2/2.0.15+1rpi' CFLAGS=" -mcpu=cortex-a72 -O2 -g -O3 -fdebug-prefix-map=/home/pi/RetroPie-Setup/tmp/build/sdl2/2.0.15+1rpi=. -fstack-protector-strong -Wformat -Werror=format-security" CPPFLAGS="-Wdate-time -D_FORTIFY_SOURCE=2" CXXFLAGS=" -mcpu=cortex-a72 -O2 -g -O3 -fdebug-prefix-map=/home/pi/RetroPie-Setup/tmp/build/sdl2/2.0.15+1rpi=. -fstack-protector-strong -Wformat -Werror=format-security" FCFLAGS="-g -O2 -fdebug-prefix-map=/home/pi/RetroPie-Setup/tmp/build/sdl2/2.0.15+1rpi=. -fstack-protector-strong" FFLAGS="-g -O2 -fdebug-prefix-map=/home/pi/RetroPie-Setup/tmp/build/sdl2/2.0.15+1rpi=. -fstack-protector-strong" GCJFLAGS="-g -O2 -fdebug-prefix-map=/home/pi/RetroPie-Setup/tmp/build/sdl2/2.0.15+1rpi=. -fstack-protector-strong" LDFLAGS="-Wl,-z,relro" OBJCFLAGS="-g -O2 -fdebug-prefix-map=/home/pi/RetroPie-Setup/tmp/build/sdl2/2.0.15+1rpi=. -fstack-protector-strong -Wformat -Werror=format-security" OBJCXXFLAGS="-g -O2 -fdebug-prefix-map=/home/pi/RetroPie-Setup/tmp/build/sdl2/2.0.15+1rpi=. -fstack-protector-strong -Wformat -Werror=format-security" dh_auto_configure -Bbuilddir/all -- --disable-dummyaudio --disable-video-dummy --enable-video-kmsdrm --disable-video-wayland --disable-rpath --disable-video-directfb --disable-nas --disable-esd --disable-arts cd builddir/all && ../../configure --build=aarch64-linux-gnu --prefix=/usr --includedir=\${prefix}/include --mandir=\${prefix}/share/man --infodir=\${prefix}/share/info --sysconfdir=/etc --localstatedir=/var --disable-option-checking --disable-silent-rules --libdir=\${prefix}/lib/aarch64-linux-gnu --libexecdir=\${prefix}/lib/aarch64-linux-gnu --disable-maintainer-mode --disable-dependency-tracking --disable-dummyaudio --disable-video-dummy --enable-video-kmsdrm --disable-video-wayland --disable-rpath --disable-video-directfb --disable-nas --disable-esd --disable-arts This may all be trivial but since
retropie_setup.sh
is built to pass through these flags everywhere else I'm unsure if that is happening with the sdl2.sh. -
@bluestang I believe our flags are passed through for sdl2. I looked into this before I think to confirm. I think i forced V=1 as makefile parameter and it shows them being used.
Try
sudo __makeflags="V=1" ./retropie_packages.sh sdl2
(I did a quick test while writing this and the flags show up).
-
Does anybody have an idea of how to build PPSSPP (standalone, not Libretro core) with Vulkan support on the Pi 4? The build that is available in RetroPie has Vulkan listed as an option for the backend, but when I select it and reload it, it crashes. After loading it again, it resets itself back to OpenGL. I'm guessing it isn't properly built with Vulkan support as is. @bluestang maybe?
-
@joelkolb said in Add Vulkan Support to RetroPie for Pi 4?:
Does anybody have an idea of how to build PPSSPP (standalone, not Libretro core) with Vulkan support on the Pi 4? The build that is available in RetroPie has Vulkan listed as an option for the backend, but when I select it and reload it, it crashes. After loading it again, it resets itself back to OpenGL. I'm guessing it isn't properly built with Vulkan support as is. @bluestang maybe?
The problem is that Vulkan on the Pi4 is not supported by standalone PPSSPP in the Linux KMS/DRM API. The issue is that SDL2 itself does not have proper support for Vulkan contexts using KMS/DRM. Work is being done to implement this so it will happen eventually.
If you were to run it in X11 it will work, but that is not a supported RetroPie configuration. In addition, performance is not better than OpenGL.
-
@bluestang I see. Thank you for the explanation. I guess I'll just have to wait.
-
@buzz said in Add Vulkan Support to RetroPie for Pi 4?:
sudo __makeflags="V=1" ./retropie_packages.sh sdl2
Ah yes, thanks for the clarification.
On a side note, SDL2 had some recent commits that show a tangible performance increase for the Pi4 in EmulationStation. Unfortunately, these are post-release v2.0.14...
There is another minor issue with upstream SDL2. The Debian packaging files need to be updated in upstream as well. Building with debhelper compat v9 outputs many warnings that it is deprecated. It will build successfully but it should be updated to get rid of those warnings.
- 13 days later
-
Based on the 5.10 kernel thread in the Raspberry Pi forums, it appears that MESA updates through apt will only consist of bug fixes for the RPis. New features, i.e. Vulkan, are likely to appear with new version releases of Debian.
As best I can tell, Bullseye should be slated for a summer release but there is still no official date.
This news comes as a surprise.
-
@bluestang Hmm. I guess that goes for the 64-bit distro too.
Odd that they would choose to wait so long for Mesa to come via the upstream Debian, given the money they spent having the Vulkan API implemented.
Would a future RetroPie release ship with a local version of Mesa?
Manjaro just brought Mesa 20.3.3 into their stable release branch, along side Kernel 5.10.9. For fun I configured it to boot with full KMS, but then RetroArch (1.9.0) refused to start:
The path /dev/dri/ cannot be opened is not available
-
-
@bluestang Hi my friend.
I ve been working the last month on Vulkan on Pi4
I think we should have a recap basis latest .
I ll share my latest too - 5 months later
-
Hallo, can i activate Vulkan for all cores in Retoarch/Retropie? Or should i activate it per core? In which Config File can i Test ist?
-
@sierrafool There's no switch to activate Vulkan in RetroPie as it is. Vulkan is not included in the RetroArch build and support for it is not present in Raspberry Pi OS. You'll need to manually compile MESA with Vulkan support and the same for RetroArch.
-
@mitu thanks, i Inderstand. Inhaber Compiler Mesa with Vulkan via pikiss. How can i Compile Retroarch with Vulkan Support? Can i See, how the Retropie Script Compile this and add a Vulkan Parameter?
-
@sierrafool You can see the RetroPie install script for RetroArch here, this includes the compilation switches used by RetroPie.
- about a month later
-
How the development is going? I am hyped by the idea of Redream + Vulkan
-
@sergioad as mitu said
Vulkan is not included in the RetroArch build and support for it is not present in Raspberry Pi OS.
we need to wait for the next version of raspberry pi OS, based on debian bullseye, which should include mesa with vulkan support. once that is there, retropie could update the script modules to include support for retroarch/appropriate emulators.
I am hyped by the idea of Redream + Vulkan
does redream support vulkan? i don't believe it does.
-
@dankcushions thanks for the reply
-
@dankcushions AFAIK it does
-
@sergioad it does not. confirmed by the dev on their discord many times, and the official website: https://redream.io/help
flycast supports vulkan, although apparently pi4 has issues: https://github.com/libretro/flycast/issues/983
-
@dankcushions ok, thanks
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.