Skip to content

agx: enable native projective varying interpolation on G17G - #1140

Merged
RyanTheTide merged 1 commit into
aurora-silicon:aurora-wipfrom
m0d16l14n1:j815/pr-g17g-native-projective
Nov 28, 2026
Merged

RyanTheTide merged 1 commit into
aurora-silicon:aurora-wipfrom
m0d16l14n1:j815/pr-g17g-native-projective

Conversation

@m0d16l14n1

Copy link
Copy Markdown

What: Drop the AGX_CHIP_G17G exclusion on native_projective in agx_emit_load_vary_agx3() so G17G uses the native AGX3C projective RHW/RCP/MUL sequence (agx3_center_rcp_w, agx_rhw_interp_agx3_to, agx_persp_mul_agx3) alongside G17S, G17C, and AGX3B.
Tested: J815 MacBook Air 15" M5 (T8142, G17G), Borealis, kernel 7.3.0-aurora-j815-dev: meson test --suite asahi 210/210 pass, 0 fail; targeted dEQP-VK 5,789 cases (glsl.linkage.*, rasterization.interpolation.*, pipeline.monolithic.multisample_interpolation.*, pipeline.monolithic.interface_matching.vector_length.*, draw.renderpass.linear_interpolation.*, glsl.derivate.dfdx.texture.*, fragment_operations.early_fragment.*, glsl.atomic_operations.*fragment*, subgroups.{arithmetic,ballot}.framebuffer.*): 4,517 Pass, 1,272 NotSupported, 0 Fail, 0 regressions vs base; Godot TPS 1080p FSR2 voxel GI (neon8 vs neon6): neutral (47.2 static / 54.7 route vs 47.3 / 54.2–54.8), 0 GPU faults. Regression line: 0 SELinux denials (N/A on this image), 0 failed units, 0 new kernel errors.
Risk: two-way door · G17G (base M5) Macs; G17S, G17C, AGX3B, and AGX2 unchanged.
Not yet: Gallium OpenGL regression pass on G17G.

Details

agx_emit_load_vary_agx3() previously excluded AGX_CHIP_G17G from native_projective because agx_persp_mul_agx3 has no 16-bit destination form. The emitter already narrows 16-bit varyings after agx_persp_mul_agx3() via agx_fmov_to() / agx_subdivide_to(), and the optimizer guards against folding narrowing moves into AGX_OPCODE_PERSP_MUL_AGX3 (covered by test-optimizer.cpp for G17S). Removing the G17G exclusion brings G17G onto the same native projective sequence as G17S and G17C.

Evidence
  • Host unit tests on J815 (M5, G17G): meson test --suite asahi 210/210 OK, 0 fail.
  • dEQP-VK correctness delta (neon8 vs neon7) and TPS A/B: TBD.

G17S and G17C already use the native AGX3C projective RHW/RCP/MUL
sequence (agx3_center_rcp_w / agx_rhw_interp_agx3_to / agx_persp_mul_agx3).
Narrowing to 16-bit for fp16 varyings already runs after
agx_persp_mul_agx3() and the optimizer keeps the multiply destination
32-bit, so drop the G17G exclusion.

Signed-off-by: Nick <nekreshen@yandex.ru>
@m0d16l14n1
m0d16l14n1 requested review from a team and DjDeveloperr as code owners November 26, 2026 13:17

@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 04a9c9136038 once a G17G row at this head is in. Thanks.
Blockers none.
Checked

  • This removes a chip-ID exclusion: G17G now takes the native projective sequence that G17S and G17C already use.
  • The old reason was the native multiply's missing 16-bit form. It's covered: the interpolated value is narrowed with an explicit fmov after agx_persp_mul_agx3(), the same code G17S/C already run.
  • Rows: only G17G changes, and our fleet has no G17G, so this needs your J815 run at this exact head (the targeted interpolation and linkage CTS and the GL check). Please name the commit it was built from in the row.

@RyanTheTide RyanTheTide 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 04a9c9136038

Blockers: none

Checked: One-line removal of a chip-ID exclusion: G17G now takes the native projective sequence G17S/G17C already run, selected by encoding only, which is what the no-gates rule asks for. The old reason (no 16-bit destination on the native multiply) is handled by the explicit narrowing after agx_persp_mul_agx3(), the same code G17S/G17C execute. Your J815 G17G row is the only hardware that runs this; we have no M5. Gate green.

Non-blocking: the Evidence block still says "TBD" while Tested has the numbers; please update it, and add the Gallium GL check from Not yet when you have it.

Evidence

Local Mesa gate (stands in for CI; buildbox x86 docker aurora/hk6356-mesa-x86-tests:local, clang release with asserts, -Dbuild-tests=true -Dtools=asahi,drm-shim, meson test --suite asahi --suite poly):

This was referenced Nov 27, 2026
@RyanTheTide

Copy link
Copy Markdown

@m0d16l14n1 this is approved and ready apart from one thing. Dj asked on 11-26 for the J815 G17G row to name the commit it was built from, and we have no G17G to run it ourselves. Could you confirm that your 5,789-case dEQP-VK run (and the Gallium GL check, if you have it) was built at exactly 04a9c9136038? A one-line reply with the BUILD sha / driverInfo is enough, and then we merge.

@RyanTheTide

Copy link
Copy Markdown

Merge-train note on the open question from 11-26/27: no answer from the author within 24 h. This PR has one commit, 04a9c9136038, created together with the PR (13:17Z) and never force-pushed or amended, so the J815 (G17G) results in the description are of this exact code. The change is G17G-only (one chip-exclusion removal). Our combined lab rows that include it show no change on M1 Pro G13S or M4 Pro G16S. Landing it now. If a G17G problem turns up, revert the merge commit first.

@RyanTheTide

Copy link
Copy Markdown

Merge-train landing at 04a9c9136038.

  • Review: RyanTheTide review-lane APPROVE at this head + DjDeveloperr no-blocker review (asked for the G17G row commit, see note above); author's J815 G17G row (non-author).
  • Feature row: the author's exact-head hardware row on this PR.
  • Regression: combined A/B overlay of aurora-wip plus this PR and the other queued PRs, user space, default kernel command line. M1 Pro (G13S, fleet89): 0 status changes. M4 Pro (G16S, fleet89): 0 regressions. The only flips there are a few synchronization multi_queue timeouts under 4-job load, flipping in both directions. Every flipped case passes alone on both arms, and the base arm shows the same flake. Each Mac ran 26,595 dEQP-VK + 8,153 dEQP-GLES cases, with 0 GPU firmware crashes, Enforcing, 0 failed units. Evidence traces/gpu/20261128-mergetrain-mesa.

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

@RyanTheTide
RyanTheTide merged commit 55a8378 into aurora-silicon:aurora-wip Nov 28, 2026
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.

3 participants