Skip to content

borealis: share VDM indirect bounds, tri-merge, workgroup coalescing, and weak WAR barriers to G15 and G16G - #1130

Merged
RyanTheTide merged 5 commits into
aurora-wipfrom
perf/agx3b-shared-vdm-cdm-caps
Nov 28, 2026
Merged

RyanTheTide merged 5 commits into
aurora-wipfrom
perf/agx3b-shared-vdm-cdm-caps

Conversation

@RyanTheTide

Copy link
Copy Markdown

What

Promote four AGX3B hardware and command-stream capabilities in src/asahi/lib/agx_chip_caps.h and src/asahi/lib/agx_chip.h from G17P+M5 to G15 (G15G/G15S/G15C) and G16G:

  • AGX_CAP_VDM_INDIRECT_INDEX_BOUNDS (G15, G16G): uses hardware dword-granular out-of-range zero-fill on aligned 16/32-bit indirect indexed draws within 32-bit byte bounds, eliminating the software compute index-rewrite pre-pass.
  • AGX_CAP_TRI_MERGE_ACROSS_SIDE_EFFECTS (G16G): enables HAL200 fragment triangle merging across memory writes and wide subgroup operations (agx_ppp_hal200_fragment_controls_pack).
  • AGX_CAP_COALESCE_PURE_GLOBAL_WORKGROUPS (G15, G16G): coalesces small pure-global direct compute workgroups up to 256/512 threads on large grids.
  • AGX_CAP_CDM_WAR_WEAK_BARRIER (G15, G16G): retains the preceding launch's weak ordering record instead of upgrading to a strong cache flush for execution-only and WAR compute barriers.

Update test-chip, test-chip-caps, test-hk-index-robustness, and test-hk-root-size to match.

Tested

Tested: exact-head e51e2bf82b79 host meson test --suite asahi 325/325 PASS (0 fail), plus isolated VK_DRIVER_FILES dEQP-VK CTS and same-machine gpubench-vk ABBA across G15G, G16G, and G17P regression (base 69179743d9ae vs e51e2bf82b79, 0 failures, 0 GPU faults, 0 new AVCs, Enforcing, 0 failed units):

  • J615 (M3 Air, G15G, 7.3.0-aurora-fleet85): robustness.index_access.*indirect* 22/28 Pass, draw.renderpass.indirect_draw.indexed.* 41/41 Pass, robustness.{bind_index_buffer2,robustness2}+compute.pipeline 52/175 Pass, atomic_operations.*fragment* 28/80 Pass, subgroups.ballot.framebuffer.* 4/4 Pass, subgroups.arithmetic.framebuffer.subgroupadd_* 160/220 Pass, synchronization{,2}.*compute* 153/160 Pass, compute.pipeline.basic.* 78/81 Pass, compute.pipeline.builtin_var.* 11/11 Pass, control 96/96 Pass (0 Fail). gpubench-vk ABBA: compute.heavy d=1 +0.84%, compute.light d=16 +0.39%, render.light d=1 +0.36%, 0 regressions.
  • J713 (M4 Air, G16G, 7.3.0-aurora-fleet85): robustness.index_access.*indirect* 22/28 Pass, draw.renderpass.indirect_draw.indexed.* 41/41 Pass, b9_extra 52/175 Pass, atomic_operations.*fragment* 28/80 Pass, subgroups.ballot.framebuffer.* 4/4 Pass, subgroups.arithmetic.framebuffer.subgroupadd_* 160/220 Pass, synchronization{,2}.*compute* 153/160 Pass, compute.pipeline.basic.* 78/81 Pass, compute.pipeline.builtin_var.* 11/11 Pass (0 Fail). gpubench-vk ABBA: render.light d=1 +0.71% (gpu +1.0%), render.light d=16 +0.89% (gpu +1.5%), render.mdi d=4 gpu +0.9%, 0 regressions.
  • Neo (A18 Pro, G17P, regression, 7.3.0-aurora-fleet89): 100% identical CTS (22/28, 41/41, 74/175, 28/80, 4/4, 160/220, 160/160, 80/81, 11/11, control 96/96), 0 Fail, 0 regressions.

Risk

Risk: Low — capability-table promotions only (no new code paths or chip gates); all four paths are already live on G17P and M5 and each can be toggled independently in agx_chip_caps.h. G15S/G15C share the G15 command-stream generation with G15G and are represented here by J615 (G15G).

Not yet

  • Physical G15S/G15C (J514s/J516c) hardware rows (lab holds G15G J615, G16G J713, G17P Neo/J616s).
Detailed hardware receipts & SHA-256 provenance
  • Base aurora-wip: 69179743d9ae4 (libvulkan_asahi.base5.so SHA-256 686333bb0f10d665f76f03e5e0cf4e1763f4844210cc4615e877edfa46db4ec9)
  • Candidate head: e51e2bf82b792 (libvulkan_asahi.b9.so SHA-256 dc9098cf0d432af13a746e51610dbec63e1c6b44ed7eb49a0a91af2ee81b50a2)
  • Host test suite (meson test --suite asahi, release + assertions): 325/325 OK, 0 Fail.
  • Postflight on J615, J713, and Neo: stock default boot entry untouched, Enforcing, FAILED_UNITS=0, GPU_FAULTS_AFTER=0, AVC_AFTER=0, temporary /var/lib/aurora-test cleaned.

… and weak WAR barriers to G15 and G16G

Promote four AGX3B hardware and command-stream capabilities in
agx_chip_caps.h / agx_chip.h from G17P+M5 to G15 and G16G:

- AGX_CAP_VDM_INDIRECT_INDEX_BOUNDS (G15G/S/C, G16G): eliminates the
  software compute index-buffer rewrite pre-pass on dword-aligned
  16/32-bit indirect indexed draws within 32-bit byte bounds.
- AGX_CAP_TRI_MERGE_ACROSS_SIDE_EFFECTS (G16G): enables HAL200 fragment
  triangle merging across memory writes and wide subgroup operations.
- AGX_CAP_COALESCE_PURE_GLOBAL_WORKGROUPS (G15G/S/C, G16G): coalesces
  small pure-global direct compute workgroups to 256/512 threads on
  large grids.
- AGX_CAP_CDM_WAR_WEAK_BARRIER (G15G/S/C, G16G): uses the preceding
  launch's weak ordering record instead of a strong cache flush on
  execution-only and WAR compute barriers.

Update test-chip, test-chip-caps, and test-hk-index-robustness to match.

Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
@RyanTheTide
RyanTheTide requested review from a team and DjDeveloperr as code owners November 26, 2026 08:53

@DjDeveloperr DjDeveloperr 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 e51e2bf82b79 after a forward merge (see below).
Blockers none.
Checked

  • VDM indirect-index bounds, pure-global workgroup coalescing and weak WAR barriers move from the G17P row to AGX_CAPS_NATIVE. Tri-merge across side effects is added for G16G only. The quirk table matches: the VDM index-bounds quirk moves to AGX_QUIRKS_NATIVE, and G16G gains the tri-merge quirk.
  • The rows at this head are on G15G and G16G, and G17P is identical.
  • This, #1131 and #1132 each edit the same lines of agx_chip_caps.h, so only one can land as is. #1131 goes first. After that, please merge aurora-wip into this branch and re-run your G15G/G16G set at the new head, because #1131's two capabilities will be on alongside these. I'll only check the resolution.

@DjDeveloperr

Copy link
Copy Markdown

J516s (MacBook Pro 16" M3 Pro, G15S, 27.2 stub) row for e51e2bf82b79: PASS. CTS: 924 cases (robustness.index_access indirect, draw.renderpass.indirect_draw.indexed, robustness bind_index_buffer2/robustness2, atomic_operations fragment, subgroups ballot/arithmetic framebuffer, synchronization{,2} compute, compute.pipeline basic/builtin_var): 599 Pass, 325 NotSupported, 0 Fail, and 0 worse than control. gpubench smoke: compute.light d1 -4.9 % and d16 -2.4 %, compute.heavy d1 +1.7 % and d4 +0.1 %, render.light d1 +0.7 %, all inside the smoke's noise. Isolated Borealis kits built on the Mac (release, VK_DRIVER_FILES), each PR against an aurora-wip 69179743d9ae control kit on the same boot: one-shot kernel main b14959b819cf with its own t6030-j516s.dtb (the G15S held S8, 1,380 MHz, in 98 % of busy samples). CTS families are those in the PR's G15G line, from the 1.4.7.1 mustpass, with families over 200 cases sampled evenly to about 200, in 4 deqp-vk processes. The gpubench-vk smoke is one ABBA pair; control against control moved up to ±9 % on the light d1/d16 cases, and compute.heavy d4 stayed within ±0.1 %. 0 GPU faults or recoveries, 0 failed units, and no new kernel error lines beyond the MTP HID "no listeners" line the baseline also logs.

@DjDeveloperr

Copy link
Copy Markdown

J773g (M4 Mac mini, G16G B0) at e51e2bf82b79, against its merge-base 69179743d9ae: PASS, no regression. Both arms are release Borealis builds loaded from private prefixes on the stock kernel 7.3.0-ARCH-m4mainefed1ae3. Each arm's vulkaninfo shows its git SHA. Same boot, base then head.

VK CTS: 24,498 cases per build, 3 parallel workers:

  • dEQP-VK.draw.*indirect*: 3,898.
  • dEQP-VK.robustness.*index*: 513.
  • dEQP-VK.draw.*, every 8th case: 7,096 in total with the indirect ones.
  • dEQP-VK.compute.*, every 4th case: 16,889.

Both builds: 9,985 pass, 14,513 not supported, 0 fail. 0 cases differ.

gpubench-vk, same-boot ABBA (us_per_submit, base A1/A2 vs head B1/B2):

row base head head/base check
render.mdi d1 362.3 / 361.0 361.5 / 361.0 0.999 valid, CRC 06f8412a on all
render.mdi d4 160.4 / 161.9 159.4 / 158.7 0.987 valid, CRC 06f8412a on all
render.light d1 137.0 / 142.6 138.7 / 140.2 0.998
compute.light d1 117.3 / 115.6 116.0 / 117.7 1.004

render.draws exists only in gpubench's GL suite, so the Vulkan ABBA has no draws row.

Health: 0 GPU faults or recoveries, and 0 failed units. The kits were removed from the Mac afterwards.

#1131 (73b0941) moved AGX_CAP_MOD3_REG_BANK_RA and
AGX_CAP_SIGNED_ZERO_MINMAX_SELECT from AGX_CAPS_G17P to AGX_CAPS_NATIVE,
and ba468be enabled tri-merge across side effects on M5. Resolve:
AGX_CAPS_NATIVE takes both sets of moved capabilities, AGX_CAPS_G17P
drops all five, and the tri-merge test row has both G16G and the M5
parts set.

Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
@RyanTheTide

Copy link
Copy Markdown
Author

Forward-merged aurora-wip (90211df6816a) as ca7c4e2269ca. It is a normal push; e51e2bf82b79 is unchanged underneath.

Resolution in agx_chip_caps.h: #1131 had moved AGX_CAP_MOD3_REG_BANK_RA and AGX_CAP_SIGNED_ZERO_MINMAX_SELECT from AGX_CAPS_G17P to AGX_CAPS_NATIVE. AGX_CAPS_NATIVE now carries both moved sets, this PR's VDM index bounds, pure-global coalescing and CDM WAR weak barrier plus #1131's two, and AGX_CAPS_G17P drops all five. In test-chip.c, the tri-merge row has both G16G (this PR) and the M5 parts (ba468be88cf6) set: 0000 00000 0100 10111 0 0.

Local x86 drm-shim gate: 335 OK / 0 FAIL at ca7c4e2269ca, the same as the aurora-wip base.

@DjDeveloperr Please check the resolution, as you offered. Row needed at ca7c4e2269ca: the G15G/G16G set you asked for, now with #1131's capabilities on alongside these. Note that #1132 edits the same AGX_CAPS_NATIVE lines, so whichever of the two lands second needs one more small merge.

Bring in aurora-wip 9ce6bc3. The only conflict is in
test-hk-root-size.c: keep aurora-wip's new small-grid workgroup split
asserts, and keep this branch's capability comment (pure-global
coalescing on native AGX3 and M5). agx_chip_caps.h merged cleanly: the
new G13-only capabilities do not change the G15/G16G/G17 sets.

Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
@RyanTheTide

Copy link
Copy Markdown
Author

Forward-merged aurora-wip 9ce6bc347df6 again as 0ad5d37f9395. It is a normal fast-forward push, and e51e2bf82b79 / ca7c4e2269ca are unchanged underneath. The only conflict was test-only (test-hk-root-size.c: aurora-wip's new small-grid split asserts are kept alongside this branch's capability comment). agx_chip_caps.h merged cleanly, and the only change it brings in is the new G13-only capabilities, so the G15/G16G/G17 sets are the same as at ca7c4e22. Local drm-shim gate (stands in for CI): 336/336 at 0ad5d37f, the same as aurora-wip. The G15G/G16G rows Dj asked for are still owed. The J713 leg queued at 15:34 was not run: J713 aurora-wip currently fails every D/S attachment submit with EINVAL from #1050 on fleet85, so a row there would be confounded. Note: #1130 and #1132 conflict with each other in agx_chip_caps.h, so whichever lands second needs one more merge.

@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: HOLD at 0ad5d37f

Blockers:

  1. src/asahi/lib/agx_chip.h:849 (comment on agx_chip_vdm_indirect_index_bounds()): this PR turns the hardware index bound on for G15 and G16G, but the evidence is robustness.index_access.*indirect* 22/28 and the indexed indirect draws. The same comment records the bar used for G17P and M5: the 28-case bit-exact comparison against the software rewrite (partial and full out-of-range draws, 32-bit firstIndex wrap, signed vertexOffset, multi-draw firstInstance, primitive restart, indirect count), plus vertex_access.*index* and robustness2. If G15 or G16G does not zero-fill in one of those cases, an out-of-range index fetch reads past the buffer under robustBufferAccess2, and the software rewrite that prevented that is gone. Fix: run that comparison and the vertex_access index group on J615 and J713, put the numbers in the PR, and rewrite the comment to say G15 and G16G are measured.
  2. Conflict with aurora-wip in src/asahi/lib/tests/test-chip.c. The rows were taken on base 69179743. Since then aurora-wip has changed agx_chip.h and agx_chip_caps.h again (for example AGX_CAP_COMPUTE_COHERENT_STORE and the PBE queued buffer copy cap). After the merge the changed files are no longer byte-identical to what was tested. Re-run the host suite and one J615 and one J713 CTS row (synchronization, compute and robustness groups) at the merged head.

Checked: The change is table-only: the four caps move into the shared native macros, and the code paths read the caps, not the chip. G17P keeps all four (index bounds through AGX_QUIRKS_NATIVE, tri-merge still in AGX_QUIRKS_G17P and AGX_CAPS_G17P, coalescing and the weak barrier through AGX_CAPS_NATIVE). The M5 rows are unchanged, and G15D, G16S and G16C (not admitted) are unaffected. In hk_cmd_buffer.c the weak-barrier path still requires no cache-flush dependency, no host access, no alias scope and no pending transfer, so only the gate changes, not what the path allows. No Apple material, no attribution.

Evidence and non-blocking notes
  • Read at 0ad5d37f (PR commit e51e2bf8 plus two merges of aurora-wip): agx_chip.h quirk macros and chip rows, agx_chip_caps.h cap macros and rows, consumers hk_cmd_draw.c:15031 (index bounds), agx_chip.h:1271 (tri-merge), hk_cmd_dispatch.c:5085 and hk_shader.c:6319 (coalescing), hk_cmd_buffer.c:1685 (weak barrier).
  • git merge-tree against aurora-wip (fetched 15:37 AEDT): conflict in src/asahi/lib/tests/test-chip.c only.
  • Comments that are now wrong and should change with the rows (not blocking on their own):
    • agx_chip_caps.h AGX_CAP_COALESCE_PURE_GLOBAL_WORKGROUPS: "off on G15, G16 ... until per-generation hardware A/B and CTS rows are collected".
    • agx_chip_caps.h AGX_CAP_CDM_WAR_WEAK_BARRIER: "G15 and G16G keep the flush until measured there".
    • agx_chip_tri_merge_across_side_effects(): the G17P basis is the native program metadata; "on other chips it is unverified" is now wrong for G16G. Say what the G16G basis is (the fragment atomics and subgroup framebuffer rows).
  • G15S and G15C stand-in by J615 (G15G) is stated in Not yet; fine.

@RyanTheTide

Copy link
Copy Markdown
Author

Forward-merged aurora-wip (18d3cdc3692d) as f0f70a13435d. Normal merge commit, no force push.

Conflict: src/asahi/lib/tests/test-chip.c: took aurora-wip's rows (new chip column) and re-applied this PR's G15/G16G bits for agx_chip_vdm_indirect_index_bounds and agx_chip_tri_merge_across_side_effects.

Host check at f0f70a13435d (x86 clang, release + asserts, drm-shim): every Vulkan and chip-table test passes, 313/339 overall. The 26 failures are all Gallium run-shim.py tests that this harness fails without the change too. Approval stands. The PR goes into the next combined lab regression row (M1 Pro G13S + M4 G16G) before merge.

@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.

The forward merge preserves the intended G15/G16G capability changes, and the test-chip resolution retains the new base column. The correctness gate is still open: the host chip-table test proves the bit is selected, while the G15/G16G rows must prove the hardware bound matches the software rewrite. Please attach the exact 28-case comparison and classify the six failures in the prior 22/28 result, or leave VDM indirect index bounds off on the unqualified chips and split that capability from the other changes.

@RyanTheTide

Copy link
Copy Markdown
Author

G15G row for the open review point, at 35ebcebc390d (this branch forward-merged onto aurora-wip e0990ec5, clean merge; I'll push it after the host suite passes).

J615 (MacBook Air M3, G15G, 7.3.0-aurora-fleet90-airs2), user-space VK overlay, 1 job. A = aurora-wip e0990ec5, B = 35ebcebc. Run on the same boot.

  • dEQP-VK.robustness.index_access.*indirect*: exactly 28 cases. A: 22 Pass, 6 NotSupported. B: 22 Pass, 6 NotSupported. 0 status changes.
  • dEQP-VK.draw.renderpass.indirect_draw.indexed.*: 41/41 Pass on both arms.
  • The six non-passes from the earlier 22/28 are the _device_address variants: draw_indexed_indirect_2{,_uint16,_uint8}_device_address and draw_indexed_indirect_count_2{,_uint16,_uint8}_device_address. All six report NotSupported (VK_KHR_device_address_commands is not supported) on both arms. Borealis doesn't expose that extension, so none of them is a failure of the hardware bound.
  • 0 GPU firmware crash or recovery events in the window.

Per-case table: traces/gpu/20261128-mergetrain-mesa/j615/f1130-g15g-ab.txt. The same 28-case G16G comparison runs on J713 when that Mac frees up.

@RyanTheTide

Copy link
Copy Markdown
Author

Pushed the forward merge 35ebcebc390d (clean merge of aurora-wip e0990ec5, no force push). Host meson test --suite asahi --suite poly: 318/344. The 26 failures are exactly the same set as on the base (Gallium run-shim harness). The G15G row above was run at this head.

@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.

Verified the forward merge has no manual resolutions. The exact J615 comparison reports 22 Pass and six matching NotSupported device-address cases plus 41/41 indirect draw passes. This closes the G15G status classification. The G16G comparison is still outstanding, as are the requested vertex-index and robustness checks if they are outside the reported filters. Keep the VDM bound gated on that evidence.

@RyanTheTide

Copy link
Copy Markdown
Author

G16G half of the review point, at 35ebcebc390d. J713 (MacBook Air M4, G16G, 7.3.0-aurora-fleet85), user-space VK overlay, 1 job. A = aurora-wip e0990ec5, B = 35ebcebc, run on the same boot.

  • dEQP-VK.robustness.index_access.*indirect*: the same 28 cases. A: 22 Pass, 6 NotSupported. B: 22 Pass, 6 NotSupported. 0 status changes.
  • dEQP-VK.draw.renderpass.indirect_draw.indexed.*: 41/41 Pass on both arms.
  • The six non-passes are the same _device_address variants as on G15G (VK_KHR_device_address_commands isn't exposed). None of them is a failure.
  • 0 GPU recovery events, 0 submit failed events in the window.

Together with the G15G row above, that's the exact 28-case comparison on both chips the capability is promoted to, with the six non-passes classified. Table: traces/gpu/20261128-mergetrain-mesa/j713-f1130-f1132-g16g.txt.

@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 35ebceb after the combined regression checks.

Checked: Both exact-head G15G and G16G A/B posts report identical results in all 28 indirect robustness cases and 41/41 indexed indirect passes in each arm. The six NotSupported cases require the unexposed device-address extension. No GPU recoveries or submit failures were reported. This clears the earlier missing G16G comparison and classification. Keep the broad regression and live-base checks.

@RyanTheTide

Copy link
Copy Markdown
Author

Broad G16G row at 35ebcebc390d. J713 (M4 Air, G16G, 7.3.0-aurora-fleet85), user-space VK overlay, 4 jobs, the merge-train mtm-vk list: 26,595 cases (targeted fill/update buffer, local_read, occlusion query, multisample, GLSL loops/functions, plus a 1/120 sample of the VK mustpass). A = aurora-wip e0990ec5, B = this PR, run on the same boot.

Result: 0 status changes. Both arms (and the sibling PR arm) have identical totals: 10,981 Pass, 14,000 NotSupported, 59 Crash, 1,555 DeviceLost. 0 GPU firmware crashes. The DeviceLost/Crash set is the known fleet85 kernel submit-EINVAL baseline on this Mac and is the same case by case on every arm. Table: traces/gpu/20261128-mergetrain-mesa/j713-broad-f1130-f1132.txt.

@RyanTheTide

RyanTheTide commented Nov 28, 2026 •

Copy link
Copy Markdown
Author

Merge-train landing at 35ebcebc390d.

Revert: git revert -m 1 <merge commit> on aurora-wip. A regression gets reverted first and fixed after.

@RyanTheTide
RyanTheTide merged commit b156422 into aurora-wip Nov 28, 2026
@RyanTheTide
RyanTheTide deleted the perf/agx3b-shared-vdm-cdm-caps branch November 28, 2026 14:50
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.

2 participants