Skip to content

drm/asahi: g16: report the spill-carrying compute launch on the M3 - #3603

Merged
RyanTheTide merged 1 commit into
mainfrom
feat/g16-m3-ti-spill-launch
Nov 29, 2026
Merged

RyanTheTide merged 1 commit into
mainfrom
feat/g16-m3-ti-spill-launch

Conversation

@RyanTheTide

@RyanTheTide RyanTheTide commented Nov 29, 2026 •

Copy link
Copy Markdown
Contributor

The M3 (T8122) runs on the g16 runtime with the 27.2 firmware. That firmware takes the direct compute launch whose word 1 carries the program's thread-invariant spill reservation, the same form the M4 uses. The legacy M3 firmware (m3 runtime) does not take it. Both report DRM_ASAHI_GPU_HAL_LEGACY, so Mesa could not tell them apart and kept native constant programs (preambles) off on every M3.

This adds DRM_ASAHI_FEATURE_COMPUTE_TI_SPILL_LAUNCH (bit 47) and reports it from the g16 runtime for chip 0x8122 only. The HAL generation and every other path are unchanged, which keeps Mesa's separately-qualified sampler-stream path off. This is the dedicated-capability shape Dj asked for.

Userspace: aurora-silicon/mesa feat/borealis-g15-hal200-preamble (PR to follow, linked below).

Rows (MacBook Air M3 J615, one-shot boot of 7.3.0-aurora-ungg15tis+ = this branch on main 2fd49a6, dead-man armed, back on saved Edge after)

  • Bit emitted and used: with the paired Mesa branch, every compute shader in dEQP-VK.ubo.random.16bit.all_out_of_order_offsets.1* gets a native constant program (CProg 11/11); the main program drops from 130 to 11 instructions (23 to 19 GPRs); 11/11 pass. Base Mesa on the same kernel: CProg 0, unchanged.
  • CTS, base Mesa vs paired Mesa on this kernel: 16,254 Pass -> Pass, 19,114 NS -> NS, 0 regressions, 0 new GPU fault lines.
    • Groups: compute.pipeline, ubo, glsl, descriptor_indexing, push_constant, ssbo, subgroups, atomics, sync2 barriers, tessellation, geometry, occlusion.
  • Without the bit (stock Edge kernel): the paired Mesa behaves as legacy (CProg 0, 130 instructions); CTS 16,254 Pass -> Pass.
  • Machine restored: 7.3.0-aurora-edge, Enforcing, 0 failed units, test kernel removed.

Not yet: a T6030 (M3 Pro) row. Its g16 row is unmeasured, so it does not report the bit. A KUnit or host check of the feature word would only restate the constant.

Tested: J615 M3 Air at bf1e46c (one-shot, paired with mesa#1335 now merged): bit reported, native constant programs engage (CProg 11/11), CTS 16,254 Pass -> Pass, 0 GPU faults, 0 failed units after.
Risk: two-way · M3 (T8122 on the g16 runtime only; other GPUs do not report the bit)

The g16 runtime drives the M3 (T8122) with the 27.2 firmware. That
firmware takes the direct compute launch whose word 1 carries the
program's thread-invariant spill reservation, the form the M4 uses;
J615 runs every dispatch in it. The legacy M3 firmware (the m3 runtime)
does not, and both report DRM_ASAHI_GPU_HAL_LEGACY, so userspace could
not tell them apart and kept native constant programs off on every M3.

Add DRM_ASAHI_FEATURE_COMPUTE_TI_SPILL_LAUNCH (bit 47) and report it from
the g16 runtime's T8122 row only. The HAL generation and every other
path stay as they are.

Signed-off-by: Ryan Murray <81541646+RyanTheTide@users.noreply.github.com>
@RyanTheTide

Copy link
Copy Markdown
Contributor Author

Userspace: aurora-silicon/mesa#1335 (merge this first; Mesa ignores the bit until it's reported).

@aurora-silicon-review aurora-silicon-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Verdict: MERGE at bf1e46c09ec1

Blockers: None (wait for the 20 queued CI checks at bf1e46c09ec1 to finish green; merge before or alongside aurora-silicon/mesa#1335).

Checked:

  • uAPI (include/uapi/drm/asahi_drm.h, drivers/gpu/drm/asahi/file.rs): Defines DRM_ASAHI_FEATURE_COMPUTE_TI_SPILL_LAUNCH as ((1ULL) << 47). Verified bit 47 is unused in both Linux (main, highest prior bit 46 DRM_ASAHI_FEATURE_TILE_BUFFER_48K) and Mesa (aurora-wip), and matches mesa#1335 bit-for-bit.
  • Capability gating (drivers/gpu/drm/asahi/g16/params.rs): Reported only from the g16 runtime (27.2 firmware) when gpu.cfg.chip_id == 0x8122 (M3). Legacy M3 (m3 runtime) and unmeasured T6030 do not report it; gpu_hal_generation stays DRM_ASAHI_GPU_HAL_LEGACY so sampler-stream paths remain untouched.
  • Exact-head hardware evidence (J615 M3, 7.3.0-aurora-ungg15tis+):
    • Paired with mesa#1335: CProg 11/11 on dEQP-VK.ubo.random.16bit.all_out_of_order_offsets.1* (130 -> 11 instructions, 23 -> 19 GPRs, 11/11 pass); 16,254 CTS Pass -> Pass, 19,114 NS -> NS, 0 regressions, 0 new GPU faults.
    • Negative controls: base Mesa on this kernel (CProg 0) and paired Mesa on stock Edge kernel without bit 47 (CProg 0, 16,254 Pass -> Pass).
  • Checked for Apple material, tool attribution, private serials, and gating: clean.
Evidence
  • Head: bf1e46c09ec1 (base: main, mergeable: MERGEABLE, +23/-0 across 3 files).
  • Hosted CI at bf1e46c09ec1: 3P/0F/20Q (apple-build, host-tests, kunit, rust-build, asahi KUnit queued).

@github-actions github-actions Bot added area:gpu Area from CODEOWNERS (bot) ci-failing A check failed at the PR head (bot) needs-hw-row No hardware row at the PR head (bot) needs-review No approving review from Core or Omarchy Mac yet (bot) needs-template PR body lacks Tested or Risk (bot) labels Nov 29, 2026
@github-actions

github-actions Bot commented Nov 29, 2026 •

Copy link
Copy Markdown

Merge readiness at bf1e46c0: not ready yet

Check Detail
CI at head no failing: host-tests, pr-text / pr-text
Review no needs one approving review from Core or Omarchy Mac (not the author)
Requested changes ok none
Hardware row at head ok in the PR body at bf1e46c0
Conflicts ok none
PR text ok Risk: two-way · M3 (T8122 on the g16 runtime only; other GPUs do not report the bit)

Areas: area:gpu

Updated by pr-readiness on pushes, edits, reviews and comments, and on a schedule. Rules: merge policy · labels.

@RyanTheTide

Copy link
Copy Markdown
Contributor Author

code-owner ping <@422957901716652033> / @DjDeveloperr: merge train at bf1e46c0. App approved; J615 row at this head (paired with mesa#1335, now merged). M3 g16 runtime only. Merges under the 6-point rule 1 h from now once hosted CI is green (the dcp-fabric KUnit failure was an apt mirror outage, re-run queued), unless you object.

@github-actions github-actions Bot added blast:m3 Macs affected, from Merge risk (bot) door:two-way Revertible or not, from Merge risk (bot) and removed needs-hw-row No hardware row at the PR head (bot) needs-template PR body lacks Tested or Risk (bot) labels Nov 29, 2026
@RyanTheTide

Copy link
Copy Markdown
Contributor Author

Merging under the 6-point rule (Ryan 09:29, permanent), at bf1e46c0. (1) The review App approved at this head. (2) Full CI is green. (3/4) Rows: J615;M3-g16-only. (5) There's no blocking review. (6) Dj was pinged here 419 min ago with no objection. Revert: git revert -m 1 <merge>.

@RyanTheTide
RyanTheTide merged commit af5836e into main Nov 29, 2026
38 of 48 checks passed
@RyanTheTide
RyanTheTide deleted the feat/g16-m3-ti-spill-launch branch November 29, 2026 20:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:gpu Area from CODEOWNERS (bot) blast:m3 Macs affected, from Merge risk (bot) ci-failing A check failed at the PR head (bot) door:two-way Revertible or not, from Merge risk (bot) needs-review No approving review from Core or Omarchy Mac yet (bot)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant