MSAA For Mesa Finally Moves Closer
Written by Michael Larabel in Intel on 10 May 2012 at 05:09 PM EDT. 20 Comments
Mesa is finally getting closer to properly supporting MSAA, a.k.a. Multi-Sample Anti-Aliasing, but for now this is just Intel Sandy Bridge supported.

Paul Berry published v2 patches for enabling i965 MSAA on Intel Gen6 (Sandy Bridge) hardware. There is code for doing MSAA on Gen7 (Ivy Bridge), but it's currently disabled.

Berry hopes by end of day on Friday to land the patch series and send out the Ivy Bridge MSAA code for review. Intel MSAA support for pre-Gen6 hardware doesn't look like it's being attempted. Adding in the Intel MSAA support touches a few thousand lines of code over a set of five patches. Here's the commit description for the patch that actually enables the Multi-Sample Anti-Aliasing support.
This patch enables MSAA for Gen6, by modifying intel_mipmap_tree to understand multisampled buffers, adapting the rendering pipeline setup to enable multisampled rendering, and adding multisample resolve operations to brw_blorp_blit.cpp. Some preparation work is also included for Gen7, but it is not yet enabled.

MSAA support is still fairly preliminary. In particular, the following are not yet supported:
- Fully general blits between MSAA and non-MSAA buffers.
- Formats other than RGBA8, DEPTH24, and STENCIL8.
- Centroid interpolation.

Fixes piglit tests "EXT_framebuffer_multisample/accuracy" on

- In intel_alloc_renderbuffer_storage(), quantize the requested number of samples to the next higher sample count supported by the hardware. This ensures that a query of GL_SAMPLES will return the correct value. It also ensures that MSAA is fully disabled on Gen7 for now (since Gen7 MSAA support doesn't work yet).
- When reading from a non-MSAA surface, ensure that s_is_zero is true so that we won't try to read from a nonexistent sample.
Now if the other Mesa/Gallium3D drivers would move on with proper MSAA anti-aliasing support, albeit the drivers are already not fast enough without AA.

As of Mesa 8.0 there is MLAA, a.k.a. Morphological Anti-Aliasing support. MLAA in Mesa though is done on the CPU and is already not well supported by all Mesa/Gallium3D drivers. As far as the more advanced anti-aliasing methods supported by the Windows drivers and the proprietary NVIDIA/AMD blobs, those are still a long shot out from being in Mesa.
Related News
About The Author
Author picture

Michael Larabel is the principal author of and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and automated benchmarking software. He can be followed via Twitter or contacted via

Popular News This Week