public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Kalev Lember <klember@redhat.com>
To: git-commits@fedoraproject.org
Subject: [flatpaks/flatpak-sdk] f45: container.yaml: Hook up libegl and vulkan extensions
Date: Wed, 07 Oct 2026 17:15:42 GMT	[thread overview]
Message-ID: <179139334218.1.7097797936558611880.flatpaks-flatpak-sdk-8adda5442a76@fedoraproject.org> (raw)

            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

                 reply	other threads:[~2026-10-07 17:15 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=179139334218.1.7097797936558611880.flatpaks-flatpak-sdk-8adda5442a76@fedoraproject.org \
    --to=klember@redhat.com \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox