<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On 21 February 2014 19:15, Kenneth Graunke <span dir="ltr"><<a href="mailto:kenneth@whitecape.org" target="_blank">kenneth@whitecape.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">The blitter is completely ignorant of MSAA buffer layouts, so any<br>
attempt to use BLT paths with MSAA buffers is likely to break<br>
spectacularly.<br>
<br>
In most cases, BLORP handles MSAA blits, so we never hit this bug.<br>
Until recently, it also wasn't worth fixing, since Meta couldn't handle<br>
MSAA either, so there was nothing to fall back to.  But now there is.<br>
<br>
+143 piglit tests on Broadwell (which doesn't have BLORP support).<br>
Surprisingly, three also start failing.  No changes on Ivybridge.<br></blockquote><div><br></div><div>That actually doesn't surprise me too much.  Since color buffers use an array-like sample layout (sample N in the Nth layer), trying to use the blitter on a multisampled buffer just gets you sample 0 from each pixel.  Which for some tests is good enough to pass (even though the blit is actually doing the wrong thing).  So it's possible that a few of these tests that were passing by luck with the blitter don't yet have proper Meta support :)</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Signed-off-by: Kenneth Graunke <<a href="mailto:kenneth@whitecape.org">kenneth@whitecape.org</a>><br>
---<br>
 src/mesa/drivers/dri/i965/intel_blit.c | 4 ++++<br>
 1 file changed, 4 insertions(+)<br>
<br>
diff --git a/src/mesa/drivers/dri/i965/intel_blit.c b/src/mesa/drivers/dri/i965/intel_blit.c<br>
index df85dc9..cedb230 100644<br>
--- a/src/mesa/drivers/dri/i965/intel_blit.c<br>
+++ b/src/mesa/drivers/dri/i965/intel_blit.c<br>
@@ -165,6 +165,10 @@ intel_miptree_blit(struct brw_context *brw,<br>
    mesa_format src_format = _mesa_get_srgb_format_linear(src_mt->format);<br>
    mesa_format dst_format = _mesa_get_srgb_format_linear(dst_mt->format);<br>
<br>
+   /* The blitter doesn't understand multisampling at all. */<br>
+   if (src_mt->num_samples > 0 || dst_mt->num_samples > 0)<br>
+      return false;<br>
+<br></blockquote><div><br></div><div>You might consider moving this check up to the top of the function, since it doesn't depend on src_format or dst_format.  But it's not a big deal.  Either way, the patch is:</div>
<div><br></div><div>Reviewed-by: Paul Berry <<a href="mailto:stereotype441@gmail.com">stereotype441@gmail.com</a>></div></div></div></div>