<div class="gmail_quote">On 19 July 2012 18:17, Anuj Phogat <span dir="ltr"><<a href="mailto:anuj.phogat@gmail.com" target="_blank">anuj.phogat@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="HOEnZb"><div class="h5">On Thu, Jul 12, 2012 at 10:43 AM, Paul Berry <<a href="mailto:stereotype441@gmail.com">stereotype441@gmail.com</a>> wrote:<br>
> This patch series makes three improvements to the blorp engine (which<br>
> does MSAA resolves and other blits) for Gen7:<br>
><br>
> Patches 1-3 fix downsampling of integer format framebuffers on Gen7,<br>
> by using the "AVG" instruction to average the samples, rather than<br>
> adding the samples and performing a division.  This is necessary to<br>
> avoid overflow with 32-bit integer buffers.  In the process, we<br>
> rearrange the order of adds/averages to reduce the accumulation of<br>
> numerical errors (patch 2).<br>
><br>
> Patch 4 adds an optimization to the MSAA resolve when using Gen7's CMS<br>
> MSAA layout: when the MCS buffer indicates that all samples<br>
> corresponding to a given pixel contain the same color value, we don't<br>
> have to load all the samples and average them; we just load the first<br>
> sample and use its value.<br>
><br>
> Patches 5-7 make blorp take advantage of the 3D pipeline's ability to<br>
> decode the IMS MSAA layout when reading from depth and stencil<br>
> textures.  Previously blorp would emit extra shader instructions to<br>
> account for the IMS MSAA layout.  This change should make blits from<br>
> multisampled depth and stencil buffers more efficient.<br>
><br>
> [PATCH 1/7] i965: Add support for AVG instruction.<br>
> [PATCH 2/7] i965/blorp: Modify manual_blend() to avoid unnecessary loss of precision.<br>
> [PATCH 3/7] i965/blorp: Fix integer downsampling on Gen7.<br>
> [PATCH 4/7] i965/blorp: Optimize manual_blend() for compressed multisampled surfaces.<br>
> [PATCH 5/7] i965/blorp: Configure SURFACE_STATE correctly for IMS surfaces.<br>
> [PATCH 6/7] i965/blorp: Loosen assertions in compute_msaa_layout_for_pipeline.<br>
> [PATCH 7/7] i965/blorp: Use IMS layout when texturing from depth/stencil surfaces.<br>
<br>
</div></div>Paul, Most of the code in these patches was unfamiliar to me. I<br>
reviewed these patches<br>
by referring to ivybridge PRM and assume that you have already tested<br>
them on a ivybridge<br>
system. I couldn't test because i don't have one.<br>
</blockquote></div><br><div>No problem, Anuj.  Thanks for the review.  I have tested these patches on Ivy Bridge (and the ones that follow) and they pass all MSAA piglit tests.  Mostly I was looking for a second pair of eyes to double-check my reading of the PRM and make sure I hadn't made any stupid blunders in the code :)</div>