Maíra Canal from Igalia presented a project to rewrite the VGEM (Virtual GEM Provider) driver in Rust. VGEM includes about 400 lines of code and provides a hardware-agnostic GEM (Graphics Execution Manager) backend used for shared access to buffers of software 3D device drivers, such as LLVMpipe, aimed at improving the performance of software rasterization.
VGEM will be the second graphics driver in Rust operating at the kernel level (the first was the DRM driver (Direct Rendering Manager) Asahi for Apple AGX GPUs used in Apple M1/M2 chips). The development required creating new bindings to interact with the platform device, type XArray, and abstractions related to direct memory access, such as DMA fences. At the current stage of development, the driver is nearly ready, passing most IGT tests except for two checks (vgem_slow and vgem_basic@unload), but it still needs refinement in IOCTL support.
Source: opennet.ru
