The Mesa project developers have announced that the Rusticl driver has been certified by the Khronos organization, successfully passing all tests from the CTS (Kronos Conformance Test Suite) and recognized as fully compatible with the OpenCL 3.0 specification, which defines the API and language extensions for cross-platform parallel computing. Obtaining the certification allows for official claims of compliance with standards and the use of related Khronos trademarks. The testing was conducted on a system with 12th generation Intel integrated GPUs using the Gallium3D Iris driver.
The driver is written in Rust and is being developed by Karol Herbst from Red Hat, who is also involved in the Mesa, Nouveau driver, and open OpenCL stack development. Rusticl serves as an equivalent to the OpenCL frontend Clover present in Mesa and is also developed using the Gallium interface provided by Mesa. Clover has long been abandoned, and Rusticl is positioned as its future replacement. In addition to achieving compatibility with OpenCL 3.0, the Rusticl project differs from Clover by supporting OpenCL extensions for image processing, though it currently does not support the FP16 format. For generating bindings for Mesa and OpenCL, allowing Rust functions to be called from C code and vice versa, Rusticl utilizes rust-bindgen.
The code for supporting the Rust language and the Rusticl driver has been accepted into the main Mesa repository and will be included in the upcoming Mesa 22.3 release, expected at the end of November. Support for Rust and Rusticl will be disabled by default and will require a build with explicit options "-D gallium-rusticl=true -Dllvm=enabled -Drust_std=2021". Additional dependencies required for the build include the rustc compiler, the bindgen binding generator, LLVM, the SPIRV-Tools toolkit, and the SPIRV-LLVM-Translator.
The possibility of using the Rust language in the Mesa project has been discussed since 2020. Among the advantages of Rust support are increased security and quality of drivers by eliminating common memory management issues, as well as the ability to integrate third-party developments, such as Kazan (a Vulkan implementation in Rust). The disadvantages include the complexity of the build system, reluctance to tie to the cargo package system, increased requirements for the build environment, and the necessity of including the Rust compiler in the build dependencies required for the construction of key components of the desktop in Linux.
Additionally, it's worth noting the work on developing the Nouveau driver, also carried out by Carol Herbst. Basic OpenGL support for GNU NVIDIA GeForce RTX 30xx based on the Ampere microarchitecture, released since May 2020, has been added to the Nouveau driver. Changes related to support for new chips will be included in the Linux kernel 6.2 and Mesa 22.3.
Source: opennet.ru
