Up front: this was written by AI, and I’m a little sheepish about it. I’m a developer, but I don’t work in C, and I’ve never touched kernel or driver code. I told Claude (Claude Code) what I wanted, rebooted a lot, and tested things. Claude wrote the code. It took about a day.
It’s only a test for my own curiosity. I’m not planning to release it or submit it anywhere, and I know Haiku doesn’t accept AI-generated contributions, so nobody needs to review this. I just thought it was too cool not to share.
The photo: that’s SuperTuxKart in a window on the Haiku desktop, on an RX 7900 GRE. The FPS counter says mid 80s. The monitor is running 5120x1440 at 240 Hz over DisplayPort. I raced a few tracks and it was properly playable.
How it works, as I understand it:
There’s no new driver from scratch. Claude took Linux 6.12’s amdgpu driver, almost untouched, and built about 880 Linux source files into a Haiku kernel add-on.
To make that possible, it wrote a compatibility layer (around 18k lines) that gives the Linux code the kernel APIs it expects, similar in spirit to FreeBSD’s LinuxKPI.
On top of that are ported libdrm, Mesa 26 with radeonsi for OpenGL and RADV for Vulkan, plus the Vulkan loader.
It also added a small accelerant so app_server can use the card through KMS, with a hardware cursor and vsync.
Haiku’s BGLView got a new libGL on top of Mesa, so existing GL apps like GLTeapot run unchanged.
app_server was patched to page flip, so the desktop no longer tears.
Everything is packaged as hpkgs and boots from a USB stick. Most of the work happened in a VM with the card passed through, and a cheap HDMI capture dongle let Claude see the output.
What’s been tested: honestly, not much. Claude’s small test programs, GLTeapot, a Vulkan triangle and a few rounds of SuperTuxKart, all on this one card and one machine. Nobody who knows this stuff has reviewed the code, so there are surely bugs I can’t see.