aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2015-01-15 01:41:14 -0800
committerEmil Velikov <[email protected]>2015-02-24 12:28:49 +0000
commit86aaa10ce7bd8e919ba5c7517a4b6b975229f83c (patch)
tree9e6393b8b3ee65de07918d32bd1beaad9cdf5ff2
parent3e513ea65c72ee08416ac8b82c6403b4c0c4096f (diff)
i965: Prefer Meta over the BLT for BlitFramebuffer.
There's some debate about whether we should use Meta or BLORP, but either should run circles around the BLT engine. In particular, this means that Gen8+ will use the 3D engine for blits, like we do on Gen6-7. Improves performance in "copypixrate -blit -back" (from Mesa demos) by 232.037% +/- 3.15795% (n=10) on Broadwell GT3e. v2: Rebase on Laura's changes. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Matt Turner <[email protected]> Cc: "10.5" <[email protected]> (cherry picked from commit d523fefa756eef9c7a2c0d91cf4c2df10b89ed2a)
-rw-r--r--src/mesa/drivers/dri/i965/intel_fbo.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/mesa/drivers/dri/i965/intel_fbo.c b/src/mesa/drivers/dri/i965/intel_fbo.c
index 3ee1a55b8c7..174cea06cbb 100644
--- a/src/mesa/drivers/dri/i965/intel_fbo.c
+++ b/src/mesa/drivers/dri/i965/intel_fbo.c
@@ -885,6 +885,13 @@ intel_blit_framebuffer(struct gl_context *ctx,
if (mask == 0x0)
return;
+ mask = _mesa_meta_BlitFramebuffer(ctx, readFb, drawFb,
+ srcX0, srcY0, srcX1, srcY1,
+ dstX0, dstY0, dstX1, dstY1,
+ mask, filter);
+ if (mask == 0x0)
+ return;
+
if (brw->gen >= 8 && (mask & GL_STENCIL_BUFFER_BIT)) {
brw_meta_fbo_stencil_blit(brw_context(ctx), readFb, drawFb,
srcX0, srcY0, srcX1, srcY1,
@@ -902,13 +909,6 @@ intel_blit_framebuffer(struct gl_context *ctx,
if (mask == 0x0)
return;
- mask = _mesa_meta_BlitFramebuffer(ctx, readFb, drawFb,
- srcX0, srcY0, srcX1, srcY1,
- dstX0, dstY0, dstX1, dstY1,
- mask, filter);
- if (mask == 0x0)
- return;
-
_swrast_BlitFramebuffer(ctx, readFb, drawFb,
srcX0, srcY0, srcX1, srcY1,
dstX0, dstY0, dstX1, dstY1,