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.
- Coverage parameters (glSampleCoverage, GL_SAMPLE_ALPHA_TO_COVERAGE, GL_SAMPLE_ALPHA_TO_ONE, GL_SAMPLE_COVERAGE, GL_SAMPLE_COVERAGE_VALUE, GL_SAMPLE_COVERAGE_INVERT).
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.