Skip to content

aurora: move Borealis and the Gallium driver to src/aurora, independent of src/asahi - #1103

Draft
RyanTheTide wants to merge 8 commits into
aurora-wipfrom
aurora/split-20261126
Draft

RyanTheTide wants to merge 8 commits into
aurora-wipfrom
aurora/split-20261126

Conversation

@RyanTheTide

@RyanTheTide RyanTheTide commented Nov 26, 2026 •

Copy link
Copy Markdown

What: Move our Apple GPU drivers out of the asahi paths into a project of their own, src/aurora, with no dependency on src/asahi: Borealis (src/aurora/vulkan), the shared compiler, ISA, genxml, layout, runtime, libagx, precompiler, drm-shim, tools and CI move there, and the Gallium driver and winsys move to src/gallium/{drivers,winsys}/aurora. Build with -Dvulkan-drivers=aurora -Dgallium-drivers=aurora (asahi still works, with a warning). Borealis installs as libvulkan_aurora.so with aurora_icd.<arch>.json and keeps its brand, brl_ prefix and driver ID 35. Draft for the cut-over; replaces #591.

Tested: buildbox x86_64 + aarch64 cross at f1e5ed17: every commit builds; meson test --suite asahi --suite poly 324/324 per test identical to aurora-wip 3f1c2bc3; Vulkan-only 251/0 and OpenGL-only 194/0 from a tree with no src/asahi; .text of libvulkan_aurora.so identical to libvulkan_asahi.so. Hardware (user space, base vs series, dEQP-VK 16,541-case sample x4): J316s M1 Pro, J413 M2 Air, J615 M3 Air, J616s M4 Pro and J700 Neo (A18 Pro): 0 per-case changes (J316s: one case that also flips between rounds of the same build); J713 M4 Air: identical in both arms up to an abort both share. Baselines from 2.1 M further Vulkan and 0.24 M GL cases are in src/aurora/ci.

Risk: two-way · every Mac (paths and names only; code unchanged). Packaging must follow the new names in the same pin bump.

Not yet: M5 (asked of the board owners, no reply; no M5 in our lab, the A18 Pro is the nearest G17 we have), M6 (no hardware); GL on the J413 (test overlay fails eglGetDisplay there). Samples, not the full mustpass. Packaging, BRL_* environment variables, Mesa docs and CODEOWNERS follow after the cut. Cut-over slot: Dj's pick.

Details

Eight commits; the first four are made by scripts (https://gist.github.com/RyanTheTide/9bba1b63bf6b234fc486edfa3a6a4cff), so on a newer tip the series is regenerated instead of rebased:

  1. aurora: select the Apple GPU drivers as 'aurora', install Borealis as libvulkan_aurora: meson option values aurora for both drivers, asahi kept as a deprecated alias. Inside the build the Gallium driver keeps its internal name (with_gallium_asahi, HAVE_ASAHI, driver_asahi, asahi_dri.so), which the loader matches to the kernel driver. Borealis: libvulkan_aurora.so (+ libvulkan_asahi.so symlink for one release, no second manifest), aurora_icd.<arch>.json, driconf driver borealis (alias hk), borealis: log prefix.
  2. aurora: move the Apple GPU drivers and their shared code to src/aurora: git mv src/asahi src/aurora, src/gallium/{drivers,winsys}/asahi -> .../aurora. Contents change only where a path crosses the move (subdir calls, relative paths, .clang-format symlinks, asahi/... includes, src/asahi/... strings in build files and scripts). After it no file outside src/asahi refers to it. The Gallium driver stays under src/gallium because meson cannot subdir out of it and its tests link libgallium.
  3. borealis: rename the hk_ symbol prefix to brl_: the same script as borealis: rename the Vulkan driver from Honeykrisp to Borealis (library, ICD, drirc, src/borealis/vulkan, brl_ prefix, BRL_ env) #591, over the driver trees. Unchanged on purpose: driconf option names, every HK_* environment variable, the HK_G%u%c_ cache tag, VK_DRIVER_ID_MESA_HONEYKRISP.
  4. asahi: keep upstream's src/asahi as upstream has it, unbuilt: src/asahi comes back exactly as upstream Mesa has it at the merge base (ab0ab2209c4e), not built and not used; src/aurora/UPSTREAM records that commit and the path pairs.
  5. aurora: add a README and a check that lists divergence from upstream asahi: src/aurora/README.md and ci/aurora-divergence.py (also the aurora-divergence meson test): per tree, upstream files unchanged/changed/gone and files that are ours only, after undoing the mechanical renames; with a fetch of upstream main it lists the upstream asahi commits since the base (29 today) as cross-port candidates.
  6. aurora/ci: add dEQP expectations per GPU generation: deqp-runner fails/flakes(/skips) files for Vulkan and GL per generation, each with the machine, kernel, commit and CTS version in its header; regressions of this tip are listed separately under a comment.
  7. aurora: document how Borealis compares with upstream asahi and what could be shared: README sections on the GPUs each driver supports, the 24 Vulkan extensions only Borealis lists, what is not measured yet, and which parts could build against upstream's copy again.
  8. aurora/ci: add the G14G (M2) Vulkan expectations: the J413 file from the same 636,000-case sample.

Not in this series: BRL_* environment variables (separate PR with HK_* fallbacks), Mesa's docs/features.txt and docs/drivers, .github/CODEOWNERS paths. The CI workflow is unchanged and keeps working (it builds through the asahi aliases; the test suite is still called asahi).

Every commit carries Assisted-by because Ryan asked for it on this series; the pr-text check flags such trailers.

Cut-over: work/borealis-split/CUTOVER-v4.md on the buildbox. Open PRs are ported with split-port.sh, which is exact by construction (regenerate the series on tip + PR, take the difference); tried on #1096, #1081, #1089 and #1097.

Evidence
build (x86_64 native, docker, -j8) meson test --suite asahi --suite poly
aurora-wip 3f1c2bc3 324/0
each of commits 1-4 324/0
series head, both drivers (upstream src/asahi present, unbuilt) 325/0 (+ aurora-divergence)
git archive of the head with src/asahi deleted, both drivers 325/0
same, -Dvulkan-drivers=aurora only 252/0
same, -Dgallium-drivers=aurora only 195/0

Per test identical to aurora-wip; aarch64 release .text of libvulkan_aurora.so = libvulkan_asahi.so = 8,449,636 B; regenerating the series on the same tip gives the identical tree.

dEQP-VK A/B (every 100th vk-default case, 16,541 cases, VK-CTS 1.4.7.1, rounds base/series/base/series, user-space overlays):

Mac GPU per-case changes base vs series
J316s M1 Pro G13S C0 1 / 0 (transform_feedback.simple_optimized_gpl.draw_outside_8_131072, also flips base vs base)
J615 M3 Air G15G C0 0 / 0
J413 M2 Air G14G B0 0 / 0 (J=1)
J616s M4 Pro G16S B1 0 / 0
J713 M4 Air G16G B0 0 / 0 over 1,767 cases (both arms abort at the same device loss)
J700 Neo A18 Pro G17P B1 0 / 0 (J=1, three rounds)

Larger samples for the baselines (same code): Vulkan 636,000 cases on J316s, J413 and J615, 564,000 on J616s, 190,114 on J713; GL 124,965 on J316s, 72,998 on J615, 44,778 on J713. Two pre-existing problems of the aurora-wip tip showed up on both arms and are reported separately in GPU-COORD: AGX2 (M1 Pro, M2) Pass->Fail cases vs the shipped mesa-aurora package, bisected by another lane to #980, and G16G (M4 Air) submits rejected with EINVAL in several test groups.

… libvulkan_aurora

Aurora Silicon's Apple GPU drivers move to src/aurora in the next
commit. Name their build options after the project first, the way other
Mesa driver families are selected:

- -Dgallium-drivers=aurora builds the OpenGL driver and
  -Dvulkan-drivers=aurora builds Borealis. 'asahi' is still accepted for
  both, with a deprecation warning, so existing build scripts and
  packaging keep working. Inside the build the Gallium driver keeps its
  internal name (with_gallium_asahi, HAVE_ASAHI, asahi_dri.so), which the
  loader matches to the kernel driver.
- Borealis installs as libvulkan_aurora.so with the loader manifest
  aurora_icd.<arch>.json (devenv: aurora_devenv_icd.<cpu>.json). For one
  release libvulkan_asahi.so is a symlink to it, for tools that look for
  the old name; there is no second manifest, which would make the loader
  list every GPU twice.
- Borealis's driconf section is <device driver="borealis">, installed as
  00-borealis-defaults.conf. "hk" stays as the driconf driver-name alias,
  so drirc files written for driver="hk" still apply. Its log lines start
  with "borealis:".

The driver still reports driverName "Borealis" and
VK_DRIVER_ID_AURORA_BOREALIS (35, allocated by Khronos in Vulkan-Docs
70304594e7). VK_DRIVER_ID_MESA_HONEYKRISP and the
hk_report_honeykrisp_driver_id option are unchanged. Mesa's global docs
are left for a separate change.

Made by aurora-split.py names (attached to the pull request); on a newer
tip it is rerun rather than rebased.

Assisted-by: Claude Opus 5.5
Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
Move, with git mv:

  src/asahi                 -> src/aurora
    (vulkan: Borealis; compiler, isa, genxml, layout, lib, libagx, clc,
     drm-shim, tools, ci)
  src/gallium/drivers/asahi -> src/gallium/drivers/aurora
  src/gallium/winsys/asahi  -> src/gallium/winsys/aurora

The Gallium driver and its winsys stay under src/gallium, where Mesa
builds every Gallium driver: the targets link them from there, and their
tests link libgallium. Everything they share with Borealis is in
src/aurora.

File contents change only where a path crosses the move: the subdir()
calls, relative paths in moved files (meson, #include, the .clang-format
symlinks), "asahi/..." includes (now "aurora/..."), and "src/asahi/..."
or "src/gallium/drivers/asahi" strings in build files and scripts
(drirc install list, bin/drm-shim.py, tools/siliconforest). After this
commit no file in the tree refers to src/asahi.

Made by aurora-split.py move (attached to the pull request); on a newer
tip it is rerun rather than rebased.

Assisted-by: Claude Opus 5.5
Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
Mechanical rename of the driver's code prefix, made by the script below
and nothing else: hk_/HK_ identifiers, file names, meson targets, test
names and command-line defines become brl_/BRL_, and comments that called
the driver Honeykrisp or hk now say Borealis.

Unchanged on purpose:
- driconf option names (hk_disable_border_emulation and the rest), which
  users' drirc files set;
- HK_* environment variable names (every name the driver reads from the
  environment); moving them to BRL_* with HK_* fallbacks is a separate
  change;
- the "HK_G%u%c_" disk-cache renderer tag, so existing pipeline caches stay
  valid (it also has to fit char renderer[10]);
- VK_DRIVER_ID_MESA_HONEYKRISP and the report_honeykrisp_driver_id option
  (the Khronos registry owns that ID), the drirc alias "hk", cache-key tags
  hashed into pipeline caches, and comments that credit the upstream driver.

Check that the rename changes no code: the library's .text section has the
same size before and after this commit, and every BVH SPIR-V module is
word-for-word identical once debug-name instructions (OpName, OpSource,
...) are removed. Only .rodata grows, by the longer names in strings.

The script is idempotent. On a newer tip, rerun it instead of rebasing
this commit. With --stdin it rewrites a patch written against the old
names (paths, symbols, and the library/manifest/drirc names from the first
commit of this series), which is how open pull requests get ported.

The script is borealis-prefix.py, run through prefix-stage.py over
src/aurora and the Gallium driver and winsys trees (the Gallium driver
includes a few of the driver's headers). Both are attached to the pull
request.

Assisted-by: Claude Opus 5.5
Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
Our drivers now live in src/aurora. Put src/asahi back exactly as
upstream Mesa has it at the commit this tree last merged from upstream
(the merge base of aurora-wip and upstream main), so the tree carries
upstream's asahi driver beside ours, the way a separate driver would sit
next to it upstream. Nothing builds it: src/meson.build only enters
src/aurora, and no file outside src/asahi refers to it.

src/aurora/UPSTREAM records that commit and the path pairs (src/aurora
and src/asahi, and the Gallium driver and winsys), for the divergence
check added next.

Made by aurora-split.py pristine (attached to the pull request); on a
newer tip it is rerun rather than rebased.

Assisted-by: Claude Opus 5.5
Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
…asahi

src/aurora/README.md describes the drivers as a project of their own:
what they run on, the meson options and installed names, the directory
layout, how to build and test them, how they relate to upstream's
src/asahi, and where the conformance baselines are.

ci/aurora-divergence.py compares each tree with its upstream counterpart
named in src/aurora/UPSTREAM: src/aurora with the in-tree src/asahi, and
the Gallium driver and winsys with the upstream commit through git when
it is in the repository. It undoes the mechanical renames of the move
(aurora/ includes, the brl_ prefix and file names) and prints, per tree,
the upstream files that are unchanged, changed or gone and the files
that are ours only. With --upstream <fetch of upstream main> it also
lists the upstream commits since the recorded one that touch the asahi
driver, the candidates to cross-port. It runs as the informational
aurora-divergence test.

Assisted-by: Claude Opus 5.5
Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
Add deqp-runner expectation files for Borealis (dEQP-VK) and the Gallium
driver (dEQP-GLES3, KHR-GL46/GLES31/32, dEQP-GLES31/2), one set per GPU
generation, from user-space runs of this series on our Macs on
2026-11-26:

  G13S M1 Pro   Vulkan 636,000-case sample, GL 124,965 (all)
  G15G M3       Vulkan 636,000-case sample, GLES3 + 28,220 GL
  G16G M4       Vulkan 190,114 cases + skips, GLES3
  G16S M4 Pro   Vulkan 564,000 cases
  G17P A18 Pro  Vulkan 16,541-case smoke

Each header names the machine, kernel, Mesa commit, CTS version and the
cases that ran. Cases that passed with the installed package on the same
Mac are listed last under a comment as regressions of this tip: 6,324 on
G13S, 42 on G15G, 2,585 on G16G (device losses; the G16G skips file
names the groups whose every case aborts the CTS process). G14 (M2) is
not covered yet, M5 has no Mac in our lab, and there is no M6 hardware.

The Vulkan rows ran the code-identical build of the first version of
this series; the GL rows and part of the Vulkan rows ran this one.

Assisted-by: Claude Opus 5.5
Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
…ould be shared

Add two sections to src/aurora/README.md for the eventual upstream
discussion:

- Borealis compared with upstream asahi: the GPUs each supports (upstream
  G13/G14; these trees G13 to G18), the 24 Vulkan extensions only
  Borealis lists, and what is not measured yet (upstream drivers on the
  same M1/M2 Macs: CTS deltas and performance).
- Sharing code with upstream asahi: per part, how many aurora-wip commits
  touched it since the upstream fork point and whether it could build
  against upstream's copy again once our fixes land there.

Assisted-by: Claude Opus 5.5
Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
The J413 M2 Air was not free when the other generations ran. Add its
deqp-runner files from the same 636,000-case vk-a sample of the
VK-CTS 1.4.7.1 vk-default mustpass (one job, on 2026-11-26), and update
the coverage table in the README.

As on G13S, the cases that passed with the installed package and fail
on this tip (5,598) are listed last under a comment; they show the same
AGX2 command-stream barrier pattern. The GL rows could not run on this
Mac with the test overlay (eglGetDisplay fails on the surfaceless
platform; the installed Mesa works), so G14 has no GL file yet.

Assisted-by: Claude Opus 5.5
Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
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

Successfully merging this pull request may close these issues.

1 participant