Asahi Linux's graphics drivers have been upgraded from OpenGL 2.1 to OpenGL 3.1, and from OpenGL ES 2.0 to OpenGL ES 3.0. The post dives deep into how Apple's AGX GPU handles multisampling and sample shading differently from typical GPUs — executing shaders once per pixel rather than per sample, and implementing blending in software rather than dedicated hardware. The driver works around this by wrapping fragment shaders in a per-sample loop and relying on compiler optimizations (like common subexpression elimination and code motion) to hoist invariant expressions out of the loop, achieving correct and performant results. OpenGL ES 3.1 with compute shaders is nearly complete, and the same multisampling compiler passes are being reused for the upcoming Vulkan driver.

9m read timeFrom alyssarosenzweig.ca
Post cover image
Table of contents
MultisamplingWhat’s next?

Sort: