Repository navigation
borealis: compress alias-capable private M5 attachments - #466
Conversation
|
Thanks for the patch and for the readback test. We select behaviour by a hardware property rather than by the chip a change was tested on. Admitting the alias flag is limited to one chip:
Whether a placed, alias-capable private attachment can be compressed follows from the layout compatibility checks the function already makes, which apply on G17P and the other M5 parts too. Could the alias flag be admitted on every chip that compresses attachments, with a comment naming the hardware reason for any generation that has to stay plain? The short replay also measured -5.8 % FPS with this change, so a run showing the benefit would help before it becomes a default. We can supply rows on our M1 Pro, M2, M4 Pro and A18 Pro if you make it the default. |
|
Note 🤖 GPT-6.2 Astra responding on behalf of erikwb Restoring alias-capable private attachment compression alone improved full-game T2 by +0.67 and +1.19 FPS in the two blocks. This was the largest individual gain among the seven PRs we tested. The 22-frame 4K FSR2 replay in the PR remains a genuine negative result for that workload. We used two blocks of full Cyberpunk T2 runs in opposite orders on the M5 Max, native 2560×1600 High, with the fans fixed. The control was Mesa Keeping compatible placed attachments compressed gives the GPU a way to reduce memory traffic. The FPS test measures the consequence of enabling the policy on G17C. Extending it to another GPU still depends on the format, layout and metadata compatibility of its aliasing paths. In a separate eight-run comparison, enabling #460, #461, #466 and #468 together raised native T2 from 29.99 to 31.33 FPS. All four adjacent pairs favored the bundle. That 1.35 FPS is the combined effect. |
|
Thanks for the longer runs; +0.67 and +1.19 FPS makes a good case for keeping compatible placed attachments compressed. On scope: you note that extending it depends on the format, layout and metadata compatibility of each GPU's aliasing paths. The function already performs those compatibility checks, so they, rather than |
Merge train: independent review (code only, Opus 5.5 xhigh)Verdict: CLEAN WITH NITS. No blocker or major. Two aliased images with identical parameters always get the same compressed layout, and swapchain and external-memory images stay uncompressed. Only doc and unit-test gaps remain. Reach: G17C only; nothing changes on G17S/G17G/G17P. Widening to G17S/G17G is safe as written. Held on the property-gate request (owner decision pending). |
a52cce6 to
7f7f6e2
Compare
|
Note 🤖 Claude Opus 5.5 responding on behalf of erikwb The alias flag is now admitted by the M5 colour and depth policies for every M5 part, not only G17C (211c4ab).
|
7f7f6e2 to
211c4ab
Compare
RyanTheTide
left a comment
There was a problem hiding this comment.
No blockers. Re-review of 211c4ab: ALIAS is now admitted by the M5 colour and depth policies for every M5 part, and the remaining checks decide eligibility, which resolves our point. The G17P note is correct: it has no private-attachment policy for the flag to reach. DISJOINT and sparse stay refused, and the unit test now sweeps every chip. Nothing changes on G13-G17P. The remaining gap is the G17G/G17S readback row you named.
Assisted-by: LLM (Claude:Opus 5.5)
|
Looks good; approve once the G17G/G17S row is in. I checked that ALIAS is admitted only by the M5 colour and depth policies (src/asahi/vulkan/hk_g17p_compression.h:488, :613). The decision depends only on the create info and the chip, so aliases with identical parameters get the same layout and metadata. The plane-aliasing form needs DISJOINT on both images, and DISJOINT stays outside
No CI checks are reported on this branch. HW row: M5 or M5 Pro (G17G/G17S) at 211c4ab: the placed colour and depth/stencil rebind readback, Assisted-by: LLM (Claude:Opus 5.5) |
The M5 colour and depth attachment policies refused images created with VK_IMAGE_CREATE_ALIAS_BIT, so placed attachments that may alias stayed uncompressed. Admit the flag on every M5 part. Vulkan defines aliased contents only between images of identical creation parameters, and the policy derives the same compressed layout and metadata for those. The other form of ALIAS, a single-plane image sharing a plane of a multi-planar image, requires VK_IMAGE_CREATE_DISJOINT_BIT, which the policies still refuse, so such an image keeps the plane's plain layout. Sparse, external-memory and WSI images stay plain as before. Extend the policy unit test to cover alias-capable colour and depth images on each chip and the refused DISJOINT and sparse cases. Signed-off-by: Erik Bourget <erik@ebourget.net>
211c4ab to
12a3ce7
Compare
|
Note 🤖 Gemini 4 Neon responding on behalf of erikwb Updated the PR to
|
|
Re-checked at 12a3ce7. The code matches 211c4ab line for line; only the commit message changed. The head T2 A/B (+0.73 FPS, -1.75 ms p99, spread 0.14/0.02 FPS) answers the perf question. The body now uses Borealis and ends with the Assisted-by line, and the commit carries only Signed-off-by. LGTM. The open item is still the G17G/G17S row at this head: the placed colour and depth/stencil rebind readback, Assisted-by: LLM (Claude:Opus 5.5) |
DjDeveloperr
left a comment
There was a problem hiding this comment.
Reviewed at head 12a3ce7d8b11 against the pre-PR checklist. 0 code, policy, attribution, or naming blockers remain; leaving a comment pending the remaining M5 SKU hardware row.
What looks good
- Code & §1 scope:
VK_IMAGE_CREATE_ALIAS_BITis admitted uniformly across the entire M5 family (agx_chip_g17_m5()) in bothhk_m5_color_compression_eligible()andhk_m5_depth_compression_eligible(). Both policies depend only on creation parameters and the chip, so placed aliases with identical creation parameters derive identical compressed layouts and metadata. Single-plane aliasing of a multi-planar plane requiresVK_IMAGE_CREATE_DISJOINT_BIT(VUID-VkImageCreateInfo-format-01577), which stays refused alongside sparse, external-memory, and WSI images.test-hk-g17p-compression.csweeps every chip identity plus the refusedDISJOINTand sparse cases, and G13–G17P are unchanged. - Attribution & naming (§4/§6): Commit
12a3ce7d8b11carries human author/committer andSigned-off-by:only, the PR body uses Borealis naming and ends withAssisted-by:. - Exact-head G17C & M4 evidence (§5): M5 Max (
G17C) placed rebind readback (4/4),dEQP-VK.memory.binding.*(336/336),dEQP-VK.api.image_clearing.*(24,418 Pass / 0 Fail, 0 diffs vsafcc08b71067), symmetric ABBA Cyberpunk 2077 T2 A/B (+0.73 FPS / +2.56%, -1.75 ms p99, with the earlier -5.77% short replay honestly preserved), 0 GPUdmesgerrors, 0 new failed units; M4 (G16G) non-M5 readback 4/4 exact.
Still owed before approval/merge (§5)
- M5 (
G17G) or M5 Pro (G17S) hardware row at12a3ce7d8b11: Placed colour and depth/stencil rebind readback,dEQP-VK.memory.binding.*, anddEQP-VK.api.image_clearing.*, base vs head, 0 new Fail/Crash and 0 GPU faults. - Note: no automated CI check-runs are reported on this branch (host 140/140 unit tests and aarch64 release cross-build were reported locally).
Assisted-by: LLM (Gemini 4 Neon)
|
Verified on Apple M5 Pro (
Ready to merge from |
|
Thanks for the M5 Pro row. It is at 12a3ce7, the code has not changed since the last check, and the readback, memory.binding and image_clearing results are clean with 0 GPU faults. G17G takes the same ALIAS admission as G17S ( Approved. Assisted-by: LLM (Claude:Opus 5.5) |
|
Merged into Verification summary on
Assisted-by: LLM (Google:Gemini 4 Neon) |
Problem
The M5 private colour and depth lossless compression policies (
hk_m5_color_compression_eligible()andhk_m5_depth_compression_eligible()) refused images created withVK_IMAGE_CREATE_ALIAS_BIT, leaving placed attachments that may alias uncompressed.Change
Admit
VK_IMAGE_CREATE_ALIAS_BITinhk_m5_color_compression_eligible()andhk_m5_depth_compression_eligible()for every M5 part (G17G,G17S,G17C), and extendtest-hk-g17p-compression.cto sweep every chip for alias-capable colour and depth images alongside the refusedDISJOINTand sparse cases.Vulkan defines aliased contents only between images with identical creation parameters, and both M5 policies depend only on creation parameters and the chip, so placed aliases derive the same compressed layout and metadata. The single-plane-aliasing-a-multi-planar-plane form of
VK_IMAGE_CREATE_ALIAS_BITrequiresVK_IMAGE_CREATE_DISJOINT_BIT, which both policies continue to refuse. Sparse, external-memory, and WSI images remain uncompressed.This commit changes only the M5 private attachment policies. G13 through G17P are unchanged here (
hk_hal200_compression_eligible()already admitsVK_IMAGE_CREATE_ALIAS_BITonaurora-wipin0ff964c1f73, andhk_g17p_shared_compression_eligible()already admits it).Testing
meson test --suite asahipasses 140/140 (0 Fail), includinghk_g17p_compression.libvulkan_asahi.soSHA-256165e61caf0816d027f390a76c479e1f898a7cd5ba5acf579c8facf9bafa03006).7.3.0-ewb270+:afcc08b71067(libvulkan_asahi.soSHA-2560af8212e6e7590193278c3bb1e63c2c242b905208150f9120c48e3d81b699dd1) vs head12a3ce7d8b11(165e61caf0816d027f390a76c479e1f898a7cd5ba5acf579c8facf9bafa03006), both AArch64 release Borealis:A2B10G10R10_UNORM, mutable + alias) and depth/stencil (D32_SFLOAT_S8_UINT, alias) rebind readback: 4/4 rounds exact on both base and head.dEQP-VK.memory.binding.*(336 cases): 336 Pass, 0 Fail/Crash/Timeout/NotSupported on both base and head (0 differences).dEQP-VK.api.image_clearing.*(45,636 cases): 24,418 Pass, 21,218 NotSupported, 0 Fail/Crash/Timeout on both base and head (0 differences).dmesg, 0 new failed systemd units (SELinux is not active on Arch Linux).afcc08b71067+ PR borealis: expose single-texel buffer offsets on every M5 part #4506faf9aee445brequired for the game on M5, differing only in this commit12a3ce7d8b11; AArch64 release Borealis):Base+450 SHA-256:
ec0053cb6e88f439fc72092cffe2c87ef6162f9e5bdf8e115bf5a3b74bba876aHead+450 SHA-256:
054baf53b10afe92556f49c53b87a784ad1f6412fd84a4e40a98f7061ab2f59aSymmetric ABBA order (4 passes, 0 GPU kernel error lines in
dmesg):afcc08b71067+ borealis: expose single-texel buffer offsets on every M5 part #450)12a3ce7d8b11+ borealis: expose single-texel buffer offsets on every M5 part #450)Run-to-run spread was 0.14 FPS on base and 0.02 FPS on head, so the +0.73 FPS (+2.56%) gain and -1.75 ms p99 improvement are well outside run-to-run variance.
7.3.0-1-40-ARCH(non-M5 regression check; code path unaffected):12a3ce7d8b11(165e61caf0816d027f390a76c479e1f898a7cd5ba5acf579c8facf9bafa03006): placed colour and depth/stencil rebind readback 4/4 rounds exact, 0 GPU kernel error lines indmesg, 0 failed units.Earlier short GFXReconstruct replay on the prior G17C-only head (-5.77%)
Cyberpunk 2077 2.5 on a 40-core Apple M5 Max (J716c, 128 GB), Linux 7.3.0-ewb234+ on AC. Replayed the same 22 measured frames of a 3840×2160 High, FSR2 Balanced Vulkan capture with GFXReconstruct 1.0.5-dev (
ccbbb1c). The game capture needs #450, #451 and #452 on57df4db849a; only the feature differs within each pair. Both builds used AArch64 release Borealis.Run order was control/proposed, proposed/control, control/proposed (12.19 to 13.16 FPS across short runs). The short replay measured 5.77% lower median throughput for this feature in isolation, and that result stands for that workload.
Still to run
dEQP-VK.memory.binding.*, anddEQP-VK.api.image_clearing.*(base vs head, 0 new Fail/Crash, 0 GPU faults) on G17G or G17S.Assisted-by: LLM (Anthropic:Claude Opus 5.5, Google:Gemini 4 Neon)