Skip to content
TopicTracker
From HackerNewsView original
TranslationTranslation

Kraid: A New Compiler for Panfrost

Collabora has announced Kraid, a new compiler for the Panfrost open-source graphics driver for Mali GPUs. Kraid aims to improve performance and code quality by replacing the existing compiler backend, bringing better optimization and support for newer hardware. The project represents a significant step forward for Linux graphics on ARM devices.

Background

- Panfrost is an open-source (free/libre) graphics driver for Arm Mali GPUs, used in many single-board computers (e.g. Raspberry Pi, Rockchip devices), Chromebooks, and some smartphones. It's part of the Mesa project. - Up to now, Panfrost relied on the Midgard/Bifrost compiler (for older Mali GPU generations) and a separate compiler for the newer Valhall architecture. Kraid is a new, unified compiler backend for Valhall GPUs written in Rust, replacing the existing Valhall compiler. - The move is driven by Rust's memory safety guarantees (avoiding common C bugs like buffer overflows) and modern tooling, as well as the desire for a single compiler that can handle all Valhall-generation GPUs. - Collabora is the consultancy that employs many of the key Panfrost developers and is leading this effort. The name "Kraid" is a nod to the Metroid game series, continuing Panfrost's naming theme.