i965: Prefer blorp glBlitFramebuffer() to the glCopyTexSubImage-based blit.
authorEric Anholt <eric@anholt.net>
Thu, 23 May 2013 23:43:58 +0000 (16:43 -0700)
committerEric Anholt <eric@anholt.net>
Tue, 28 May 2013 19:40:35 +0000 (12:40 -0700)
I think we've measured no performance difference from this in the past,
except that the blorp code can do things like multisample resolves.
Prevents piglit regression in the next commit when a testcase started
trying to do a multisampled resolve through the old glCopyTexSubImage()
path.

Reviewed-and-tested-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Acked-by: Paul Berry <stereotype441@gmail.com>
src/mesa/drivers/dri/intel/intel_fbo.c

index 34f31fb0a8814d4c6ac349c5398e5a6c0cfef801..05ff784f0743dda2d86d243880a8ae40f36be42a 100644 (file)
@@ -816,14 +816,6 @@ intel_blit_framebuffer(struct gl_context *ctx,
                        GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1,
                        GLbitfield mask, GLenum filter)
 {
-   /* Try faster, glCopyTexSubImage2D approach first which uses the BLT. */
-   mask = intel_blit_framebuffer_copy_tex_sub_image(ctx,
-                                                    srcX0, srcY0, srcX1, srcY1,
-                                                    dstX0, dstY0, dstX1, dstY1,
-                                                    mask, filter);
-   if (mask == 0x0)
-      return;
-
 #ifndef I915
    mask = brw_blorp_framebuffer(intel_context(ctx),
                                 srcX0, srcY0, srcX1, srcY1,
@@ -833,6 +825,15 @@ intel_blit_framebuffer(struct gl_context *ctx,
       return;
 #endif
 
+   /* Try glCopyTexSubImage2D approach which uses the BLT. */
+   mask = intel_blit_framebuffer_copy_tex_sub_image(ctx,
+                                                    srcX0, srcY0, srcX1, srcY1,
+                                                    dstX0, dstY0, dstX1, dstY1,
+                                                    mask, filter);
+   if (mask == 0x0)
+      return;
+
+
    _mesa_meta_BlitFramebuffer(ctx,
                               srcX0, srcY0, srcX1, srcY1,
                               dstX0, dstY0, dstX1, dstY1,