mesa-panvk-bifrost: r5 -> r6 — advertise VK_EXT_legacy_dithering on Bifrost #94

Merged
marfrit merged 1 commits from claude-noether/marfrit-packages:noether/mesa-panvk-bifrost-r6-legacy-dithering into main 2026-05-24 22:28:59 +00:00
Contributor

Summary

mesa-panvk-bifrost r5 → r6: backports Mesa main's unconditional flip of VK_EXT_legacy_dithering. Pure-software composition; no new HW path. vk_render_pass already gates on enabled_features.legacyDithering and panvk_vX_blend + pan_format already plumb the dithered BLEND descriptor (BFMT2 table has MALI_BLEND_AU encodings for RGB565/RGB5A1/RGBA4/RGB10A2 on PAN_ARCH 7). Our r5 base just hadn't picked up the cherry-pick.

Phase 7 verify (on ohm)

Locally-built r6 lib at /tmp/r6_test_lib/:

Subset r5 r6 Delta
dEQP-VK.api.*.legacy_dithering* 2 P / 0 F 2 P / 0 F identical
dEQP-VK.renderpass.dithering.* 0 P / 0 F / 94 NS 0 P / 0 F / 94 NS identical
dEQP-VK.renderpass2.dithering.* 0 P / 0 F / 94 NS 0 P / 0 F / 94 NS identical
vulkaninfo advertisement absent VK_EXT_legacy_dithering rev 2
legacyDithering feature flag implicit false true

Zero regressions; advertisement-only delta as expected.

Process

Followed 8-step bugfix-process per [[feedback-bugfix-process]]:

  1. Re-analyzed: extension is genuinely missing in 26.0.6 (verified 0 hits in vanilla source); not just a stale-cache issue.
  2. Prior art: Mesa main has the unconditional flip; ARM's libmali r51p0 (BXODROIDN2PL, 2024-08) lists the extension in its Vulkan string table → ARM ships it for Mali-G52-class HW. Multi-language audit confirmed.
  3. Drafted patch (kept minimal; 5 lines total).
  4. 2nd-model review completed — traced full code path: vk_render_pass.c:523 (gate) → panvk_vX_cmd_draw.c:755 (plumb) → panvk_vX_blend.c:382 (consume) → pan_format.c:40-115 (BFMT2 dither table for PAN_ARCH 7). No interaction with r1 nullDescriptor (disjoint code paths). Mesa upstream marks DONE for panvk in docs/features.txt.
  5. Implemented.
  6. Deploy + test: built locally on ohm, installed to test path.
  7. Confirmed: dEQP subsets show zero regressions, advertisement flipped.
  8. Documentation: this PR body + commit message + research note already lives in marfrit/panvk-bifrost repo.

Out of scope (follow-up)

The 94 renderpass-dithering CTS tests show as NotSupported on both r5 and r6 — there's a separate panvk-side prereq the dEQP harness checks (likely a specific format-feature combination, not the extension flag itself). Worth a future iteration to characterize what unblocks those.

Test plan

  • CI builds + signs + publishes mesa-panvk-bifrost-26.0.6.r6-1-aarch64.pkg.tar.xz
  • pacman -Sy && pacman -Si mesa-panvk-bifrost on ohm shows Version: 26.0.6.r6-1 (three-point ship-check)
  • vulkaninfo on installed r6 advertises VK_EXT_legacy_dithering + legacyDithering = true

🤖 Generated with Claude Code

## Summary `mesa-panvk-bifrost` r5 → r6: backports Mesa main's unconditional flip of `VK_EXT_legacy_dithering`. Pure-software composition; no new HW path. `vk_render_pass` already gates on `enabled_features.legacyDithering` and `panvk_vX_blend` + `pan_format` already plumb the dithered BLEND descriptor (BFMT2 table has `MALI_BLEND_AU` encodings for RGB565/RGB5A1/RGBA4/RGB10A2 on PAN_ARCH 7). Our r5 base just hadn't picked up the cherry-pick. ## Phase 7 verify (on ohm) Locally-built r6 lib at `/tmp/r6_test_lib/`: | Subset | r5 | r6 | Delta | |---|---|---|---| | `dEQP-VK.api.*.legacy_dithering*` | 2 P / 0 F | 2 P / 0 F | identical | | `dEQP-VK.renderpass.dithering.*` | 0 P / 0 F / 94 NS | 0 P / 0 F / 94 NS | identical | | `dEQP-VK.renderpass2.dithering.*` | 0 P / 0 F / 94 NS | 0 P / 0 F / 94 NS | identical | | `vulkaninfo` advertisement | absent | `VK_EXT_legacy_dithering rev 2` | ✓ | | `legacyDithering` feature flag | implicit false | `true` | ✓ | Zero regressions; advertisement-only delta as expected. ## Process Followed 8-step bugfix-process per `[[feedback-bugfix-process]]`: 1. Re-analyzed: extension is genuinely missing in 26.0.6 (verified 0 hits in vanilla source); not just a stale-cache issue. 2. Prior art: Mesa main has the unconditional flip; ARM's libmali r51p0 (`BXODROIDN2PL`, 2024-08) lists the extension in its Vulkan string table → ARM ships it for Mali-G52-class HW. Multi-language audit confirmed. 3. Drafted patch (kept minimal; 5 lines total). 4. **2nd-model review** completed — traced full code path: `vk_render_pass.c:523` (gate) → `panvk_vX_cmd_draw.c:755` (plumb) → `panvk_vX_blend.c:382` (consume) → `pan_format.c:40-115` (BFMT2 dither table for PAN_ARCH 7). No interaction with r1 `nullDescriptor` (disjoint code paths). Mesa upstream marks DONE for panvk in `docs/features.txt`. 5. Implemented. 6. Deploy + test: built locally on ohm, installed to test path. 7. Confirmed: dEQP subsets show zero regressions, advertisement flipped. 8. Documentation: this PR body + commit message + research note already lives in marfrit/panvk-bifrost repo. ## Out of scope (follow-up) The 94 renderpass-dithering CTS tests show as NotSupported on both r5 and r6 — there's a separate panvk-side prereq the dEQP harness checks (likely a specific format-feature combination, not the extension flag itself). Worth a future iteration to characterize what unblocks those. ## Test plan - [ ] CI builds + signs + publishes `mesa-panvk-bifrost-26.0.6.r6-1-aarch64.pkg.tar.xz` - [ ] `pacman -Sy && pacman -Si mesa-panvk-bifrost` on ohm shows `Version: 26.0.6.r6-1` (three-point ship-check) - [ ] `vulkaninfo` on installed r6 advertises `VK_EXT_legacy_dithering` + `legacyDithering = true` 🤖 Generated with [Claude Code](https://claude.com/claude-code)
claude-noether added 1 commit 2026-05-24 22:24:11 +00:00
Backports Mesa main's unconditional flip of VK_EXT_legacy_dithering.
Pure-software composition; no new HW path. vk_render_pass already gates
on enabled_features.legacyDithering and panvk_vX_blend + pan_format
already plumb the dithered BLEND descriptor (BFMT2 table has MALI_BLEND_AU
encodings for RGB565/RGB5A1/RGBA4/RGB10A2 on PAN_ARCH 7). Our r5 base
just hadn't picked up the cherry-pick.

Phase 7 verify on ohm (PineTab2 / RK3566 / Mali-G52 r1 MC1) with a
locally-built r6 lib at /tmp/r6_test_lib/:

  Feature advertisement:
    r5: VK_EXT_legacy_dithering not in extension list, legacyDithering=false
    r6: VK_EXT_legacy_dithering rev 2 advertised, legacyDithering=true

  dEQP subsets (delta):
    dEQP-VK.api.*.legacy_dithering*    r5/r6 both:  2 P / 0 F (identical)
    dEQP-VK.renderpass.dithering.*     r5/r6 both:  0 P / 0 F / 94 NS (identical)
    dEQP-VK.renderpass2.dithering.*    r5/r6 both:  0 P / 0 F / 94 NS (identical)

  Net: zero regressions, advertisement-only delta as expected.

Second-model review (per bugfix-process step 4) traced the full code
path through vk_render_pass + panvk_vX_cmd_draw + panvk_vX_blend +
pan_format BFMT2. No interaction with our r1 nullDescriptor (disjoint
paths). Mesa upstream marks ext DONE for panvk in docs/features.txt.

ARM's own libmali r51p0 driver (BXODROIDN2PL, 2024-08) lists
VK_EXT_legacy_dithering in its Vulkan extension string table,
confirming the feature is shipped by ARM for Mali-G52-class hardware.

Follow-up out of scope: the 94 renderpass-dithering tests show as
NotSupported on both r5 and r6 — there's a separate panvk-side
prereq the dEQP harness checks (likely a specific format-feature
combination). Worth investigating in a future iteration.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
marfrit merged commit beb09c4863 into main 2026-05-24 22:28:59 +00:00
marfrit deleted branch noether/mesa-panvk-bifrost-r6-legacy-dithering 2026-05-24 22:29:01 +00:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: marfrit/marfrit-packages#94