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

Update to mesa-asahi-20240228 #44

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 1 addition & 12 deletions org.freedesktop.Platform.GL.asahi.metainfo.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,7 @@
<name>Mesa git Asahi snapshot</name>
<summary>Mesa - The 3D Graphics Library - Asahi builds</summary>
<releases>
<release version="20230904" date="2023-09-12"/>
<release version="20230903" date="2023-09-03"/>
<release version="20230902" date="2023-09-02"/>
<release version="20230821" date="2023-08-22"/>
<release version="20230812" date="2023-08-12"/>
<release version="20230725" date="2023-07-25"/>
<release version="20230706" date="2023-07-10"/>
<release version="20230615" date="2023-06-15"/>
<release version="20230606" date="2023-06-08"/>
<release version="20230311" date="2023-03-28"/>
<release version="20221229" date="2022-12-30"/>
<release version="20221219" date="2022-12-24"/>
<release version="20240228" date="2024-02-28"/>
</releases>
<description>
<p>
Expand Down
123 changes: 110 additions & 13 deletions org.freedesktop.Platform.GL.asahi.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
id: org.freedesktop.Platform.GL.asahi
branch: '22.08'
branch: '23.08'
runtime: org.freedesktop.Platform
sdk: org.freedesktop.Sdk
runtime-version: '22.08'
runtime-version: '23.08'
build-extension: true
sdk-extensions:
- org.freedesktop.Sdk.Extension.llvm15
- org.freedesktop.Sdk.Extension.llvm17
build-options:
prepend-path: /usr/lib/sdk/llvm15/bin
prepend-ld-library-path: /usr/lib/sdk/llvm15/lib
prepend-path: /usr/lib/sdk/llvm17/bin
prepend-ld-library-path: /usr/lib/sdk/llvm17/lib


x-arch-build-options:
Expand All @@ -25,16 +25,57 @@ x-arch-build-options:
# org.freedesktop.Sdk.Compat.arm is deprecated, so only build for aarch64.
aarch64: &aarch64-build-options
prefix: /usr/lib/aarch64-linux-gnu/GL/asahi
prepend-pkg-config-path: /usr/lib/aarch64-linux-gnu/GL/asahi/lib/pkgconfig
prepend-path: /usr/lib/aarch64-linux-gnu/GL/asahi/bin
prepend-pkg-config-path: /usr/lib/aarch64-linux-gnu/GL/asahi/lib/pkgconfig:/usr/lib/aarch64-linux-gnu/GL/asahi/share/pkgconfig
libdir: /usr/lib/aarch64-linux-gnu/GL/asahi/lib
prepend-ld-library-path: /usr/lib/aarch64-linux-gnu/GL/asahi/lib


cleanup:
- /bin
- /include
- /lib/cmake
- /lib/dri/armada-drm_dri.so
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a flag to just disable all, then enable asahi?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

those are all pulled in through kmsro so we can't disable them individually but I'm not sure if we need kmsro in the flatpak driver

- /lib/dri/exynos_dri.so
- /lib/dri/gm12u320_dri.so
- /lib/dri/hdlcd_dri.so
- /lib/dri/hx8357d_dri.so
- /lib/dri/ili9163_dri.so
- /lib/dri/ili9225_dri.so
- /lib/dri/ili9341_dri.so
- /lib/dri/ili9486_dri.so
- /lib/dri/imx-dcss_dri.so
- /lib/dri/imx-drm_dri.so
- /lib/dri/imx-lcdif_dri.so
- /lib/dri/ingenic-drm_dri.so
- /lib/dri/kirin_dri.so
- /lib/dri/komeda_dri.so
- /lib/dri/mali-dp_dri.so
- /lib/dri/mcde_dri.so
- /lib/dri/mediatek_dri.so
- /lib/dri/meson_dri.so
- /lib/dri/mi0283qt_dri.so
- /lib/dri/mxsfb-drm_dri.so
- /lib/dri/panel-mipi-dbi_dri.so
- /lib/dri/pl111_dri.so
- /lib/dri/rcar-du_dri.so
- /lib/dri/repaper_dri.so
- /lib/dri/rockchip_dri.so
- /lib/dri/ssd130x_dri.so
- /lib/dri/st7586_dri.so
- /lib/dri/st7735r_dri.so
- /lib/dri/sti_dri.so
- /lib/dri/stm_dri.so
- /lib/dri/sun4i-drm_dri.so
- /lib/dri/udl_dri.so
- '/lib/libSPIRV-Tools*'
- /lib/pkgconfig
- /share/aclocal
- /share/clc
- /share/cmake
- /share/libdrm
- /share/man
- /share/pkgconfig
- '*.la'
- '*.a'
modules:
Expand All @@ -57,6 +98,66 @@ modules:
# type: git
# tag-pattern: ^libdrm-(\d[\d.]+\d)$

- name: spirv-headers
build-options:
arch:
x86_64: *x86_64-build-options
aarch64: *aarch64-build-options
buildsystem: cmake-ninja
sources:
- type: archive
url: https://github.com/KhronosGroup/SPIRV-Headers/archive/refs/tags/vulkan-sdk-1.3.268.0/spriv-headers-1.3.268.0.tar.gz
sha512: 3500c299a51dacc3e89066cfcfa8762cb6bc1be10ffff492fb3041831627e065cd836e3e0165df750dd22873a1772d916158e1e1c4701dc60efbb2edb17753ca

- name: spirv-tools
build-options:
arch:
x86_64: *x86_64-build-options
aarch64: *aarch64-build-options
buildsystem: cmake-ninja
config-opts:
- '-DBUILD_SHARED_LIBS=ON'
- '-DSPIRV_TOOLS_BUILD_STATIC=OFF'
- '-DSPIRV-Headers_SOURCE_DIR=/usr/lib/aarch64-linux-gnu/GL/asahi' #fixme
- '-DCMAKE_INSTALL_LIBDIR=lib'
sources:
- type: archive
url: https://github.com/KhronosGroup/SPIRV-Tools/archive/refs/tags/v2023.5.rc1.tar.gz
sha256: aed90b51ce884ce3ac267acec75e785ee743a1e1fd294c25be33b49c5804d77c

- name: llvm-spirv
build-options:
arch:
x86_64: *x86_64-build-options
aarch64: *aarch64-build-options
buildsystem: cmake-ninja
config-opts:
- '-DLLVM_EXTERNAL_SPIRV_HEADERS_SOURCE_DIR=/usr/lib/aarch64-linux-gnu/GL/asahi'
sources:
- type: archive
url: https://github.com/KhronosGroup/SPIRV-LLVM-Translator/archive/refs/tags/v17.0.0.tar.gz
sha256: eba381e1dd99b4ff6c672a28f52755d1adf2d810a97b51e6074ad4fa67937fb2

- name: libclc
build-options:
arch:
x86_64: *x86_64-build-options
aarch64: *aarch64-build-options
config-opts:
- '-DCMAKE_INSTALL_LIBDIR=lib'
- '-DLLVM_SPIRV=/usr/lib/aarch64-linux-gnu/GL/asahi/bin/llvm-spirv'
- '-DLLVM_TOOLS_BINARY_DIR=/usr/lib/aarch64-linux-gnu/GL/asahi/bin' # Doesn't work...
buildsystem: cmake-ninja
sources:
- type: archive
url: https://github.com/llvm/llvm-project/releases/download/llvmorg-17.0.6/libclc-17.0.6.src.tar.xz
sha256: 122f641d94d5dfbb3c37534f2b76612fa59d15c36c2a4917369a85eaaca32148

# We might need to make this do some arch-specific stuff later for i386 builds, but as of the time of writing we only do 64-bit builds so we'll be fine.
- name: llvm
buildsystem: simple
build-commands:
- cp /usr/lib/sdk/llvm17/lib/libLLVM-17.so /usr/lib/$(uname -m)-linux-gnu/GL/asahi/lib

- name: mesa
build-options:
Expand Down Expand Up @@ -100,16 +201,12 @@ modules:

sources:
- type: archive
url: https://gitlab.freedesktop.org/asahi/mesa/-/archive/asahi-20230904/mesa-asahi-20230904.tar.bz2
sha256: ce96f78d81e558adf0521c44782bea6955bc02ab362e22712b8e0bc7b7eb74cd
url: https://gitlab.freedesktop.org/asahi/mesa/-/archive/asahi-20240228/mesa-asahi-20240228.tar.bz2
sha256: 076bb4b78fa0645be6199ecdb4a0cc6c15c2a52514b73942f0da670857628974
x-checker-data:
type: html
url: https://github.com/AsahiLinux/PKGBUILDs/raw/main/mesa-asahi-edge/PKGBUILD
version-pattern: _asahiver=(.+)
url-template: https://gitlab.freedesktop.org/asahi/mesa/-/archive/asahi-$version/mesa-asahi-$version.tar.bz2

# We might need to make this do some arch-specific stuff later for i386 builds, but as of the time of writing we only do 64-bit builds so we'll be fine.
- name: llvm
buildsystem: simple
build-commands:
- cp /usr/lib/sdk/llvm15/lib/libLLVM-15.so /usr/lib/$(uname -m)-linux-gnu/GL/asahi/lib