st/dri: resolve the back buffer only in SwapBuffers
authorMarek Olšák <maraeo@gmail.com>
Sat, 1 Jun 2013 01:18:04 +0000 (03:18 +0200)
committerMarek Olšák <maraeo@gmail.com>
Thu, 13 Jun 2013 01:54:14 +0000 (03:54 +0200)
Reviewed-by: Brian Paul <brianp@vmware.com>
src/gallium/state_trackers/dri/common/dri_drawable.c

index 1c2bad42cbe1b66f6082b420e37e0e2ac752d528..18d8d8988a965bb08f38c09bd054cbccaf82df71 100644 (file)
@@ -435,14 +435,14 @@ dri_flush(__DRIcontext *cPriv,
    /* Flush the drawable. */
    if ((flags & __DRI2_FLUSH_DRAWABLE) &&
        drawable->textures[ST_ATTACHMENT_BACK_LEFT]) {
-      if (drawable->stvis.samples > 1) {
+      if (drawable->stvis.samples > 1 &&
+          reason == __DRI2_THROTTLE_SWAPBUFFER) {
          /* Resolve the MSAA back buffer. */
          dri_pipe_blit(ctx->st->pipe,
                        drawable->textures[ST_ATTACHMENT_BACK_LEFT],
                        drawable->msaa_textures[ST_ATTACHMENT_BACK_LEFT]);
 
-         if (reason == __DRI2_THROTTLE_SWAPBUFFER &&
-             drawable->msaa_textures[ST_ATTACHMENT_FRONT_LEFT] &&
+         if (drawable->msaa_textures[ST_ATTACHMENT_FRONT_LEFT] &&
              drawable->msaa_textures[ST_ATTACHMENT_BACK_LEFT]) {
             swap_msaa_buffers = TRUE;
          }