Skip to content

drm/asahi: enable bounded M5 stencil and 2x/4x rendering - #1028

Merged
Acelogic merged 3 commits into
aurora-wipfrom
j813-m5-stencil-msaa-20261106
Nov 6, 2026
Merged

Acelogic merged 3 commits into
aurora-wipfrom
j813-m5-stencil-msaa-20261106

Conversation

@Acelogic

@Acelogic Acelogic commented Nov 6, 2026 •

Copy link
Copy Markdown
Member

The public M5 backend rejects active stencil transfers and multisample renders, preventing the corresponding Mesa #170 fixes from running on J813. This enables the captured single-layer stencil and 2x/4x render layouts while keeping unsupported layouts outside admission.

Validate the full depth/stencil data and compression ranges in sample space before discarding the unused single-layer array strides. Derive the multisample fragment controls, accept Mesa's eight-byte padded color-sample stride, and use the UAPI utile dimensions once when sizing tile lists. Compressed Z16, layered rendering and eight samples remain unsupported. The G18 backend is unchanged.

Thomas Glanzmann (@sithglan) authored the original M5 backend in #1003 and the Mesa #170 fixes. Miguel Cruz (@Acelogic) implemented this additional kernel support, compared the selected register fields against retained native captures and public Mesa layouts, and performed the hardware qualification. Original authorship is preserved; this PR does not claim authorship of the existing backend or Mesa work.

Validation of kernel source 93e3760751cf77bd99b95f9e3c3fd57c566bb089:

  • Native AArch64 Image, DTBs and modules built with source inventories verified before and after. Bindgen layout checks remain enabled.

  • J813 RAM boot with fresh PMU guards and complete CDC upload/readback: 16/16 baseline checks and 12,288 exact GPU pixels passed.

  • Five physical probes passed: depth/stencil store/load/test at 1x/2x/4x, and color resolve/half-sample coverage at 2x/4x. Ten readbacks checked 10,240 pixels; the half-coverage oracle allows one channel value of rounding. No GPU fault or kernel taint.

  • All 185 existing local kernel CI jobs passed on that source; the complete 828,755,521-byte archive was transferred, SHA-256 checked and all 960 members verified. Archive SHA-256: 6768942be17c336c4aa722e87e451f20b3fce70a80c55f7888015ba4aedfcd89.

  • Final Mesa cd05d39fcacc8d93259e60b5bac3ec418a77aee3: five Z/S probes and three large default-framebuffer resolve probes passed, plus 15 direct GPU/LOD cases on each of J813 and J873. Final selected CTS passed: J813 1,500 Pass / 6 NotSupported, then 3/3 default-framebuffer cases passed with an MS4 EGL configuration; J873 265/265 texture cases passed. All admission audits are clean. Three remaining J813 cases require unsupported 8x sampling.

Head e50ba38b24140fc0751b811ea093c8f843bcec76 only corrects the utile-field documentation after tested source 93e3760; it changes no executable Rust tokens. The M5 window-system resolve fix is a separate Mesa integration change, in addition to the original #170 commits. This is bounded selected-feature qualification, not full conformance.

Final Mesa integration is Mesa #173. J813 direct final probes independently verified 403,456 pixels in 16 readbacks. Evidence archives (SHA-256):

  • J813 selected CTS: 037e011a3238112515fc5c9d491396702e54cd9237c7ee8ad10f14566d69cbc9.
  • J813 MS4 default framebuffer: f42bddd839f0672f37ec7c822072530cc61dfff45279578800b4f09a5b32fe25.
  • J873 regression: df48801e20ee8acb074d549cfd78c4bed3adf325ddba7b553edd9575be54fe9f.
  • Final direct Z/S and resolve probes: e6bcd81b2e43993f5dc526d6dd266946783e4162aea0471ba634a0bb3cded7c4.

GitHub produced no runs or check results for this head; the 185-check result above is retained local CI evidence.

Validate complete depth and stencil allocations in sample space, discard both single-layer strides, and derive the captured fragment controls for two- and four-sample RGBA8 tiles. Use the UAPI utile dimensions once when sizing tile lists. Keep unknown formats, layouts and render modes outside admission. Hardware qualification is pending.
Mesa aligns a 32-bit render target sample stride to eight bytes. Preserve the bounded native sample layouts while accepting that real UAPI value, and include stride and positions in rejection diagnostics. The first physical stencil/depth probe passed; the initial multisample probe was safely refused by the four-byte stride check.
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