public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [flatpaks/flatpak-runtime] f45: Accept GL extensions
@ 2026-09-11 14:43 Yaakov Selkowitz
  0 siblings, 0 replies; only message in thread
From: Yaakov Selkowitz @ 2026-09-11 14:43 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : flatpaks/flatpak-runtime
            Branch : f45
            Commit : 4b6b6fae4fc5e8a8f503988b65b8f30317978eda
            Author : Yaakov Selkowitz <yselkowi@redhat.com>
            Date   : 2026-03-02T21:13:16-05:00
            Stats  : +41/-35 in 3 file(s)
            URL    : https://src.fedoraproject.org/flatpaks/flatpak-runtime/c/4b6b6fae4fc5e8a8f503988b65b8f30317978eda?branch=f45

            Log:
            Accept GL extensions

The mesa GL implementation will be shipped in the GL.default extension, and
will also include OpenCL (missing until now in our runtimes).  An nvidia
extension will also be possible (although possibly not distributable), and
the unmanaged GL.host extension can be used for either nvidia or other
drivers (e.g. Asahi Remix).

---
diff --git a/container-sdk.in.yaml b/container-sdk.in.yaml
index 90178da..8bf3a97 100644
--- a/container-sdk.in.yaml
+++ b/container-sdk.in.yaml
@@ -5,6 +5,18 @@ flatpak:
     component: flatpak-sdk
     branch: @RELEASE@
     runtime: @ID_PREFIX@.Platform
+    add-extensions:
+        @ID_PREFIX@.Platform.GL:
+            directory: lib64/GL
+            versions: @RELEASE@;1.4
+            add-ld-path: lib
+            merge-dirs: egl/egl_external_platform.d;glvnd/egl_vendor.d;lib/clc;lib/d3d;lib/dri;lib/gallium-pipe;lib/gbm;OpenCL/vendors;vdpau;vulkan/explicit_layer.d;vulkan/icd.d;vulkan/implicit_layer.d
+            subdirectories: true
+            autodelete: false
+            no-autodownload: true
+            download-if: active-gl-driver
+            enable-if: active-gl-driver
+            autoprune-unless: active-gl-driver
     finish-args: >
         --env=ALSA_CONFIG_DIR=/usr/share/alsa
         --env=ALSA_CONFIG_PATH=/usr/share/alsa/alsa.conf
@@ -18,16 +30,6 @@ flatpak:
         --env=TCLLIBPATH=/app/lib64/tcl8.6
         --env=XDG_DATA_DIRS=/app/share:/usr/share:/usr/share/runtime/share:/run/host/user-share:/run/host/share
         --env=GPROFNG_SYSCONFDIR=/etc
-        --extension=org.freedesktop.Platform.GL=version=1.4
-        --extension=org.freedesktop.Platform.GL=directory=lib64/GL
-        --extension=org.freedesktop.Platform.GL=subdirectories=true
-        --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
         --extension=org.freedesktop.Platform.openh264=version=2.4.1
         --extension=org.freedesktop.Platform.openh264=directory=lib64/openh264
         --extension=org.freedesktop.Platform.openh264=add-ld-path=extra
@@ -57,14 +59,15 @@ flatpak:
         sed -e '/~\/\.asoundrc/d' -e 's|/alsa/asoundrc|/asound.conf|' /usr/share/alsa/alsa.conf
 
         # Create a directory for mounting extension points
-        mkdir -p /usr/lib64/GL
         mkdir -p /usr/lib64/openh264
 
-        rm -r /etc/glvnd
-        ln -s ../lib64/GL/glvnd /etc/glvnd
-
-        rm -r /etc/vulkan
-        ln -s ../lib64/GL/vulkan /etc/vulkan
+        # Create symlinks to expected locations from GL extensions
+        rm -fr /etc/{egl,glvnd,OpenCL,vulkan}
+        rm -fr /usr/lib64/{clc,d3d,dri,gallium-pipe,gbm,vdpau}/
+        ln -s ../lib64/GL/{egl,glvnd,OpenCL,vulkan} /etc/
+        ln -s GL/lib/{clc,d3d,dri,gbm,gallium-pipe} GL/vdpau /usr/lib64/
+        # Provide driver implementations with GL extensions
+        rm -f /usr/lib64/libdrm_*.so*
 
         touch -d @0 /usr/share/fonts /usr/share/fonts/*
         fc-cache -rs

diff --git a/container.in.yaml b/container.in.yaml
index 7aca865..0e7ea70 100644
--- a/container.in.yaml
+++ b/container.in.yaml
@@ -5,6 +5,18 @@ flatpak:
     component: flatpak-runtime
     branch: @RELEASE@
     sdk: @ID_PREFIX@.Sdk
+    add-extensions:
+        @ID_PREFIX@.Platform.GL:
+            directory: lib64/GL
+            versions: @RELEASE@;1.4
+            add-ld-path: lib
+            merge-dirs: egl/egl_external_platform.d;glvnd/egl_vendor.d;lib/clc;lib/d3d;lib/dri;lib/gallium-pipe;lib/gbm;OpenCL/vendors;vdpau;vulkan/explicit_layer.d;vulkan/icd.d;vulkan/implicit_layer.d
+            subdirectories: true
+            autodelete: false
+            no-autodownload: true
+            download-if: active-gl-driver
+            enable-if: active-gl-driver
+            autoprune-unless: active-gl-driver
     finish-args: >
         --env=ALSA_CONFIG_DIR=/usr/share/alsa
         --env=ALSA_CONFIG_PATH=/usr/share/alsa/alsa.conf
@@ -17,16 +29,6 @@ flatpak:
         --env=PYTHONUSERBASE=/var/data/python
         --env=TCLLIBPATH=/app/lib64/tcl8.6
         --env=XDG_DATA_DIRS=/app/share:/usr/share:/usr/share/runtime/share:/run/host/user-share:/run/host/share
-        --extension=org.freedesktop.Platform.GL=version=1.4
-        --extension=org.freedesktop.Platform.GL=directory=lib64/GL
-        --extension=org.freedesktop.Platform.GL=subdirectories=true
-        --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
         --extension=org.freedesktop.Platform.openh264=version=2.4.1
         --extension=org.freedesktop.Platform.openh264=directory=lib64/openh264
         --extension=org.freedesktop.Platform.openh264=add-ld-path=extra
@@ -58,14 +60,15 @@ flatpak:
         sed -e '/~\/\.asoundrc/d' -e 's|/alsa/asoundrc|/asound.conf|' /usr/share/alsa/alsa.conf
 
         # Create a directory for mounting extension points
-        mkdir -p /usr/lib64/GL
         mkdir -p /usr/lib64/openh264
 
-        rm -r /etc/glvnd
-        ln -s ../lib64/GL/glvnd /etc/glvnd
-
-        rm -r /etc/vulkan
-        ln -s ../lib64/GL/vulkan /etc/vulkan
+        # Create symlinks to expected locations from GL extensions
+        rm -fr /etc/{egl,glvnd,OpenCL,vulkan}
+        rm -fr /usr/lib64/{clc,d3d,dri,gallium-pipe,gbm,vdpau}/
+        ln -s ../lib64/GL/{egl,glvnd,OpenCL,vulkan} /etc/
+        ln -s GL/lib/{clc,d3d,dri,gbm,gallium-pipe} GL/vdpau /usr/lib64/
+        # Provide driver implementations with GL extensions
+        rm -f /usr/lib64/libdrm_*.so*
 
         touch -d @0 /usr/share/fonts /usr/share/fonts/*
         fc-cache -rs

diff --git a/tools/list-files.py b/tools/list-files.py
index dbbc5df..8d01967 100755
--- a/tools/list-files.py
+++ b/tools/list-files.py
@@ -46,9 +46,9 @@ output_dir_recurse('/usr/share/themes')
 output_dir_recurse('/usr/lib/perl5/')
 output_dir_recurse('/usr/lib/x86_64-linux-gnu/alsa-lib/')
 output_dir_recurse('/usr/lib/x86_64-linux-gnu/frei0r-1/')
-output_dir_recurse('/usr/lib/x86_64-linux-gnu/GL/default/lib/dri/')
-output_dir_recurse('/usr/lib/x86_64-linux-gnu/GL/default/lib/vdpau/')
-output_dir_recurse('/usr/lib/x86_64-linux-gnu/GL/default/lib/vulkan/')
+#output_dir_recurse('/usr/lib/x86_64-linux-gnu/GL/default/lib/dri/')
+#output_dir_recurse('/usr/lib/x86_64-linux-gnu/GL/default/lib/vdpau/')
+#output_dir_recurse('/usr/lib/x86_64-linux-gnu/GL/default/lib/vulkan/')
 output_dir_recurse('/usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders/')
 output_dir_recurse('/usr/lib/x86_64-linux-gnu/gio/modules/')
 output_dir_recurse('/usr/lib/x86_64-linux-gnu/gstreamer-1.0/')

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

only message in thread, other threads:[~2026-09-11 14:43 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-11 14:43 [flatpaks/flatpak-runtime] f45: Accept GL extensions Yaakov Selkowitz

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