Skip to content

Commit

Permalink
systems: add Vulkan flags for Pi4/Pi5
Browse files Browse the repository at this point in the history
Added Vulkan as supported renderer for Pi4/Pi5 when running on RaspiOS 12 Bookworm.
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.
  • Loading branch information
cmitu committed Mar 21, 2024
1 parent 5683e78 commit 1b98fb5
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions scriptmodules/emulators/dolphin.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ function depends_dolphin() {
# if using the latest version, add SDL2 as dependency, since it's mandatory
[[ "$(_get_commit_dolphin)" == "" ]] && depends+=(libsdl2-dev)

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

Expand Down
1 change: 1 addition & 0 deletions scriptmodules/emulators/ppsspp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ function depends_ppsspp() {
isPlatform "videocore" && depends+=(libraspberrypi-dev)
isPlatform "mesa" && depends+=(libgles2-mesa-dev)
isPlatform "vero4k" && depends+=(vero3-userland-dev-osmc)
isPlatform "vulkan" && depends+=(mesa-vulkan-drivers)
getDepends "${depends[@]}"
}

Expand Down
1 change: 1 addition & 0 deletions scriptmodules/supplementary/sdl2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ function _list_depends_sdl2() {
isPlatform "gl" || isPlatform "rpi" && depends+=(libgl1-mesa-dev libglu1-mesa-dev)
isPlatform "kms" || isPlatform "rpi" && depends+=(libdrm-dev libgbm-dev)
isPlatform "x11" && depends+=(libpulse-dev libwayland-dev)
isPlatform "vulkan" && depends+=(libvulkan-dev)

echo "${depends[@]}"
}
Expand Down
4 changes: 4 additions & 0 deletions scriptmodules/system.sh
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,10 @@ function get_rpi_video() {
fi
fi
[[ "$__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)
if ! isPlatform "aarm64"; then
Expand Down

0 comments on commit 1b98fb5

Please sign in to comment.