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 Oct 29, 2023
1 parent 10a90d3 commit 192144f
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions scriptmodules/emulators/dolphin.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ function depends_dolphin() {
else
depends+=(qtbase5-private-dev)
fi
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 @@ -22,6 +22,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 @@ -364,6 +364,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 dispmanx)
fi
Expand Down

0 comments on commit 192144f

Please sign in to comment.