Erik Faye-Lund
February 04, 2025
Reading time:
The first release candidate of Mesa 25.0 has recently shipped, so this seems like a good time to cover the updates we have spent the last few months on for the Panfrost project.
Most of the effort has gone into PanVK, which is starting to move from an experimental status to production quality.
First, and most importantly: We're now exposing Vulkan 1.1 unconditionally on V10 GPUs. This specifically covers the Mali-G610 and the Mali-G310 GPUs.
There are two different ways this is new. Previously, we only exposed Vulkan 1.0.
But more importantly, in earlier releases we didn't expose the driver at all unless a special environment was set. This was to avoid accidentally breaking end-user systems, where falling back to Lavapipe or something else would be a better choice. This is no longer the case for V10 GPUs. We now believe enumerating PanVK by default is the best choice.
It's important to point out that PanVK is not yet formally conformant to any version of the Vulkan specification. We are working on this bit, but we are not yet there. Exposing Vulkan 1.1 rather than Vulkan 1.0 does not change this.
We're also building PanVK by default on ARM systems now.
We have enabled a lot of new extensions, including:
VK_KHR_8bit_storage
VK_KHR_dedicated_allocation
VK_KHR_global_priority
VK_KHR_index_type_uint8
VK_KHR_map_memory2
VK_KHR_multiview
(v10+)VK_KHR_shader_draw_parameters
VK_KHR_shader_float16_int8
VK_KHR_shader_non_semantic_info
VK_KHR_shader_relaxed_extended_instruction
VK_KHR_shader_subgroup_rotate
(v10+)
VK_KHR_vertex_attribute_divisor
VK_KHR_zero_initialize_workgroup_memory
VK_EXT_4444_formats
VK_EXT_global_priority_query
VK_EXT_global_priority
VK_EXT_host_query_reset
VK_EXT_image_robustness
VK_EXT_pipeline_robustness
VK_EXT_provoking_vertex
VK_EXT_queue_family_foreign
VK_EXT_sampler_filter_minmax
(v10+)
VK_EXT_scalar_block_layout
VK_EXT_su
bgroup_size_control
(v10+)VK_EXT_tooling_info
One thing worth noting is that we dropped support for VK_EXT_vertex_attribute_divisor
in favor of the KHR version listed above. This is because the hardware doesn't fully support that version of the extension properly due to lacking the VkPhysicalDeviceVertexAttributeDivisorProperties::supportsNonZeroFirstInstance
feature.
We also added support for a bunch of optional Vulkan 1.0 features that were previously unsupported. Here's the list of those:
depthClamp
depthBiasClamp
drawIndirectFirstInstance
fragmentStoresAndAtomics
(panvk/v10+)sampleRateShading
occlusionQueryPrecise
shaderInt16
shaderInt64
imageCubeArray
Panfrost now uses the "transaction elimination" feature by default, reducing memory bandwidth by skipping write-out for tiles which have not changed since the previous render. This can be disabled by the PAN_MESA_DEBUG=nocrc
debug option. If this changes the rendered result, please file a bug in the issue tracker!
We also added support for "incremental rendering" on v10 HW. This allows us to render very high triangle counts without running out of memory and failing, by writing the tile-buffers out to memory, flushing the tile-lists and starting over.
Some display controllers support reading AFBC compressed data using a 32x8 "wide" tile mode. This yields better performance than using the traditional 16x16 mode for scan-out due to better cache reuse.
Panfrost now supports this mode and will now prefer this over the 16x16 mode for scan-out buffers (when supported).
The maximum texture width/height has been increased from 8192 to 32768. At the same time, we now limit the maximum total memory usage to be a quarter of the total system memory. This should allow running modern content while keeping memory usage a bit under control on systems with very little memory.
We've added support for texturing using MediaTek's MTK_FMT_MOD_TILE_16L32S
tiling mode, where Panfrost will copy the tiled data into a temporary (non-tiled) resource, before using it for rendering. This allows rendering with the output from the HW video decoder on certain MediaTek SoCs.
Apart from all of the above, there have also been countless optimizations and bugs fixed, too many to mention here.
All of those new features are the result of teamwork between many people. The complete list of people who contributed new features to Panfrost in Mesa 25.0 are:
Thanks a lot to everyone for their help making Mesa 25.0 a very exciting release from a Panfrost point of view!
04/02/2025
The first release candidate of Mesa 25.0 has recently shipped, bringing with it multiple updates to Panfrost, and most notably to PanVK,…
29/01/2025
Collabora's involvement in Open Source XR development continues to grow today as we welcome the libsurvive project, the open source lighthouse…
28/01/2025
The latest Linux kernel release is here, bringing improvements to the DRM subsystem, further enablement of Rockchip SoCs, a new debugging…
Comments (0)
Add a Comment