<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, Dec 13, 2017 at 12:25 PM, 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 hardware doesn't support this, and isl_surf_get_mcs_surf will fail.<br>
<br>
I feel a bit bad replicating this logic, but we want to decide up front.<br></blockquote><div><br></div><div>I do too. One of these days, I'd like to move things around so that we just call isl_surf_get_mcs_surf and disable MCS if it fails. But that's a lot of refactoring.</div><div><br></div><div>Reviewed-by: Jason Ekstrand <<a href="mailto:jason@jlekstrand.net">jason@jlekstrand.net</a>><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
This fixes the following test when run with --deqp-surface-width=16384:<br>
- GTF-GL46.gtf30.GL3Tests.<wbr>framebuffer_blit.framebuffer_<wbr>blit_error_blitframebuffer_<wbr>multisampled_framebuffers_<wbr>different_sample_count<br>
<br>
Cc: <a href="mailto:itoral@igalia.com">itoral@igalia.com</a><br>
Cc: <a href="mailto:apuentes@igalia.com">apuentes@igalia.com</a><br>
Cc: <a href="mailto:idr@freedesktop.org">idr@freedesktop.org</a><br>
---<br>
src/mesa/drivers/dri/i965/<wbr>intel_mipmap_tree.c | 4 ++++<br>
1 file changed, 4 insertions(+)<br>
<br>
diff --git a/src/mesa/drivers/dri/i965/<wbr>intel_mipmap_tree.c b/src/mesa/drivers/dri/i965/<wbr>intel_mipmap_tree.c<br>
index c1a4ce184f5..ead0c359c0f 100644<br>
--- a/src/mesa/drivers/dri/i965/<wbr>intel_mipmap_tree.c<br>
+++ b/src/mesa/drivers/dri/i965/<wbr>intel_mipmap_tree.c<br>
@@ -73,6 +73,10 @@ intel_miptree_supports_mcs(<wbr>struct brw_context *brw,<br>
if (devinfo->gen < 7)<br>
return false;<br>
<br>
+ /* See isl_surf_get_mcs_surf for details. */<br>
+ if (mt->surf.samples == 16 && mt->surf.logical_level0_px.<wbr>width > 8192)<br>
+ return false;<br>
+<br>
/* In Gen7, IMS layout is only used for depth and stencil buffers. */<br>
switch (_mesa_get_format_base_format(<wbr>mt->format)) {<br>
case GL_DEPTH_COMPONENT:<br>
<span class="HOEnZb"><font color="#888888">--<br>
2.15.1<br>
<br>
</font></span></blockquote></div><br></div></div>