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