Back to News
User submissioncodyho.dev

Building an OpenGL ES 3.0 GPU Driver for Apple Silicon in One Month

Summary

Cody Ho and Niklas report building a fully OpenGL ES 3.0-compliant GPU driver for Apple’s M4 Mac Mini and MacBook Neo in about a month, although the code is not yet ready for end users. They reverse engineered the M4, A18 Pro, and parts of the M5 user space through live hardware probing, reconstructed the AGX firmware ABI from hypervisor traces, and implemented a Linux kernel driver, custom shader compiler, command-stream builder, and Mesa integration. The resulting driver runs WebGL in Chrome and Firefox and reportedly reaches about 200 frames per second in Minecraft. The work used clean-room methods: the team says it did not inspect Apple binaries, instead treating required blobs as opaque and publishing experiments and documentation. Codex was used heavily for firmware reverse engineering, replaying progressively smaller GPU-state captures and implementing the driver, while Claude helped enumerate instruction and descriptor formats but struggled to turn that knowledge into an arbitrary-program compiler. The hardest problems included dynamic firmware state, compute captures, and partial renders involving tiled vertex-buffer exhaustion; small isolated traces and single-user mode eventually made compute reverse engineering tractable. The team then moved from a Python prototype to an asynchronous Rust/Linux driver with event-based fences and batched submissions. OpenGL ES 3.0 is complete, but Vulkan 1.4, OpenGL 4.6, OpenGL ES 3.2, OpenCL 3.1, Direct3D 12 through Proton, and ray tracing remain planned. Upstreaming will require more testing, human review, refactoring, and likely progress on the existing M1/M2 driver, so public availability is still pending.