Repository navigation
PanVK Mali (Based on Mesa 26.3.0-devel)
mali-panvk r4
PanVK for Arm Mali Bifrost 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
26.3.0-devel; the driver reports Vulkan 1.3.
Tested on
| Phone | GPU | SoC |
|---|---|---|
| Galaxy S10e | Mali-G76 MC12 | Exynos 9820 |
| Galaxy A31 | Mali-G52 MC2 | MediaTek Helio P65 (MT6768) |
The geometry shader, tessellation, transform feedback, draw, descriptor, clipping and primitive
restart test matrices give the same results as r3 on both phones.
Changes since r3
- Direct3D tessellation and geometry shaders no longer are missing/ crashing. A D3D vertex shader
that feeds a hull or geometry shader usually outputs no screen position, and DXVK compiles it
to a Vulkan vertex shader that writes none. Every such draw crashed the GPU job and every
other job with it, so tessellated and geometry-shaded objects vanished and the game could
freeze or lose its device. - DXVK can create its swapchain on MediaTek phones again. Winlator-based emulators failed on the
A31 withCreateSwapchainKHR failed: VK_ERROR_INVALID_EXTERNAL_HANDLE. They put swapchain images
in Android hardware buffers, and the driver could not open any of them: on MediaTek the buffer
sits in a different slot of the gralloc handle than on Exynos. On the A31, all 15 buffer
format/usage combinations tested (RGBA, RGBX and BGRA) failed in r3 and all of them work now, as
does the driver allocating a buffer itself and handing it out. - Compressed (AFBC) hardware buffers can be imported on MediaTek and Exynos phones. Buffers
meant only for the GPU come back compressed there, in layouts the driver now reads and writes
the same way the phones' own drivers do: a test pattern checked pixel by pixel, in both
directions, for RGBA, RGBX and BGRA from 17x9 up to 1920x1080. A BGRA buffer of this kind is
stored as RGBA and is reported asVK_FORMAT_R8G8B8A8_UNORM, as the phones' drivers report it. - Buffers the driver allocates itself, and the buffer usage it recommends to apps, now ask for an
uncompressed layout on Mali phones.
Known issues
- No BCn texture formats (BC1-BC7).
- Direct3D 12 is not supported yet.
- On phones with 4 GB of RAM or less, give Minecraft about 600 MB of Java heap. GPU memory comes out
of the same RAM, and with a 1 GB heap the system kills the game while it loads a world. - PanVK is not a conformant Vulkan implementation on Bifrost.
Install
mali-panvk-26.3.0-devel-r4.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. Remove the r3 entry first if the app keeps using the driver it already extracted.
Build from source
./build.sh /path/to/android-ndk on Linux or WSL. See the README for the tools it needs.
This project was developed with heavy use of AI tools. Every change was built and tested on the
phones above before release.