+
+ /* Swap the MSAA front and back buffers, so that reading
+ * from the front buffer after SwapBuffers returns what was
+ * in the back buffer.
+ */
+ if (swap_msaa_buffers) {
+ struct pipe_resource *tmp =
+ drawable->msaa_textures[ST_ATTACHMENT_FRONT_LEFT];
+
+ drawable->msaa_textures[ST_ATTACHMENT_FRONT_LEFT] =
+ drawable->msaa_textures[ST_ATTACHMENT_BACK_LEFT];
+ drawable->msaa_textures[ST_ATTACHMENT_BACK_LEFT] = tmp;
+
+ /* Now that we have swapped the buffers, this tells the state
+ * tracker to revalidate the framebuffer.
+ */
+ p_atomic_inc(&drawable->base.stamp);
+ }