Files
marfrit e323aa2316 mesa-panvk-bifrost r9: bump maxImageDimension3D to 2048 (iter22, unblocks Dawn/WebGPU)
Adds 0008-panvk-bifrost-bump-max-image-dim-3d-for-dawn.patch. Two-hunk patch:

Hunk 1: Bumps maxImageDimension3D from 512 to 2048 on Bifrost (PAN_ARCH 7..10).
Surfaced by panvk-bifrost-perf-measurement iter1 spike: Brave's WebGPU/Dawn
detects panvk-bifrost as a Vulkan adapter on Mali-G52 r1 MC1 but rejects it
because the advertised limit is below WebGPU's 2048 minimum (per
third_party/dawn/src/dawn/native/vulkan/PhysicalDeviceVk.cpp:746). This is
the actual unblock for the campaign's stated motivator — Chromium GPU
process Vulkan boot on PineTab2 / Bifrost SBCs.

Per Vulkan 1.3 spec §43.1, maxImageDimensionXD is the upper bound on any
creatable image; per-format limits MAY be smaller. On PAN_ARCH<=10 the
per-format limit caps at ~1023 per axis for RGBA8 within the 4 GB
max_img_size_B address constraint. Apps trying 2048^3 with thick formats
hit the per-format limit at image-create — per-spec behavior.

Hunk 2: Removes three asserts in get_max_3d_image_size() that encoded the
wrong invariant (per-format >= basic), opposite of what the Vulkan spec
mandates. The asserts were release-mode-masked via NDEBUG, but debug
builds would abort the first time Dawn (or any client) called
vkGetPhysicalDeviceImageFormatProperties on a 3D image format. Surfaced
by Phase 5 2nd-model review.

Verified on PineTab2 (Mali-G52 r1 MC1, PAN_ARCH 7):
  - vulkaninfo: maxImageDimension3D = 2048
  - Brave/Dawn: "Insufficient Vulkan limits" warning eliminated; adapter
    accepted for WebGPU.
  - CTS regression: dEQP-VK.api.copy_and_blit.core.image_to_image.3d_images.*
    6/6 Pass (unchanged from r7 baseline).

Phase 5 (2nd-model) review: APPROVE WITH CHANGES — both changes applied
(release-mode + debug-mode assert exposure addressed by removing the
wrong-invariant asserts).

Note on numbering: r8 was attempted (KHR_depth_clamp_zero_one trim) but
abandoned mid-Phase-3 when it surfaced that 5 more post-1.3.10 KHR
extensions are advertised — surgically false-gating all of them would
risk undoing r1's KHR_robustness2 work for Chromium Dawn. Documented at
~/src/panvk-bifrost/iter21/phase0to3_close_no_ship.md.

Cross-refs:
  - ~/src/panvk-bifrost/iter22/phase0to2_max3d_close.md (Phase 0-2 close)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-25 15:54:18 +02:00
..

mesa-panvk-bifrost

Patched Mesa libvulkan_panfrost.so exposing Bifrost-gen Mali GPUs (Mali-G31/G52/G72/G76, PAN_ARCH 6/7) to Chromium-family browsers' Vulkan compositor.

Result of the panvk-bifrost campaign (~/src/panvk-bifrost/), iter9 close 2026-05-20 (technical milestone — operator-confirmed Brave window) followed by this package as the actual delivery.

What it solves

Stock Chromium / Brave on Bifrost SBCs (PineTab2, etc.) currently dies at GL bindings init:

ERROR: ui/gl/gl_context_egl.cc:120  GLES3 is unsupported and ES version fallback is disabled
ERROR: ui/gl/init/gl_factory.cc:111  Requested GL implementation not found
ERROR: components/viz/service/main/viz_main_impl.cc:189  Exiting GPU process due to errors during initialization

This package makes Brave's Vulkan compositor path work on Bifrost, side-stepping the failing GL stack. Browser chrome and standard page rendering work.

Known limitations (not addressed)

  • WebGL / WebGL2 in-page: blocked. ANGLE needs VK_EXT_transform_feedback to expose GLES3 contexts; PanVk-Bifrost doesn't currently support that. Sites using WebGL will degrade or refuse.
  • VAAPI hardware video decode: unrelated to this package — see the libva-v4l2-request-fourier package for that path.

Install

# Ensure [marfrit] is in /etc/pacman.conf, then:
sudo pacman -Sy mesa-panvk-bifrost

Use

brave-vulkan                                    # launches Brave with Vulkan
brave-vulkan https://www.example.com
brave-vulkan --your-flags-here                  # extra args passed through

The launcher sets:

  • VK_ICD_FILENAMES=/usr/lib/panvk-bifrost/icd.json (the patched driver)
  • PAN_I_WANT_A_BROKEN_VULKAN_DRIVER=1 (Mesa upstream gate)
  • MESA_VK_VERSION_OVERRIDE=1.2 (apiVersion bump for ANGLE)
  • Brave flags: --use-gl=disabled --enable-features=Vulkan --use-vulkan=native --ozone-platform=x11 --no-sandbox --disable-gpu-sandbox --ignore-gpu-blocklist

What's in the package

  • /usr/lib/panvk-bifrost/libvulkan_panfrost.so — patched Mesa Vulkan driver (Mesa 26.0.6 + 2 sed-applied patches)
  • /usr/lib/panvk-bifrost/icd.json — Vulkan ICD JSON pointing at the patched .so (NOT auto-loaded; only via VK_ICD_FILENAMES)
  • /usr/bin/brave-vulkan — launcher script

System Mesa is untouched. The stock /usr/lib/libvulkan_panfrost.so and /usr/share/vulkan/icd.d/panfrost_icd.json continue to work for any other Vulkan app.

Co-existence

Both stock Mesa and this package can be installed. Stock Vulkan apps (vulkaninfo, vkcube, etc.) use the stock driver by default. Only apps started via brave-vulkan (or with VK_ICD_FILENAMES manually set to our path) use the patched driver.

Campaign close criterion

Per feedback_package_done_means_installable three-point check:

  1. PR merged to marfrit-packages
  2. CI green AND packages.reauktion.de/arch/aarch64/mesa-panvk-bifrost-*.pkg.tar.zst exists
  3. pacman -Ss mesa-panvk-bifrost on a fresh consumer host (e.g. ohm after pacman -Syu from clean state) returns the package + brave-vulkan launches

When all three pass, panvk-bifrost iter9 closes.