public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [flatpaks/flatpak-sdk] f45: container.yaml: Hook up libegl and vulkan extensions
@ 2026-10-07 17:15 Kalev Lember
  0 siblings, 0 replies; only message in thread
From: Kalev Lember @ 2026-10-07 17:15 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : flatpaks/flatpak-sdk
            Branch : f45
            Commit : 8adda5442a76bc587a760db1f580230e8099c7a9
            Author : Kalev Lember <klember@redhat.com>
            Date   : 2021-12-08T10:55:56+01:00
            Stats  : +7/-0 in 1 file(s)
            URL    : https://src.fedoraproject.org/flatpaks/flatpak-sdk/c/8adda5442a76bc587a760db1f580230e8099c7a9?branch=f45

            Log:
            container.yaml: Hook up libegl and vulkan extensions

This copies the merge-dirs setup from org.freedesktop.Platform//21.08
and adds symlinks to hook into /etc/glvnd and /etc/vulkan.

Mesa and other rpm-packaged drivers install into /usr/share/glvnd and
/usr/share/vulkan, leaving /etc/glvnd and /etc/vulkan for sysadmin
overrides. Since there are no sysadmin overrides in flatpak we can use
this by making /etc/glvnd and /etc/vulkan symlinks to /usr/lib/GL/glvnd
and /usr/lib/GL/vulkan, which will then be filled in by the extensions.

See https://bugzilla.redhat.com/show_bug.cgi?id=1785251 for the discussion
of this setup.

We sadly can't use the same setup for OpenCL as there doesn't appear to
be a similar /etc/OpenCL and /usr/share/OpenCL split. It's probably
necessary to split mesa extension out of org.fedoraproject.Platform in
the future to get OpenCL correctly hooked up.

---
diff --git a/container.yaml b/container.yaml
index 9b5f13a..1f7028f 100644
--- a/container.yaml
+++ b/container.yaml
@@ -20,6 +20,7 @@ flatpak:
         --extension=org.freedesktop.Platform.GL=no-autodownload=true
         --extension=org.freedesktop.Platform.GL=autodelete=false
         --extension=org.freedesktop.Platform.GL=add-ld-path=lib
+        --extension=org.freedesktop.Platform.GL=merge-dirs=vulkan/icd.d;glvnd/egl_vendor.d;OpenCL/vendors;lib/dri;lib/d3d;vulkan/explicit_layer.d;vulkan/implicit_layer.d
         --extension=org.freedesktop.Platform.GL=download-if=active-gl-driver
         --extension=org.freedesktop.Platform.GL=enable-if=active-gl-driver
         --extension=org.freedesktop.Platform.GL=autoprune-unless=active-gl-driver
@@ -41,5 +42,11 @@ flatpak:
         # Create a directory for mounting org.freedesktop.Platform.GL extension point
         mkdir -p /usr/lib64/GL
 
+        rm -r /etc/glvnd
+        ln -s ../lib64/GL/glvnd /etc/glvnd
+
+        rm -r /etc/vulkan
+        ln -s ../lib64/GL/vulkan /etc/vulkan
+
         touch -d @0 /usr/share/fonts /usr/share/fonts/*
         fc-cache -rs

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-10-07 17:15 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-07 17:15 [flatpaks/flatpak-sdk] f45: container.yaml: Hook up libegl and vulkan extensions Kalev Lember

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox