Repository navigation
Ghostty Raspberry Pi 5 support via (OpenGL es3.1 or vulcan) #13907
Replies: 3 comments 1 reply
|
I think we (the GTK team) are definitely interested in a Vulkan renderer. |
|
Seconding Tristan here, though I have some concerns regarding the code quality. First I think we need to come up with an alternative to GLArea that abstracts over the renderer so it works regardless of the graphics backend. |
Uh oh!
There was an error while loading. Please reload this page.
Ghostty's Linux renderer requires desktop OpenGL 4.3. The Raspberry Pi 5 family tops out at GL 3.3, so ghostty exits with "Unable to acquire an OpenGL context" there. The same GPUs do expose GLES 3.1 and conformant Vulkan 1.3.
In #11370 (Android support) a maintainer said a GLES-only renderer contribution "might" get a look. We built one. We also built a Vulkan backend to answer the presentation question, and benchmarked both on hardware. Both are public, reviewable, and running as daily drivers:
#version 430, all core in GLES 3.1, with one hardware caveat: Mesa's v3d driver reports zero vertex-stage SSBOs, so the cell-background SSBO read moves to the fragment stage.VkImage→ dmabuf export (VK_EXT_external_memory_dma_buf+VK_EXT_image_drm_format_modifier) →GdkDmabufTextureBuilder→GtkPicture. Full write-up: VULKAN-PORT.md. Works on GTK 4.14 (theGdkDmabufTextureBuilderfloor) through 4.22.Benchmarks
Raspberry Pi CM5, live Hyprland session, ReleaseFast, medians of 3 (
term-benchin the repo; full methodology in BENCHMARK.md):On x86/radv the Vulkan path benchmarks at parity with the stock desktop-GL renderer — the dmabuf presentation added no measurable cost in any workload we ran. Both backends are interactive-fluid on the Pi; software GL (llvmpipe) saturates all four cores and is not usable.
Bugs found during bring-up that affect upstream independently
src/Surface.zigcallsfinalizeSurfaceIniton a stack copy of the renderer after the renderer has already been moved intoself.renderer. State set inside that call lands on a dead copy. The GL and Metal backends store nothing at that point, so the bug stayed invisible.GDK_DISABLE=gles-apibefore the GL-version gate, so hardware that could satisfy a GLES context never gets the chance — on the Pi, context creation fails twice over.What we're asking
Is there appetite for the GLES renderer as a PR against main? It's the small diff, it changes nothing on desktop-GL systems, and per the earlier comment it appears to be the shape you'd consider. We'd rebase onto current main and adapt to the renderer changes since 1.3.1. The Vulkan branch is offered as data — it demonstrates the complete GTK-without-GL path and what it buys — rather than as a merge candidate; it lacks custom-shader and inspector support.
Hardware verified on: Raspberry Pi CM5 (v3dv, Hyprland, GTK 4.22) and x86_64/radv (GTK 4.14, sway). Happy to run additional workloads or targets on request.
TLDR: Add support for GLES 3.1 for Raspberry pi 5 support, smallest patch. Vulcan support for most performance. This should also unlock Android support #11370
All reactions