Skip to content

Commit ed2599c

Browse files
committed
systems: add Vulkan flags for Pi4/Pi5
Added Vulkan as supported renderer for Pi4/Pi5 when running on RaspiOS 12 Bookworm or later Technically the support was added in Bullseye for Pi4, but it was only available under X11. Notes: - most emulators include the Vulkan headers, so there's no need to add `libvulkan-dev` as a dependency. - not all emulators will run with Vulkan from KMS/DRM - `ppsspp`/`dolphin` can use it under x11/wayland, while `retroarch` runs with the`vulkan` video driver on KMS/DRM. - switching RetroArch to use the `vulkan` renderer needs to include the installation/configuration of SLANG shaders, which is not handled at the moment.
1 parent cc5bfb4 commit ed2599c

5 files changed

Lines changed: 9 additions & 1 deletion

File tree

scriptmodules/emulators/dolphin.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ function depends_dolphin() {
5050
# if using the latest version, add SDL2 as dependency, since it's mandatory
5151
[[ "$(_get_commit_dolphin)" == "" ]] && depends+=(libsdl2-dev)
5252

53+
# install Vulkan drivers when needed
54+
isPlatform "vulkan" && depends+=(mesa-vulkan-drivers)
5355
getDepends "${depends[@]}"
5456
}
5557

scriptmodules/emulators/ppsspp.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ function depends_ppsspp() {
3131
isPlatform "videocore" && depends+=(libraspberrypi-dev)
3232
isPlatform "mesa" && depends+=(libgles2-mesa-dev)
3333
isPlatform "vero4k" && depends+=(vero3-userland-dev-osmc)
34+
isPlatform "vulkan" && depends+=(mesa-vulkan-drivers)
3435
getDepends "${depends[@]}"
3536
}
3637

scriptmodules/emulators/retroarch.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ function depends_retroarch() {
2222
isPlatform "mesa" && depends+=(libx11-xcb-dev)
2323
isPlatform "mali" && depends+=(mali-fbdev)
2424
isPlatform "x11" && depends+=(libx11-xcb-dev libpulse-dev)
25-
isPlatform "vulkan" && depends+=(libvulkan-dev mesa-vulkan-drivers)
25+
isPlatform "vulkan" && depends+=(libvulkan-dev mesa-vulkan-drivers vulkan-validationlayers)
2626
isPlatform "vero4k" && depends+=(vero3-userland-dev-osmc zlib1g-dev libfreetype6-dev)
2727
isPlatform "kms" && depends+=(libgbm-dev)
2828

scriptmodules/supplementary/sdl2.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ function _list_depends_sdl2() {
4949
isPlatform "gl" || isPlatform "rpi" && depends+=(libgl1-mesa-dev libglu1-mesa-dev)
5050
isPlatform "kms" || isPlatform "rpi" && depends+=(libdrm-dev libgbm-dev)
5151
isPlatform "x11" && depends+=(libpulse-dev libwayland-dev)
52+
isPlatform "vulkan" && depends+=(libvulkan-dev)
5253

5354
echo "${depends[@]}"
5455
}

scriptmodules/system.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -365,6 +365,10 @@ function get_rpi_video() {
365365
fi
366366
fi
367367
[[ "$__has_dispmanx" -eq 1 ]] && __platform_flags+=(dispmanx)
368+
# Pi4/5 have Vulkan working under KMS on Debian 12 (bookworm) or newer
369+
if (isPlatform "rpi4" || isPlatform "rpi5") && [[ "$__os_debian_ver" -ge 12 ]]; then
370+
__platform_flags+=(vulkan)
371+
fi
368372
else
369373
__platform_flags+=(videocore)
370374
if ! isPlatform "aarm64"; then

0 commit comments

Comments
 (0)