Mesa (master): i965: Prefer blorp glBlitFramebuffer() to the glCopyTexSubImage-based blit.
Eric Anholt
anholt at kemper.freedesktop.org
Tue May 28 20:09:47 UTC 2013
Module: Mesa
Branch: master
Commit: 48a22340cfdfe5a8d007f37ffbc39b60184c6187
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=48a22340cfdfe5a8d007f37ffbc39b60184c6187
Author: Eric Anholt <eric at anholt.net>
Date: Thu May 23 16:43:58 2013 -0700
i965: Prefer blorp glBlitFramebuffer() to the glCopyTexSubImage-based blit.
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 at intel.com>
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
Acked-by: Paul Berry <stereotype441 at gmail.com>
---
src/mesa/drivers/dri/intel/intel_fbo.c | 17 +++++++++--------
1 files changed, 9 insertions(+), 8 deletions(-)
diff --git a/src/mesa/drivers/dri/intel/intel_fbo.c b/src/mesa/drivers/dri/intel/intel_fbo.c
index 34f31fb..05ff784 100644
--- a/src/mesa/drivers/dri/intel/intel_fbo.c
+++ b/src/mesa/drivers/dri/intel/intel_fbo.c
@@ -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,
More information about the mesa-commit
mailing list