Skip to content

hk: keep G17P colour MSAA compressed with transient eMRT backing - #115

Draft
RyanTheTide wants to merge 5 commits into
aurora-wipfrom
perf/g17p-emrt-transient-20261031
Draft

RyanTheTide wants to merge 5 commits into
aurora-wipfrom
perf/g17p-emrt-transient-20261031

Conversation

@RyanTheTide

@RyanTheTide RyanTheTide commented Oct 30, 2026 •

Copy link
Copy Markdown

Title: hk: keep T8140 colour MSAA compressed with transient eMRT backing
Base: aurora-wip
Head: fu-g17p-emrt-transient-20261031
State: draft; device correctness and performance qualification pending

T8140 colour MSAA attachments currently remain plain on aurora-wip. Enabling
compression alone would leave eMRT writing raw samples into compressed storage.
This change keeps eligible one-mip 2x/4x colour images compressed and redirects
ordinary spilled targets into command-buffer-owned plain allocations. LOAD
imports their render rectangle; STORE exports before attachment resolves.
Resident compressed targets retain their normal background/EOT descriptors.

The path preserves partial areas, base layers, sparse multiview, secondary
buffers, physical stream splits and suspend/resume. Existing alias, sharing,
host/storage, feedback, format and 8x exclusions remain. Depth/stencil, cube,
3D, single-sample allocation and mip-chain policy is unchanged. Admission and
redirection require physical T8140 identity: M4 Pro/T6040 shares the G17P
architecture enum and must keep its existing compression and spill behavior.

This ports the relevant parts of draft #72's three-commit stack onto
cf4e08105dfa526b8874318b6a52b3ce948f6297, reusing the HAL200 packet support
already consolidated into the base. It does not revive the broader allocation
policy from the closed #65 stack. Feature code is f0e3830e7358097ddb6d768102689905ae58f6b1;
the branch adds documentation in 0fba03c571291eee60788759642556fa82b848d9
and confines end-of-pass bookkeeping to actual T8140 transient use in
3efdcdaa32918b7747c3eaa135ff0e8e6e06afaf.

Validation already completed:

  • Native Asahi/poly host suites: 113 passed, zero failed.
  • Spill matrix: 10,290,450 layouts across 1x/2x/4x and normal/reload/multiview
    limits, including T6040 backing-mask exclusion.
  • New colour policy: 23,317 checks / 46 formats, including release NDEBUG
    and an admission-disabled negative control. Existing Neo and T6040 policy
    tests pass 4,078 and 7,043 checks respectively.
  • Native descriptor and metadata tests pass. Ten G17P shim recording shapes
    cover spilling, reload, partial areas, base layers, multiview, secondary and
    suspend/resume. This is CPU recording evidence, not device execution.
    The eight existing spilling shapes retain identical GPU command/mapping
    bytes after the bookkeeping gate (invocation metadata excluded).
  • G13G/G14G/G16S recorder: all 24 configurations are byte-identical across
    baseline, stability repeat and candidate (72 invocations / 1,668 submits).
    All 88 total invocations and 1,702 submits succeed. The paired Fedora 45
    x86-64 CI buildroots have identical compiler/dependency versions and recipe.
    The shared baseline is exact cf4e08105dfa (RPM label 0.3462); candidate
    label is 0.3483. No G13/G14/G16S GPU-command or mapped-byte difference was
    observed. The specified old recorder directory is absent; this uses the
    public in-tree recorder built from the same driver source.
  • Native ARM CI: Fedora 44 and Fedora 45 builds pass, as does FEX (3/3 jobs).
    Baseline/candidate ARM overlays have verified RPM and payload checksums,
    native AArch64 ELF identity and identical paired buildroot manifests.

The qualification kit selects 100,525 real cases from public CTS
e272471311301a35aae6364def1a3f5ea35215f7 and enforces zero new bad cases,
zero lost passes, complete identical case sets and no duplicate results. The
paired plan specifies ten A and ten B runs per configuration for 13
configurations, using pinned public gpubench controls and a targeted MSAA
workload. Raw JSONL, parameters, source/build hashes and failures must accompany
the results. It measures resident compression benefits and transient-copy costs
separately. No GPU speedup or bandwidth saving has been measured or claimed.

Full-view scratch storage and boundary meta copies can regress performance.
Keep this draft until the Neo CTS gate and paired measurements pass. Publish
the method and actual raw numbers before merge; retain plain MSAA if there is
no measured performance case. Host gates do not qualify GPU sample preservation.

Draft #72 is not already subsumed by the base. After this replacement has been
published, close #72 as superseded. This worker did not modify #72, open a PR,
access hardware, or add publishing trailers. Under the lead's explicit
build-route exception, only ci/t-3483-emrt was pushed. AArch64 artifacts use
the approved borealis-rpms.yml workflow instead of buildbox emulation.
Successful candidate CI:
https://github.com/aurora-silicon/fedora-aurora/actions/runs/41089204071.
Exact-source baseline CI:
https://github.com/aurora-silicon/fedora-aurora/actions/runs/41087006958.

Supersedes #72 (same change rebased onto aurora-wip; #72 targeted a branch whose PR was closed after consolidation). Draft until the Neo A/B and CTS kit (task t-3483, neo-ab-cts-kit.tar.xz) has raw numbers: perf PRs merge with benchmarks.

The branch now merges current aurora-wip and selects this admission and the transient backing by AGX_CHIP_G17P for every G17P part (T8140, T6040, T6041), with T6040's earlier 2x colour MSAA policy folded into hk_g17p_color_msaa_compression_eligible(), so the T8140-only identity gate described above no longer applies and the device rows are owed on the J616s (T6040) as well as the Neo.

Assisted-by: LLM (Claude:Opus 5.5)

RyanTheTide and others added 3 commits October 31, 2026 05:40
Rebase the three-commit draft #72 stack onto aurora-wip, reusing its existing HAL200 descriptor support. Redirect G17P spills into command-buffer-owned plain images, importing LOAD contents and exporting stores before resolves through the graphics meta copy path.

Gate allocation admission and redirection on physical T8140 identity: T6040 shares AGX_CHIP_G17P. Admit only one-mip 2x/4x colour images while preserving existing depth, cube, 3D, host, feedback and sharing exclusions. Keep the T6040 compression policy unchanged. Port the allocator matrix and add policy checks for all 46 formats and physical-product exclusion.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copy the rendering state and run export bookkeeping only when this T8140 pass actually redirected an attachment. Keep the older product paths and non-spilling T8140 passes off the new state-copy path.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@RyanTheTide

Copy link
Copy Markdown
Author

Still wanted and unique (not covered by merged #112). Needs a rebase onto current aurora-wip (branch is well behind), then on-device MSAA CTS and bandwidth qualification on G17P-class silicon (M4 Pro/T6040 or T8140).

Link the spill test with libasahi_compiler, which agx_tilebuffer.c now
needs on aurora-wip.

Signed-off-by: Ryan <ryan@aurorasilicon.org>
Colour MSAA compression with transient eMRT backing was admitted only on
T8140, by chip id, although the spill redirection and the compressed PBE
and texture paths it relies on belong to the G17P architecture that
T6040 and T6041 share.

Select the admission and the render redirection by AGX_CHIP_G17P, and
make hk_g17p_color_msaa_compression_eligible() the only multisampled
colour policy on G17P. The HAL200 policy no longer admits T6040's 2x
single-layer colour attachments on its own, and the multiview exclusion
that kept them plain goes away, since a spilled target now gets plain
transient backing. The unit tests check the G17P-wide admission and the
combined T6040 policy.

Signed-off-by: Ryan <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