On 5 February 2013 22:40, Kenneth Graunke <kenn...@whitecape.org> wrote:

> The BLT engine has many limitations.  Currently, it can only blit
> X-tiled buffers (since we don't have a kernel API to whack the BLT
> tiling mode register), which means all depth/stencil operations get
> punted to meta code, which can be very CPU-intensive.
>
> Even if we used the BLT engine, it can't blit between buffers with
> different tiling modes, such as an X-tiled non-MSAA ARGB8888 texture
> and a Y-tiled CMS ARGB8888 renderbuffer.  This is a fundamental
> limitation, and the only way around that is to use BLORP.
>
> Previously, BLORP only handled BlitFramebuffer.  This patch adds an
> additional frontend for doing CopyTexSubImage.  It also makes it the
> default.  This is partly to increase testing and avoid hiding bugs,
> and partly because the BLORP path can already handle more cases.  With
> trivial extensions, it should be able to handle everything the BLT can.
>
> This helps PlaneShift massively, which tries to CopyTexSubImage2D
> between depth buffers whenever a player casts a spell.  Since these
> are Y-tiled, we hit meta and software ReadPixels paths, eating 99% CPU
> while delivering ~1 FPS.  This is particularly bad in an MMO setting
> because people cast spells all the time.
>
> It also helps Xonotic in 4X MSAA mode.  At default power management
> settings, I measured a 6.35138% +/- 0.672548% performance boost (n=5).
> (This data is from v1 of the patch.)
>
> No Piglit regressions on Ivybridge (v3) or Sandybridge (v2).
>
> v2: Create a fake intel_renderbuffer to wrap the destination texture
>     image and then reuse do_blorp_blit rather than reimplementing most
>     of it.  Remove unnecessary clipping code and conditional rendering
>     check.
>
> v3: Reuse formats_match() to centralize checks; delete temporary
>     renderbuffers.  Reorganize the code.
>
> v4: Actually copy stencil when dealing with separate stencil buffers but
>     packed depth/stencil formats.  Tested by a new Piglit test.
>
> NOTE: This is a candidate for the 9.1 branch.
>
> Signed-off-by: Kenneth Graunke <kenn...@whitecape.org>
> Cc: Paul Berry <stereotype...@gmail.com>
> Reviewed-and-tested-by: Carl Worth <cwo...@cworth.org> [v2]
> Reviewed-by: Ian Romanick <ian.d.roman...@intel.com> [v3]
> Tested-by: Martin Steigerwald <mar...@lichtvoll.de> [v3]
>

Reviewed-by: Paul Berry <stereotype...@gmail.com>
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to