[Mesa-dev] [PATCH 00/15] Fixes for MSAA GLX visuals, u_blitter cleanups

Marek Olšák maraeo at gmail.com
Sat Jun 1 07:29:16 PDT 2013


This series fixes a lot of issues with MSAA visuals, in particular the management of MSAA front and back buffers in st/dri and CopyPixels in st/mesa. There is a change in st/dri which may improve performance if a DRI2 invalidate event is generated every frame (e.g. with page flipping).

There is a little issue with DRI2 I'd like to note here. MSAA front and back buffers should be manually swapped in SwapBuffers and resolved when they are going to be presented. What is less obvious is that new or invalidated DRI2 front and back buffers should be copied to the MSAA buffers, so that their contents are visible to GL apps. There is as a patch in this series which does that when the MSAA buffers are created for the first time, but if the X server modifies and invalidates the front or back buffer and the MSAA buffers already exist, the GL app won't see the change. This is a compromise I had to make, because doing a "DRI2 buffer -> MSAA buffer" copy after every DRI2 invalidate event (every frame with page flipping) may have negative effect on performance (and therefore defeats the purpose of page flipping).

In a nutshell, if DRI2 buffers are used for presentation only, rendering with MSAA visuals works as expected. If someone outside of Mesa modifies the contents of the front and back buffer, the change won't be visible in the default framebuffer of OpenGL and will be overwritten next time the MSAA framebuffer is resolved for presentation.

Marek





More information about the mesa-dev mailing list