Skip to content

asahi: compress G17P depth/stencil mip chains - #67

Closed
RyanTheTide wants to merge 2 commits into
feat/g17p-layered-msaa-compressionfrom
feat/g17p-zls-mip-compression
Closed

RyanTheTide wants to merge 2 commits into
feat/g17p-layered-msaa-compressionfrom
feat/g17p-zls-mip-compression

Conversation

@RyanTheTide

@RyanTheTide RyanTheTide commented Oct 24, 2026 •

Copy link
Copy Markdown

This draft stacks on #65.

Enable lossless compression for single-sample D16, D32F, S8 and D32FS8 mip chains on G17P, including 2D arrays and cubes. Each depth/stencil aspect selects its own mip data and metadata addresses, layer strides and minified extent. Small mip tails use twiddled data with zero metadata state and compression disabled in every render-stream control variant.

M1/M2 retain their existing descriptor and ZLS setup. Standalone S8 compression remains single-sampled. Linear compressed ZLS, mipmapped MSAA and 8x remain disabled. The colour compression restrictions from #65 are unchanged.

Validation completed

  • Host and emulated AArch64 admission, native descriptor, metadata layout and ZLS suites pass. The ZLS suite checks odd dimensions, every mip through 1x1, nonzero array layers and cube faces, separate depth/stencil state, and all load/store combinations, with 3,246,833 checks.
  • All 224 Gen7/Gen8 descriptors and 800 ZLS control words match the base byte for byte.
  • The AArch64 release build passes for Vulkan, Gallium Asahi/Zink, EGL, GLX and GBM. The process-local overlay passes manifest and launcher checks.

GPU validation remains pending. The test plan covers depth/stencil mip copies and blits, mip attachments, separate-aspect access, stencil mip sampling, shadow sampling for 2D/array/cube views, renderpass load/store behaviour, and paired bandwidth benchmarks. No runtime correctness or performance result is claimed by this draft.

Select ZLS data, metadata and dimensions for the attachment level on each
aspect. Use the full plane miptree strides between array layers. Levels
below the compression cutoff use twiddled data with no metadata state or
compression controls, including in partial and final render streams.

Admit single-sample depth/stencil mip chains and standalone S8 images in
the G17P policy. Keep the legacy descriptor and ZLS paths unchanged.

Add offline coverage for odd extents, narrow tails, nonzero layers and
independent depth/stencil state.
RyanTheTide added a commit that referenced this pull request Oct 26, 2026
Reuse the public Gen9 layered/MSAA packet and per-level ZLS work from Mesa PRs #65 and #67 on the admitted T6040 profile. Its AGX3B, HAL200, Gen9 descriptor and sampler axes match the native profile established by #55.

Select expanded array/cube/3D colour, transfer-only 2x/4x colour, layered/MSAA depth-stencil and single-sample depth-stencil mip policies by the physical T6040 identity. Preserve the prior Neo policy and Gen10 packet cases. Colour MSAA render attachments stay plain under #66 because a legal MRT mix can spill them; #72 adds unmeasured boundary-copy work and is not silently enabled.

Keep all source-level RT gates unchanged. Retain existing policy regressions and add the public packet, metadata and per-level ZLS checks alongside a separate G16S policy suite. Hardware and performance qualification remain required before merge.

Source: #65
Source: #67
Assisted-by: LLM
Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
@RyanTheTide

Copy link
Copy Markdown
Author

Superseded by #87, merged into aurora-wip in the 2026-10-28 consolidation.

@RyanTheTide
RyanTheTide deleted the feat/g17p-zls-mip-compression branch October 28, 2026 04:26
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