The open source Asahi GPU driver for Apple Silicon is progressing to the point of running real games like Neverball. A key challenge was implementing OpenGL's -1/1 clip space (vs Metal's 0/1), which required reverse-engineering Apple's undocumented internal Metal API. By calling hidden `setOpenGLModeEnabled` methods and comparing memory traces, a kernel-level bit was discovered that toggles the clip space. However, since this bit is render-pass state, it can't be changed mid-pass, making efficient implementation of ARB_clip_control and VK_EXT_depth_clip_control difficult. The current workaround uses the hardware bit unconditionally per API (OpenGL gets -1/1, Vulkan gets 0/1), skipping those extensions for now. The goal is native OpenGL 2.1 support in Asahi Linux by end of 2022, sufficient for desktop acceleration and older games.

10m read timeFrom alyssarosenzweig.ca
Post cover image

Sort: