Skip to content

borealis: enable direct EOT MSAA color resolve on mixed-format AGX3 render passes - #736

Merged
DjDeveloperr merged 2 commits into
aurora-wipfrom
djdev/g16g-mixed-eot-resolve
Nov 25, 2026
Merged

DjDeveloperr merged 2 commits into
aurora-wipfrom
djdev/g16g-mixed-eot-resolve

Conversation

@DjDeveloperr

@DjDeveloperr DjDeveloperr commented Nov 22, 2026 •

Copy link
Copy Markdown

What: Borealis can resolve eligible 2× and 4× MSAA mixed-format color attachments in the end-of-tile store. Ineligible passes retain the separate resolve, including suspended or resumed rendering and packed-float formats that need a shader resolve.
Tested: M5 Pro J714s at c01ed0de97b99bffe3827853aa1482d0e3fa70f3 passed 316/316 Asahi tests in each of two builds and all five pixel checks. The base and PR matched on all 8,862 selected Vulkan CTS cases and on framebuffer CRCs for both benchmarks.
Risk: Two-way door · native AGX3 rendering on M3, M4 and Neo. The M5 Pro exercises the separate AGX3C builder and provides regression coverage.
Not yet: Direct execution of the mixed-format optimization on G15x, G16G and G17P at this merge commit.

Details

All stored color attachments must resolve with AVERAGE to matching single-sample views. The eligibility check accounts for the original view format, the tile format, complete render area and multiview coverage, and the fragment write-range budget. Single-target packed-float resolves require the PBE's native packed-float class. Suspended or resumed rendering retains the samples needed by the continuation.

Evidence

J714s used Linux 7.3.0-m5-cdirect15 and compared against a8f14aa57b839701e7807d8a1a6a5699c5c235b6. The J714s verification includes the CTS breakdown, benchmark timings, checksums and pixel checks.

The earlier head 2bfa1cc139adc0a3914cfd0245b0ae6ec90b90c1 has hardware results on G16G and G17P. The earlier G16G pixel audit found differences of at most one RGB code value at MSAA edges between the direct and separate resolve paths.

@RyanTheTide

Copy link
Copy Markdown

Review at e02eabd.

Eligibility is all-or-nothing for the pass: g17p_direct_color_resolve is one flag, so one sRGB-skip, integer, RGB9E5/R32F or STORE attachment sends every attachment back to the MSAA store plus meta resolve. That is safe. Depth/stencil resolves still go through meta (hk_cmd_draw.c:5522-5551), the 14-view budget matches the 16 write ranges in hk_cs_capture_fragment_attachments (hk_cmd_buffer.c:4328-4356), and the device BG/EOT cache refuses mixed/resolve keys (hk_cmd_draw.c:980-984), so a cache hit cannot lose the flag. Findings:

  1. hk_cmd_draw.c:481 / hk_agx3_ioto_program_core.c:195-201: .format is taken from key.tib.logical_format, which is already the EOT key format (hk_cmd_draw.c:2873-2876). On G17P hk_eot_key_format() turns R11G11B10_FLOAT into R10G10B10A2_UNORM, so the == PIPE_FORMAT_R11G11B10_FLOAT exclusion never matches there. An M4 Pro/Max mixed pass with an R11G11B10F resolve target takes direct resolve, which contradicts the comment ("G17P/G16G keep R11G11B10_FLOAT as a raw 32-bit tile word") and the commit message. Either check the API/view format (views[i]->vk.format), or, if the G17P own-class PBE does average correctly (hk_image.h:266-277), say that, drop G17P from the comment and add a G17P row. Same root for the sRGB test at :633: it holds today only because hk_eot_key_format() leaves sRGB alone. Using the view format for both would be sturdier.
  2. hk_cmd_draw.c:497-500: partial_area is computed again here and leaves out the sparse-viewMask term that incomplete_render_area has (hk_cmd_draw.c:4794-4799). For a multiview pass with mask 0b101 and a CLEAR+resolve attachment, process_empty_tiles is set. The EOT can then resolve layer 1, which the meta path would not touch. Please pass incomplete_render_area through to hk_build_g17p_mixed_bg_eot() rather than recomputing it, or refuse direct resolve when render->view_mask is set. The single-target path at :1124 has the same shape.
  3. Suspend/resume: nothing in the eligibility check looks at VK_RENDERING_SUSPENDING_BIT. A suspended instance whose EOT direct-resolves with storeOp DONT_CARE never stores the MSAA samples, but the resumed instance continues from them. Refusing direct resolve when render->flags & VK_RENDERING_SUSPENDING_BIT costs nothing. The single-target path seems to have the same gap.
  4. hk_agx3_ioto_program_core.c:185: the literal 14 should come from a named kernel write-range limit (HK_DRM_MAX_FRAGMENT_ATTACHMENTS is 20, so it cannot be used as is).
  5. SNORM is admitted, with averaging done by the PBE. Nothing at this head covers an SNORM, sRGB or R11G11B10F attachment inside a mixed-format MRT resolve. The CTS resolve subsets were strided 1/35 and 1/17, and the unit tests only use RGBA8/RGBA16F.

Rows: the change reaches every agx_chip_native_agx3 chip, i.e. G15G/G15S/G15C, G16G and G17P. M5 and G18G use other builders and are not affected. At this head there is only a G16G (M4) row. Still needed: a G17P (M4 Pro/Max) row, which is where item 1 differs and where Borealis compresses 1x/2x colour, and one G15x (M3) row. Both should run the full dynamic_rendering.*multisample_resolve* and renderpass2.*attachment_allocation* sets, plus a mixed-RT test with SNORM/sRGB/R11G11B10F resolve targets (and multiview if item 2 is not addressed).

@DjDeveloperr
DjDeveloperr force-pushed the djdev/g16g-mixed-eot-resolve branch from e02eabd to 3ed967b Compare November 22, 2026 19:42
@RyanTheTide

Copy link
Copy Markdown

Re-review at 3ed967b (first pass was at e02eabd).

Earlier points:

  1. R11G11B10F: fixed. view_format is now checked next to the EOT key format (hk_agx3_ioto_program_core.c:199-215), and both sRGB transfer-bit checks use the view format. The new comment at :199-205 has the direction backwards, though. hk_image.h:266-277 says the G17P own class, which the remap selects, is the one that averages R11G11B10F correctly, and the raw R32_UINT class used on G15x/G16G is the one that does not. So refusing it on G17P is safe but costs the fast path, and the comment should say that. Related question, which predates this PR: the single-target hk_agx3_g17p_direct_color_resolve_supported() (:152-163) has no R11G11B10F check. On G15x/G16G, does a single-RT 4x R11G11B10F AVERAGE resolve take direct EOT resolve through the raw class? If so, it needs the same exclusion.
  2. Sparse viewMask: fixed. incomplete_render_area is passed through. Nit: the single-target path now receives that parameter but still recomputes sparse_view_mask (hk_cmd_draw.c:1128-1130).
  3. Suspend: fixed for the suspending instance, and suspending is in the per-command-buffer cache key (hk_cmd_draw.c:1695, :1733). One question about the other half. The final RESUMING instance can still take direct resolve and set g17p_direct_color_resolve, which drops the meta resolve (:5543-5557), but hk_begin_rendering returns at :5100 before loaded_resolve/process_empty_tiles are set (:5375-5390). Can that resumed EOT miss tiles that only the suspended half drew? A run of the dynamic_rendering suspend/resume cases with an MSAA resolve attachment would settle it.
  4. Named write-range limit: fixed (hk_agx3_ioto_program_core.h:233-241).
  5. Coverage: the unit tests now cover the eligibility decisions. SNORM is still admitted, and no hardware row exercises an SNORM resolve target inside a mixed-format MRT direct resolve.

New:

  • Mixed direct resolve now refuses sRGB, so the transfer-bit block at hk_cmd_draw.c:631-638 can no longer run. Drop it, or keep sRGB admitted and test it.
  • The single-target path also changed (suspend and sparse-multiview refusal), which reaches every native AGX3 chip.

Rows: every result in the description is at e02eabd, and the code changed since then. Please re-run at 3ed967b on G16G (M4, e.g. J713), and add G17P (M4 Pro) and G15x (M3, e.g. J615) rows. Each should include the full dynamic_rendering.*multisample_resolve* and renderpass2.*attachment_allocation* sets, the single-RT resolve cases, and the render.deferred msaa=4 CRC rows.

Assisted-by: LLM (Claude:Opus 5.5)

…ender passes

Multi-RT AGX3 render passes whose attachments do not all share RT0's
format take hk_build_g17p_mixed_bg_eot(), which previously always emitted
per-sample multisample store EOTs and left MSAA resolves to the
post-render blit pass in hk_CmdEndRendering().

For full-area (non-partial renderArea and non-sparse multiview viewMask),
non-partial-render, non-suspending/non-resuming 2x/4x MSAA passes where
every stored color attachment uses AVERAGE resolve with
STORE_OP_DONT_CARE, has a valid matching single-sample PBE resolve
target, does not require a shader resolve or raw
integer/R11G11B10F/sRGB handling (checked against both the EOT key format
and the unmapped view format: required on chips without
hk_eot_r11g11b10_own_class() whose PBE uses raw R32_UINT, and conservative
on G17P), and stays within the kernel's 14 color/resolve write-range slots
(HK_AGX3_G17P_MAX_COLOR_RESOLVE_WRITE_RANGES = 16 - 2), emit
single-sample resolving 2D PBE stores directly in
hk_build_g17p_mixed_bg_eot() and set render->g17p_direct_color_resolve
so hk_CmdEndRendering() skips the redundant post-pass resolve blit.

Also harden the shared single-target G17P direct resolve path:
- Exclude single-RT R11G11B10_FLOAT from direct EOT resolve when
  !hk_eot_r11g11b10_own_class(&dev->dev) (G15x, and G16G without the own
  class) so it never resolves through the raw R32_UINT PBE class while
  keeping G17P's own-class fast path intact.
- Guard both single-target and mixed-target direct resolve against
  VK_RENDERING_SUSPENDING_BIT and VK_RENDERING_RESUMING_BIT (resumed
  passes return early from hk_begin_rendering() before
  loaded_resolve/process_empty_tiles are configured, so a resumed direct
  EOT could miss tiles drawn only by the suspended half), and include
  suspend_resume in the per-command-buffer BG/EOT cache key.
- Guard sparse multiview viewMask (gating partial_area and
  sparse_view_mask on incomplete_render_area), drop the unreachable sRGB
  transfer-bit block in mixed direct resolve, check the unmapped view
  format for single-target sRGB transfer selection, and check all
  resolving color attachments when computing loaded_resolve.

Add host unit tests covering single-RT R11G11B10_FLOAT own-class gating,
mixed-format direct-resolve eligibility (SNORM admission, sRGB and
R11G11B10_FLOAT rejection via view_format, suspend/resume and
incomplete_render_area rejection, and the named write-range budget),
mixed-RT Ioto EOT program generation, and AGX3 2D resolving EOT shader
emission.

Signed-off-by: Diljit Singh <hey@djdev.me>
@DjDeveloperr
DjDeveloperr force-pushed the djdev/g16g-mixed-eot-resolve branch from 3ed967b to 2bfa1cc Compare November 22, 2026 20:33
@RyanTheTide

Copy link
Copy Markdown

Re-review at 2bfa1cc (last pass was at 3ed967b).

Everything from the last round is addressed in code:

  • R11G11B10F: the comment now matches hk_image.h (hk_agx3_ioto_program_core.c:210-220). The single-target helper also refuses R11G11B10F unless the device has the own class (:152-165), and all three callers pass it. On G15x/G16G the key format is still R11G11B10_FLOAT, so the check catches it. On G17P the fast path stays. The new unit test covers both.
  • Resumed instances now refuse direct resolve in both builders and in the cache key, so the final instance's meta resolve runs. That settles the question about tiles drawn only by the suspended half.
  • The unreachable sRGB block is gone, and the single-target sparse-multiview and partial-area terms are now gated on incomplete_render_area. Every caller's incomplete_render_area includes the area terms, so preserve_resolve_outside is unaffected.

What is left is hardware evidence. The description still reports e02eabd, and the code has changed twice since then. Please re-run at 2bfa1cc on:

  • M4 (G16G, e.g. J713): the full dynamic_rendering.*multisample_resolve* and renderpass2.*attachment_allocation* sets, the single-RT resolve cases, the suspend/resume cases with an MSAA resolve attachment, and the render.deferred msaa=4 CRC rows. Single-RT R11G11B10F resolve now changes path on this chip, so please include the b10g11r11_ufloat_pack32 multisample_resolve cases.
  • M4 Pro (G17P) and M3 (G15x, e.g. J615): the same sets.
  • One mixed-format MRT case with an SNORM resolve target. SNORM is still admitted to direct resolve and only the unit test covers it.

Could you also add the single-RT R11G11B10F change and the suspend/resume refusal to the summary in the description?

Assisted-by: LLM (Claude:Opus 5.5)

@DjDeveloperr

Copy link
Copy Markdown
Author

Exact-head G17P B1 verification (2bfa1cc139adc0a3914cfd0245b0ae6ec90b90c1)

Verified on MacBook Neo (Apple A18 Pro, G17P B1), Borealis built from exact PR head 2bfa1cc139adc0a3914cfd0245b0ae6ec90b90c1 (2bfa1cc139a+0, libvulkan_asahi.so SHA-256 6a7bf934c66bf2d6f3fde8278723b9552bf75aa7e6938f137a55a2d581b73911) vs origin/aurora-wip 8b8db5b137c6 (libvulkan_asahi.so SHA-256 d5bb639fb46c42a3e74ecec7915d293dc38d25d4a9a8af4e1f3490d971ca36e7).

Mixed-MRT SNORM, Suspend/Resume & Single-RT R11G11B10F Verifier (test-mixed-mrt-snorm-resolve: 5/5 PASS)

  • mixed_mrt_snorm_half_sample_avg: PASS (rt0_snorm=(0.252,-0.244,-0.244,1.000) exp=(0.250,-0.250,-0.250,1.000), rt1_f16=(0.500,0.500,3.000,1.000) exp=(0.500,0.500,3.000,1.000), fails=0)
  • mixed_mrt_snorm_full_neg_sign: PASS (rt0_snorm=(-0.748,-0.504,0.504,1.000) exp=(-0.750,-0.500,0.500,1.000), rt1_f16=(-1.250,2.500,0.000,1.000) exp=(-1.250,2.500,0.000,1.000), fails=0)
  • suspend_resume_single_rt: PASS (fails=0)
  • suspend_resume_mixed_mrt: PASS (fails=0)
  • single_rt_r11g11b10f: PASS (rgb=(0.500,1.000,2.000) exp=(0.500,1.000,2.000), fails=0)

gpubench-vk render.deferred 1080p msaa=4

Mode Depth Base (8b8db5b137c6) PR #736 (2bfa1cc139ad) Speedup CRC (valid=true)
tile, msaa=4 1 10,869.6 us (92 fps) 9,615.4 us (104 fps) 1.130× (+13.0%) 5e4130ce -> 6dc74b48
tile, msaa=4 2 10,416.7 us (96 fps) 9,259.3 us (108 fps) 1.125× (+12.5%) 5e4130ce -> 6dc74b48
dram, msaa=4 1 6,756.8 us (148 fps) 6,756.8 us (148 fps) 1.000× (+0.0%) 7c09507f == 7c09507f
dram, msaa=4 2 6,410.3 us (156 fps) 6,410.3 us (156 fps) 1.000× (+0.0%) 7c09507f == 7c09507f

(tile, msaa=4 CRC 6dc74b48 matches the M4 G16G direct-resolve CRC bit-for-bit.)

Vulkan CTS 1.4.7.1 (5,274 Pass / 2,778 NotSupported / 0 Fail)

CTS Group Total Pass NotSupported Fail
dEQP-VK.renderpasses.dynamic_rendering.*multisample_resolve* (full) 3,650 2,496 1,154 0
dEQP-VK.renderpasses.renderpass2.*attachment_allocation* (full) 1,200 712 488 0
dEQP-VK.renderpasses.renderpass2.*multisample_resolve* (full) 2,601 1,729 872 0
dEQP-VK.renderpasses.dynamic_rendering.*(suspend|resum)* (full) 431 191 240 0
dEQP-VK.renderpasses.dynamic_rendering.*local_read* (full) 170 146 24 0
Total 8,052 5,274 2,778 0

(Note: b10g11r11_ufloat_pack32 is not present under renderpasses.*multisample_resolve* in CTS 1.4.7.1 and is directly verified on G17P B1 by single_rt_r11g11b10f in test-mixed-mrt-snorm-resolve above; renderpass2.*multisample_resolve* was run single-shard to stay within 8 GB RAM.)

Machine Health

0 kernel GPU faults, 0 AVC denials, PMU 30 00, neo-no-idle-sleep.service active.

Assisted-by: LLM (Antigravity:Gemini 4 Neon)

@RyanTheTide

Copy link
Copy Markdown

Thanks for the G17P rows at 2bfa1cc. The full multisample_resolve, attachment_allocation and suspend/resume sets pass with 0 Fail. The mixed-MRT SNORM cases and the suspend/resume cases settle the open coverage questions on G17P. The tile CRC matching the G16G direct-resolve CRC fits the 1 LSB edge difference in the pixel audit.

One thing left, and it is on M4 (G16G) and M3 (G15x). Those are the chips where this revision changes the path: single-RT R11G11B10F falls back to the meta resolve there, and the G17P single_rt_r11g11b10f case runs the own-class fast path, which did not change. CTS 1.4.7.x has no b10g11r11_ufloat_pack32 multisample_resolve cases, so your verifier is the only test of that fallback. Could you share the source of test-mixed-mrt-snorm-resolve (a gist or a branch is fine)? Then the same five cases can be run at this head on M4 and M3 next to the CTS sets.

Assisted-by: LLM (Claude:Opus 5.5)

@DjDeveloperr

Copy link
Copy Markdown
Author

Exact-head M4 (G16G) hardware verification at 2bfa1cc139adc0a3914cfd0245b0ae6ec90b90c1 (companion to the G17P B1 row in #issuecomment-7085761854):

  • Hardware / Kernel / Driver: Apple M4 (G16G B0) (Mac mini J773g), 7.3.0-ARCH-m4prod19, Mesa 26.3.0-devel (git-2bfa1cc139), Borealis, derived from Honeykrisp
  • Targeted mixed-MRT SNORM + suspend/resume + single-RT R11G11B10F verifier (test-mixed-mrt-snorm-resolve, 5/5 PASS):
    • mixed_mrt_snorm_half_sample_avg: PASS (rt0_snorm=(0.252,-0.244,-0.244,1.000) exp (0.250,-0.250,-0.250,1.000), rt1_f16=(0.500,0.500,3.000,1.000) exp (0.500,0.500,3.000,1.000), fails=0)
    • mixed_mrt_snorm_full_neg_sign: PASS (rt0_snorm=(-0.748,-0.504,0.504,1.000) exp (-0.750,-0.500,0.500,1.000), rt1_f16=(-1.250,2.500,0.000,1.000) exp (-1.250,2.500,0.000,1.000), fails=0)
    • suspend_resume_single_rt: PASS (fails=0)
    • suspend_resume_mixed_mrt: PASS (fails=0)
    • single_rt_r11g11b10f: PASS (rgb=(0.500,1.000,2.000) exp (0.500,1.000,2.000), fails=0)
  • FULL unstrided Vulkan CTS (5,257 Pass / 0 Fail / 0 Crash / 0 Timeout / 3,114 NotSupported across 8,371 cases):
Subset Cases Pass Fail Crash Timeout NotSupported
vk-mustpass-short 87 87 0 0 0 0
FULL dynamic_rendering.*multisample_resolve* 3,658 2,504 0 0 0 1,154
FULL renderpass2.*attachment_allocation* 1,200 712 0 0 0 488
FULL renderpass2.*multisample_resolve* 2,609 1,737 0 0 0 872
FULL api.copy_and_blit.*resolve* 516 160 0 0 0 356
FULL dynamic_rendering suspend/resume (resolve) 132 0 0 0 0 132
FULL dynamic_rendering suspend/resume (other) 159 51 0 0 0 108
b10g11r11 resolve-query & renderpass 10 6 0 0 0 4

(Note: the installed VK-GL-CTS caselist contains 0 *multisample_resolve*b10g11r11* cases; test-mixed-mrt-snorm-resolve case 5 above directly verifies single-RT 4× MSAA B10G11R11_UFLOAT_PACK32 resolve readback.)

  • gpubench-vk (8/8 ok, 0 CRC fail):
    • render.deferred (mode=tile,msaa=4,res=1080p): d=1: 5434.78 us, d=2: 5000.00 us (crc=6dc74b48, valid=True — matches G17P B1 bit-for-bit)
    • render.deferred (mode=dram,msaa=4,res=1080p): d=1: 3906.25 us, d=2: 3472.22 us (crc=7c09507f, valid=True)
    • render.postfx (msaa=4,res=1080p): d=1: 1785.71 us, d=2: 1592.36 us (crc=668d6f0a, valid=True)
    • compress.bw (kind=msaa4,res=1440p): d=1: 939.85 us (crc=dba94c4d, valid=True), d=4: 550.66 us (crc=b3eaa2c4, valid=True)
  • System health: 0 kernel GPU dmesg errors / faults.

Assisted-by: LLM (Gemini:4 Neon)

@DjDeveloperr

DjDeveloperr commented Nov 22, 2026 •

Copy link
Copy Markdown
Author

J714s verification at c01ed0de97b99bffe3827853aa1482d0e3fa70f3

Apple M5 Pro, G17S B1 / AGX3C, Linux 7.3.0-m5-cdirect15. Both Borealis ICDs reported the expected source revision through Vulkan. J714s exercises the AGX3C rendering path. The direct mixed-format end-of-tile optimization runs in the native AGX3 builder on G15x, G16G and G17P.

Vulkan CTS multisample resolve Base pass / skip PR pass / skip
Render pass 1, suballocation 2,361 / 250 2,361 / 250
Render pass 2, suballocation 2,353 / 248 2,353 / 248
Dynamic rendering, suballocation 3,168 / 482 3,168 / 482

All 8,862 individual outcomes matched, with zero failures, crashes or timeouts. The mixed-format pixel verifier also passed all five cases on both drivers, covering signed-normalized color, floating-point color, suspend/resume and single-target R11G11B10F.

4× MSAA at 1080p. Four benchmark invocations per arm, in ABBA then BAAB order, with the median time per submit in microseconds. The Vulkan benchmark performed its built-in pixel checks and every framebuffer CRC matched across arms.

Workload Queue depth Base µs PR µs CRC on both
Post-processing 1 363.64 355.88 668d6f0a
Post-processing 2 247.16 245.82 668d6f0a
Deferred, tile mode 1 299.76 300.48 6dc74b48
Deferred, tile mode 2 152.35 152.35 6dc74b48

Release and assert builds each passed 316/316 tests with meson test --suite asahi. GCC and Clang produced the same pre-existing diagnostics on the changed translation units under -Werror. GPU online, crashed=0, quarantined=0, zero new kernel GPU faults.

Release libvulkan_asahi.so SHA-256

  • Base a8f14aa57b839701e7807d8a1a6a5699c5c235b6 · 0e120da51e133be6d6d71aafbc22bc1bdbeda163f6d5173872dd675736aa5c9a
  • PR c01ed0de97b99bffe3827853aa1482d0e3fa70f3 · 31f316a2fc2f8d139dba497f70fa80d437ef1a54f08da9bee5bc41c6d952b316
Verifier source and earlier G16G and G17P results

Shared the exact verbatim source of test-mixed-mrt-snorm-resolve (all 5 cases, including single_rt_r11g11b10f, plus GLSL shaders, pre-generated SPIR-V headers, and build.sh) as a public gist:

  • Gist: https://gist.github.com/DjDeveloperr/c476e07e376352f8179218f21b142fa4
  • Exact binary match: compiled cleanly with clang -O2 -Wall -Wextra -Werror (73,792 bytes, same source & binary verified on both G17P B1 in #issuecomment-7085761854 and G16G B0 in #issuecomment-7085884872).
  • Build & run:
    git clone https://gist.github.com/DjDeveloperr/c476e07e376352f8179218f21b142fa4 test-mixed-mrt-snorm-resolve && cd test-mixed-mrt-snorm-resolve
    ./build.sh   # or: cc -O2 -Wall -Wextra -Werror test_mixed_mrt_snorm_resolve.c -I. -lvulkan -lm -o test-mixed-mrt-snorm-resolve
    VK_DRIVER_FILES=<asahi_icd.json> ./test-mixed-mrt-snorm-resolve
    (If vulkan/vulkan.h is not in system include paths, pass CFLAGS="-I<mesa>/include" to ./build.sh.)

Note that exact-head M4 (G16G B0) results for all 5 cases + full unstrided CTS (5,257/0) are also live above in #issuecomment-7085884872.

Signed-off-by: Diljit Singh <hey@djdev.me>
@DjDeveloperr
DjDeveloperr requested a review from a team as a code owner November 25, 2026 12:26

@satchlj satchlj left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Verdict: MERGE at c01ed0de97b9

Blockers: none

Checked: Full 875-line diff across src/asahi/vulkan/hk_agx3_ioto_program_core.{c,h}, src/asahi/vulkan/hk_cmd_draw.c, src/asahi/lib/tests/test-agx-g17p-mrt-mixed.c, and src/asahi/vulkan/tests/test-hk-agx3-ioto-program-core.c; native GCC 16 release-with-assertions build (-Db_ndebug=false), full meson test --suite asahi suite (including the new mixed direct-resolve unit tests), and live Mac Studio M5 Max (J775c, T6050) Vulkan CTS execution with LD_DEBUG=libs verification and zero GPU faults.

Evidence
  • Audited hk_agx3_g17p_mixed_direct_color_resolve_supported() and hk_build_g17p_mixed_bg_eot(): direct EOT MSAA resolve on mixed/subset MRT passes is properly gated to 2x/4x non-partial, non-spilled, full render-area/multiview passes outside suspend/resume, enforces the 14 color+resolve write-range cap (reserving 2 slots for depth/stencil within the 16-range limit), requires every stored attachment to AVERAGE-resolve without STORE_OP_STORE into a matching 1x valid PBE view, and rejects raw-word, R11G11B10_FLOAT, sRGB, and integer formats via both EOT key format and unmapped view_format.
  • Single-target direct resolve (hk_agx3_g17p_direct_color_resolve_supported()) cleanly gates R11G11B10_FLOAT on hk_eot_r11g11b10_own_class(), blocks suspend/resume and sparse multiview masks consistently across preserve_resolve_outside, resolved_after_pass, store_and_resolve, and direct_resolve, checks unmapped view format for sRGB transfer bit 0x20, adds suspend_resume to hk_g17p_bg_eot_cache_key, and scans all color attachments for loaded_resolve in hk_begin_rendering().
  • Native build on Mac Studio M5 Max (J775c, T6050) at c01ed0de97b99bffe3827853aa1482d0e3fa70f3 (-Dbuildtype=release -Db_ndebug=false, GCC 16.1.1): build succeeded; meson test --suite asahi passed 206/206 (0 failed), including asahi-g17p-mrt-mixed and hk_agx3_ioto_program_core.
  • Verified private libvulkan_asahi.so loaded via LD_DEBUG=libs on Mac Studio M5 Max (J775c, T6050) Vulkan CTS (dEQP Core vulkan-cts-1.4.7.1):
    • dEQP-VK.api.smoke.* (including dEQP-VK.api.smoke.unused_resolve_attachment): 8/8 PASS (0 failed)
    • Kernel GPU fault delta: 0
  • Exact-head J714s verification (8,862 CTS cases + pixel checks) is recorded on c01ed0de97b9 alongside earlier G16G/G17P hardware rows at 2bfa1cc139ad.

@RyanTheTide

Copy link
Copy Markdown

c01ed0de97b9 J616s (Apple M4 Pro (G16S B1), native AGX3, 7.3.0-aurora-fleet89, isolated Borealis overlay libvulkan_asahi.so 5eeef5c0f647f201 vs exact base a8f14aa57b83 b691da8fc92f610a, no reboot) PASS: test-mixed-mrt-snorm-resolve 5/5 PASS under both default compressed and ASAHI_MESA_DEBUG=nocompress (including single_rt_r11g11b10f rgb=(0.500,1.000,2.000) fails=0); full unstrided Vulkan CTS 5,004 Pass / 0 Fail / 2,754 NS across 7,758 cases (dynamic_rendering.*multisample_resolve* 2,504/3,658, renderpass2.*multisample_resolve* 1,737/2,609, renderpass2.*attachment_allocation* 712/1,200, dynamic_rendering.*suspend* 51/291); gpubench-vk render.deferred (tile, msaa=4, 1080p) 484.26 -> 381.70 us/submit (gpu_us 446.67 -> 226.50 us, crc 5e4130ce -> 6dc74b48 valid=true), render.deferred (dram) crc=7c09507f, render.postfx (msaa=4) crc=668d6f0a, compress.bw (msaa4, 1440p) valid=true; 0 GPU faults, 0 AVC, 0 new kernel errors, 0 failed units, Enforcing. Companion J713 (Apple M4 (G16G B0), 7.3.0-aurora-fleet85, ASAHI_MESA_DEBUG=nocompress) exact A/B confirms single_rt_r11g11b10f fixes base a8f14aa57b83 FAIL (49152 fails) to c01ed0de97b9 5/5 PASS (0 fails).

@DjDeveloperr
DjDeveloperr merged commit e736b5f into aurora-wip Nov 25, 2026
@RyanTheTide
RyanTheTide deleted the djdev/g16g-mixed-eot-resolve branch November 27, 2026 13:20
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