feat: add support for pi5 V3D split gpu#2079
feat: add support for pi5 V3D split gpu#2079Ericky14 wants to merge 1 commit intoValveSoftware:masterfrom
Conversation
|
I'm testing this (and failing) on a Raspberry PI 5 4GB. I'm running Ubuntu desktop 25.10 and latest mesa (26.0.0), kernel 6.17.0 and latest firmware. I have applied this PR to the source package of gamescope 3.16.19 for ubuntu unstable, it should be close to master, it mostly fixes broken upstream building on ubuntu. I'm testing this from a tty with Last lines: I see from the output that it's skipping For completeness, I've also tested running nested in gnome with |
I have only tested this on Fedora on a Pi5 8gb I'll give Ubuntu a try For reference here is the branch where I made a build from for GameOS: https://github.com/playtron-os/gameos/tree/pi5, it's just something I put together to prove it was possible to run on PI5. You can build an arm image and run the customize script on it to inject the right kernel and modules for the pi5. |
V3D has several hardware limitations that require workarounds: 1. Split render/display architecture: Pi5 has separate V3D GPU (card0) and VC4 display controller (card1). Added detection and fallback to find KMS-capable display device when render device lacks KMS. 2. Swapchain format: V3D only supports B8G8R8A8 formats. Added V3D detection and format preference in SDL/DRM backends. 3. Channel swap: Shaders declare rgba8 but V3D swapchain is BGR. Added c_swapChannels specialization constant to swap R/B in output. 4. Tiled/LINEAR mismatch: V3D compute shaders can only write to tiled (UIF) images, but VC4 display needs LINEAR for scanout. Created separate tiled storage images and linear scanout images with copy. 5. LINEAR sampling: V3D cannot sample LINEAR textures. Added tiled shadow textures that get copied from LINEAR dmabufs before sampling. 6. Optional extensions: Made VK_KHR_present_id/wait optional as V3D only has present_id2/wait2 variants. 7. Null descriptors: V3D lacks VK_EXT_robustness2. Added dummy image views for null descriptor slots. Tested on Raspberry Pi 5 with DRM and SDL backends.
|
I have tested the new changes. On sdl it is working (mutter), but I can't get it to work on drm! A color-shifted screen buffer seems to be used as the mouse cursor (and it cannot reach the entire screen) I've set up seatd and CAP_SYS_NICE. I have tried various cli options (including forcing composition, grabbing the cursor, and selecting the preferred vulkan device) but to no avail. I'm attaching a short video of the issue and the corresponding logs of testing with supertuxkart, but it behaves the same with other programs: video_2026-02-19_19-25-19.mp4Thank you for your work! |


This PR adds support for PI5 to use the GPU for rendering