[Mesa-dev] [PATCH] i965: Prefer Meta over the BLT for BlitFramebuffer.
Ben Widawsky
ben at bwidawsk.net
Thu Jan 15 08:56:23 PST 2015
On Thu, Jan 15, 2015 at 01:41:14AM -0800, Kenneth Graunke wrote:
> There's some debate about whether we should use Meta or BLORP,
> but either should run circles around the BLT engine.
>
> Improves performance in "copypixrate -blit -back" (from Mesa demos)
> by 232.037% +/- 3.15795% (n=10) on Broadwell GT3e.
>
> Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
> ---
> src/mesa/drivers/dri/i965/intel_fbo.c | 14 +++++++-------
> 1 file changed, 7 insertions(+), 7 deletions(-)
>
> Ben: this might be a good candidate for your braswell branch.
>
I'll give it a run through the benchmarks assuming I can get a working machine.
I am always concerned about this kind of switch because it seems very benchmark
dependent to me. If we happen to have benchmarks which are extremely GPU/RCS
limited, I could only imagine this would hurt, for example.
Anyway, I'll let the data speak for itself when I have it. Thanks for giving me
new things to try.
> Jason: I bet this will affect your PBO upload path. I suspect it may
> make it a lot faster on Gen8+, as you might've been getting the BLT
> engine when trying to use BlitFramebuffer. I haven't tested.
>
> diff --git a/src/mesa/drivers/dri/i965/intel_fbo.c b/src/mesa/drivers/dri/i965/intel_fbo.c
> index 37ac613f..b54c11d 100644
> --- a/src/mesa/drivers/dri/i965/intel_fbo.c
> +++ b/src/mesa/drivers/dri/i965/intel_fbo.c
> @@ -882,6 +882,13 @@ intel_blit_framebuffer(struct gl_context *ctx,
> if (mask == 0x0)
> return;
>
> + mask = _mesa_meta_BlitFramebuffer(ctx,
> + 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),
> srcX0, srcY0, srcX1, srcY1,
> @@ -899,13 +906,6 @@ intel_blit_framebuffer(struct gl_context *ctx,
> if (mask == 0x0)
> return;
>
> - mask = _mesa_meta_BlitFramebuffer(ctx,
> - srcX0, srcY0, srcX1, srcY1,
> - dstX0, dstY0, dstX1, dstY1,
> - mask, filter);
> - if (mask == 0x0)
> - return;
> -
> _swrast_BlitFramebuffer(ctx,
> srcX0, srcY0, srcX1, srcY1,
> dstX0, dstY0, dstX1, dstY1,
> --
> 2.2.1
>
More information about the mesa-dev
mailing list