Skip to content

PanVK Mali (Based on Mesa 27.0.0-devel)

Choose a tag to compare

@JimVulkan JimVulkan released this 03 Nov 23:54
· 4 commits to main since this release

mali-panvk r9

PanVK for Arm Mali GPUs on stock Android. Mesa's PanVK Vulkan driver runs on the kernel driver the
phone already has (Arm's kbase, /dev/mali0): no root, no custom kernel. Based on Mesa
27.0.0-devel.

mali-panvk-27.0.0-devel-r9.zip, sha256
04d82e2f35e4e80138f9a407ec4222e40908b32196eb7484355993e6c5fdc376. Built from 6dc24ce.

Supported GPUs

Architecture GPUs Vulkan Status
Bifrost Mali-G31, G51, G52, G71, G72, G76 1.4 (1.3 on the G71 and others with fewer than 8 colour attachments) 1.4 is new
Valhall, first generation Mali-G57, G68, G77, G78 1.4 1.4 is new
Valhall and 5th generation with the command stream frontend Mali-G610, G710, G615, G715, G720, Immortalis-G925, Mali-G1-Ultra 1.4 G710, G925 and G1-Ultra are new; G610, G710 and G715 untested

Tested on

Device GPU SoC
Galaxy S10e Mali-G76 MC12 Exynos 9820
Galaxy Tab S6 Lite Mali-G72 MC3 Exynos 9611
Galaxy A15 Mali-G57 MC2 MediaTek Helio G99
Galaxy A35, Tab S9 FE, Tab S9 FE+ Mali-G68 MC5 Exynos 1380
Galaxy Tab S10+, Tab S10 Ultra Immortalis-G720 MC12 MediaTek Dimensity 9300+
Galaxy Tab S11 Immortalis-G925 MC12 MediaTek Dimensity 9400+
Galaxy Tab S12+ Mali-G1-Ultra MC12 MediaTek Dimensity 9500

Changes since r8

  • Vulkan 1.4 on first-generation Valhall, and on every Bifrost GPU that meets 1.4's limits.
  • New GPUs on the command stream frontend: Immortalis-G925 (Galaxy Tab S11) and Mali-G1-Ultra
    (Galaxy Tab S12+, Android 17), plus the Mali-G710's ID. The G1-Ultra needed the newer kernel's
    buffer import call, the Android 17 gralloc and MediaTek's newer compressed buffer layouts.
    The driver now reports the GPU names Arm uses.
  • Geometry shaders, tessellation and transform feedback on the command stream GPUs, including
    indirect draws. They used to work only on the job manager GPUs.
  • First-generation Valhall: tessellation, and geometry shaders with indirect draws (r8 skipped
    those draws).
  • Transform feedback: captured from a vertex or tessellation shader with no geometry shader,
    transform feedback queries, and vkCmdDrawIndirectByteCountEXT on Bifrost.
  • What DXVK needs on Valhall: clip and cull distances, several viewports, line and point
    polygon modes, and geometry shader vertex streams.
  • Direct3D 12.
    • Valhall: everything vkd3d-proton requires, plus VK_EXT_descriptor_heap. That gives feature
      level 11_0, and 11_1 on the Immortalis-G925 and Mali-G1-Ultra.
    • Bifrost: Wine's own d3d12 (upstream vkd3d) gets feature level 11_0. It needs pipeline
      statistics queries, which the driver now has.
  • Timestamp queries on Bifrost and first-generation Valhall. In r8 they were missing, which
    held zink at OpenGL 3.2.
  • BC textures on all of Valhall: emulated where the GPU has no decoder (the G720, for example),
    as on Bifrost.
  • Shader cache. Compiled shaders are now kept on disk next to the driver, so a game compiles
    each pipeline only once. A test that builds the BC emulation pipelines starts in 0.12 s instead
    of 1.0 s on the second run (G68), and in 0.30 s instead of 1.23 s (G76).
  • Faster drawing:
    • Overlapped submissions (job manager GPUs). Each batch's vertex work now overlaps the
      previous batch's pixel work, where it used to wait for it to finish. On the Galaxy A35
      (G68): 367 to 525 fps with many draws, 180 to 468 fps with four submissions per frame.
    • mediump shaders (RelaxedPrecision) now run in 16 bits, as with Arm's driver. A
      half-precision fill test on the Mali-G57 went from 190 to about 220 fps (Arm's driver: 230).
      PANVK_NO_MEDIUMP=1 turns this off.
    • Less CPU work per draw: recording 2000 draws on the G76 takes 2.2-2.6 ms instead of 3.3
      (Arm's driver: 3.05). Constants also cost fewer instructions on Valhall.
    • Against Arm's driver on the Tab S9 FE+ (G68): 522 vs 412 fps in the default scene, 2227 vs
      1018 with 200 draws per frame, 2067 vs 1611 with geometry.
  • Fixed:
    • A phone reboot on the Mali-G615 when MojoLauncher's resolution was below 100%. The render area
      could reach past the attachments.
    • Two pipelines that differed only in polygon mode could share one compiled vertex shader, so a
      wireframe draw could come out filled.
  • Gralloc goes through Android's libui. It now works with any gralloc mapper from version 2 to
    5, including Android 17 phones that have no gralloc 4 service.

Known limitations

  • Direct3D 12 tops out at feature level 11_1: 12_0 needs tiled resources, and kbase cannot remap
    GPU memory pages. Feature level 11_1 also needs vertex shader stores, which are off on the G57
    to G720, because those GPUs run the vertex shader for vertices a draw does not use.
  • On Bifrost, Direct3D 12 games that use unbounded (bindless) descriptor ranges do not start,
    because Bifrost has no bindless textures.
  • Pipeline statistics queries do not count indirect draws or fragment shader invocations.
  • No mesh shaders: no Bifrost or Valhall GPU has them in hardware.
  • The driver uses the phone's own libui.so, libutils.so, libcutils.so, liblog.so and
    libnativewindow.so. A launcher that hides system libraries from the driver will not load it.
    Build with GRALLOC=0 ./build.sh for a driver without that dependency.
  • On phones with 4 GB of RAM or less, give Minecraft about 600 MB of Java heap.

Install

mali-panvk-27.0.0-devel-r9.zip is a driver package for emulators and launchers that load custom
Vulkan drivers from a zip (meta.json + libvulkan_panfrost.so). Android 12 (API 31) or newer,
64-bit.