Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting up OpenGL within Flatpaks #121

Open
Calinou opened this issue Jun 1, 2024 · 2 comments
Open

Setting up OpenGL within Flatpaks #121

Calinou opened this issue Jun 1, 2024 · 2 comments

Comments

@Calinou
Copy link

Calinou commented Jun 1, 2024

On a M1 Mac mini, I have OpenGL working as confirmed by glxinfo and glxgears (8000 FPS in default window size):

OpenGL vendor string: Mesa
OpenGL renderer string: Apple M1 (G13G B1)
OpenGL core profile version string: 4.6 (Core Profile) Mesa 24.1.0-asahi20240228
OpenGL core profile shading language version string: 4.60
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile

However, I've run flatpak install org.sauerbraten.Sauerbraten and despite the game booting up successfully, it's running through llvmpipe (vendor string is printed in the in-game console on startup).

flatpak list outputs:

Name                           Application ID                                Version             Branch               Installation
Freedesktop Platform           org.freedesktop.Platform                      23.08.19            23.08                system
Mesa                           org.freedesktop.Platform.GL.default           24.0.7              23.08                system
Mesa (Extra)                   org.freedesktop.Platform.GL.default           24.0.7              23.08-extra          system
openh264                       org.freedesktop.Platform.openh264             2.1.0               2.2.0                system
Breeze GTK theme               org.gtk.Gtk3theme.Breeze                      6.0.5               3.22                 system
Sauerbraten                    org.sauerbraten.Sauerbraten                   2020_12_29          stable               system

When run from a terminal (flatpak run org.sauerbraten.Sauerbraten), I can see this in stdout:

glx: failed to create dri3 screen
failed to load driver: asahi

Do I need to do something specific to have working OpenGL within Flatpaks? I thought the Mesa Flatpak would take care of everything (like it does on my other Linux machines).

@marcan
Copy link
Member

marcan commented Jun 2, 2024

There is no Flatpak support yet as nobody has packaged our Mesa fork as a Flatpak extension yet. Upstream Mesa does not have support for our GPU (and won't until the kernel driver is merged, which is blocked on Rust kernel upstreaming bikeshedding, so we can't do anything to speed that up) so the Mesa that Flatpak ships does not work. There was some work in this direction but it was never completed. Volunteers welcome :)

@jannau
Copy link
Member

jannau commented Jun 2, 2024

The main difficulty is to get flatpak-builder to work inside mock which we will need to build the driver in copr. My attempt is in https://github.com/jannau/mesa-asahi-flatpak/tree/fedora-spec which does not build inside mock.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants